The Expense Tracker CLI is a simple command-line tool for managing and tracking expenses. It allows users to add, update, delete, list expenses, view a summary, and set a budget, all from the terminal.
- Add Expense: Add new expenses with details such as amount, description, and category.
- Update Expense: Modify existing expenses.
- Delete Expense: Remove an expense by its ID.
- List Expenses: Display a list of all recorded expenses.
- Summary: View a summary of total expenses categorized by type.
- Set Budget: Define a budget and track how expenses measure up to the set budget.
- Node.js (version 14.x or higher)
- npm (Node Package Manager)
-
Clone the repository:
git clone https://github.com/yourusername/expense-tracker-cli.git cd expense-tracker-cli
-
Install dependencies:
npm install
-
Make the CLI executable globally (optional):
npm link
Once installed, you can use the expense-tracker-cli
to manage your expenses.
-
Add an expense:
expense-tracker-cli add --amount 50 --description "Lunch" --category "Food"
-
Update an expense:
expense-tracker-cli update --id 1 --amount 60 --description "Dinner"
-
Delete an expense:
expense-tracker-cli delete --id 1
-
List all expenses:
expense-tracker-cli list
-
View expense summary:
expense-tracker-cli summary
-
Set a budget:
expense-tracker-cli budget --amount 1000
--amount
: Specify the amount for an expense or budget.--description
: Provide a short description for an expense.--category
: Define a category for the expense (e.g., Food, Transport, etc.).--id
: Reference an expense by its ID for update or deletion.