https://github.com/miro-wq/cli-application
This project is a Node.js Command-Line Interface (CLI) application for managing a JSON contact list, allowing basic CRUD operations.
https://github.com/miro-wq/cli-application
cli command-line commanderjs contact-management contact-manager crud filesystem json node-cli nodejs
Last synced: about 2 months ago
JSON representation
This project is a Node.js Command-Line Interface (CLI) application for managing a JSON contact list, allowing basic CRUD operations.
- Host: GitHub
- URL: https://github.com/miro-wq/cli-application
- Owner: Miro-wq
- Created: 2024-11-13T15:34:17.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-11-21T12:19:37.000Z (5 months ago)
- Last Synced: 2025-03-10T15:18:30.721Z (about 2 months ago)
- Topics: cli, command-line, commanderjs, contact-management, contact-manager, crud, filesystem, json, node-cli, nodejs
- Language: JavaScript
- Homepage:
- Size: 390 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Screenshot links:
- [https://ibb.co/82WLz5N](https://ibb.co/82WLz5N)
- [https://ibb.co/zhgkPNy](https://ibb.co/zhgkPNy)
- [https://ibb.co/vsRM2y3](https://ibb.co/vsRM2y3)
- [https://ibb.co/s3jKqvY](https://ibb.co/s3jKqvY)# ✨ CLI-application (CLI Contact Manager) ✨
## 🛠 Tools used
[](https://skillicons.dev)

>This project is a Command-Line Interface (CLI) application for managing a collection of contacts. It allows users to perform basic CRUD operations (Create, Read, Update, Delete) on a contact list stored in a >JSON file. The application is built using Node.js and leverages popular npm packages such as `yargs` and `commander` for parsing command-line arguments.

- **List all contacts**: View the entire contact list in a table format.
- **Retrieve a contact**: Search for a contact by their unique ID.
- **Add a new contact**: Add a contact with a name, email, and phone number.
- **Remove a contact**: Delete a contact from the list using their unique ID.
- **JSON storage**: Contacts are stored persistently in a `contacts.json` file located in the `db` folder.
- **Modular design**: Functions for contact management are encapsulated in a separate `contacts.js` module.
- **Node.js**: JavaScript runtime environment.
- **yargs**: For parsing command-line arguments.
- **commander**: An alternative package for CLI argument parsing.
- **fs and path modules**: For file system operations and path handling.
```plaintext
cli-contact-manager/
├── db/
│ └── contacts.json # Stores the contact data
├── index.js # Main entry point for the CLI
├── contacts.js # Module for managing contact operations
├── package.json # Project configuration and dependencies
├── README.md # Project documentation
```