Here’s a README tailored for your Expense Tracker CLI App:
- 🤖 Introduction
- ⚙️ Tech Stack
- 🔋 Features
- 🤸 Quick Start
The Expense Tracker CLI App is a command-line tool that allows users to manage their personal expenses. You can easily add, update, delete, and list expenses directly from your terminal, as well as summarize expenses by month or in total. This simple, yet powerful, CLI application is built using Node.js and the Commander.js library, with data stored in a JSON file.
I found this project idea from https://roadmap.sh/projects/expense-tracker
- Node.js: Back-end runtime environment
- Commander.js: Command-line interfaces made easy
- CLI-Table: Beautiful table rendering in terminal
- Chalk: Colorful terminal output
- FS (File System): For reading and writing the expenses JSON file
👉 Add Expenses
Easily add a new expense by providing a description and amount.
👉 List Expenses
View all expenses in a structured table format with ID, Date, Description, and Amount fields.
👉 Update Expenses
Modify an existing expense by specifying its ID and providing new values for description or amount.
👉 Delete Expenses
Remove an expense by its ID, keeping your expense records clean and up to date.
👉 Summarize Total Expenses
View the total sum of all recorded expenses.
👉 Summarize Expenses by Month
Filter expenses by a specific month and view the total.
Follow these steps to set up the project locally on your machine.
Make sure you have the following installed:
-
Clone this repository to your local machine:
git clone https://github.com/codewithnuh/expense-tracker-cli
-
Navigate into the project directory:
cd expense-tracker-cli
-
Install the required dependencies:
npm install
To use the Expense Tracker CLI, run the following commands:
-
Add an expense:
node index.js add --description "Lunch" --amount 12.50
-
List all expenses:
node index.js list
-
Update an expense:
node index.js update --id 1 --description "Dinner" --amount 15.75
-
Delete an expense:
node index.js delete --id 1
-
Summarize all expenses:
node index.js summarize
-
Summarize expenses for a specific month:
node index.js summarize-month --month 9
Enjoy tracking your expenses with the Expense Tracker CLI App!