Skip to content

πŸš€ Welcome to the CLI Contact Manager repository! This Node.js command-line interface (CLI) program is designed for efficiently managing contact information. With features such as viewing all contacts, retrieving contacts by ID, deleting contacts, and adding new contacts, this tool is a handy utility for contact management.

License

Notifications You must be signed in to change notification settings

Alexandrbig1/goit-NodeJS-hw-01

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CLI Contact Manager

GitHub last commit GitHub license Node.js Version

This is a simple command-line interface (CLI) program built with Alt text for managing contacts. It allows you to perform basic operations on a Alt text file containing contact information such as ID, name, phone number, and email.

Table of Contents

Features

  • View All Contacts: Retrieve a list of all contacts stored in the Alt text file.
  • Get Contact by ID: Find a specific contact using their unique identifier.
  • Delete Contact by ID: Remove a contact from the list based on their ID.
  • Add New Contact: Append a new contact to the Alt text file with a generated ID.

Technologies Used

  • Alt text The runtime environment for executing the CLI program.
  • Commander: A framework for building command-line applications, providing a clean and structured way to define commands and options.
  • uuid: Used for generating unique IDs for each contact.
  • fs/promises: File system module for handling file operations asynchronously.

How to Use

  1. Install Dependencies:
    npm install
  2. Run the CLI:
    node src/index.js --<command> [options]
    

Available Commands

  • list: Display all contacts.
    node src/index.js --action list
  • get: Get contact by ID.
    node src/index.js --action get --id <contactId>
  • remove: Delete contact by ID.
    node src/index.js --action remove --id <contactId>
  • add: Add a new contact.
    node src/index.js --action add --name <name> --email <email> --phone <phone_number>
    

Examples

  • List all contacts:
    node src/index.js --action list
  • Get contact by ID:
    node src/index.js --action get --id 05olLMgyVQdWRwgKfg5J6
  • Remove contact by ID:
    node src/index.js --action remove --id qdggE76Jtbfd9eWJHrssH
  • Add a new contact:
    node src/index.js --action add --name "John Doe" --email "john.doe@example.com" --phone "+1234567890"
    

Project Preview

Screenshots:

goit-NodeJS-hw-01 Caption for Screenshot 1 (listContacts)

goit-NodeJS-hw-01 Caption for Screenshot 2 (getContactById)

goit-NodeJS-hw-01 Caption for Screenshot 3 (addContact)

goit-NodeJS-hw-01 Caption for Screenshot 4 (removeContact)

Issues

If you encounter any issues or have suggestions, please open an issue.

License

This project is licensed under the MIT License.

Feedback

I welcome feedback and suggestions from users to improve the application's functionality and user experience.

Languages and Tools:

Connect with me:

About

πŸš€ Welcome to the CLI Contact Manager repository! This Node.js command-line interface (CLI) program is designed for efficiently managing contact information. With features such as viewing all contacts, retrieving contacts by ID, deleting contacts, and adding new contacts, this tool is a handy utility for contact management.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published