https://github.com/oleksandr-romashko/goit-node-cli
Command-line application to manage your contacts.
https://github.com/oleksandr-romashko/goit-node-cli
cli commander goit-node-cli nodejs
Last synced: about 1 month ago
JSON representation
Command-line application to manage your contacts.
- Host: GitHub
- URL: https://github.com/oleksandr-romashko/goit-node-cli
- Owner: oleksandr-romashko
- Created: 2024-08-20T08:26:04.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-23T08:25:39.000Z (almost 2 years ago)
- Last Synced: 2025-01-22T04:08:46.466Z (over 1 year ago)
- Topics: cli, commander, goit-node-cli, nodejs
- Language: JavaScript
- Homepage:
- Size: 889 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Contacts management CLI application
#### goit-node-cli
Command-line application to store and manage your contacts.
## Project description
Store and manage your contacts using a command-line interface:
* Display the entire list of stored contacts
* Retrieve specific contacts by ID
* Add new contacts
* Remove existing contacts
## Quickstart
1) Download the files from the [repository](https://github.com/oleksandr-romashko/goit-node-cli).
2) Make sure you have the [latest Node.js LTS version](https://nodejs.org/en/download/package-manager) installed on your machine.
3) Install the application dependencies using the `npm install` command in your terminal.
## Usage
1) Retrieves and displays the entire list of contacts as a table (console.table):
```bash
node index.js -a list
```
2) Retrieves a contact by ID and logs the contact object to the console or null if a contact with that ID does not exist:
```bash
node index.js -a get -i 05olLMgyVQdWRwgKfg5J6
```
3) Adds a contact and logs the newly created contact object to the console:
```bash
node index.js -a add -n Mango -e mango@gmail.com -p 322-22-22
```
There is no check for duplicates.
4) Removes a contact and logs the deleted contact object to the console or null if a contact with that ID does not exist:
```bash
node index.js -a remove -i qdggE76Jtbfd9eWJHrssH
```
5) Errors while reading from / writing to db file or parsing / stringifying json: