Skip to content

zeinaaabbb/expense-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Expense Tracker

A Command Line Interface (CLI) that trackers and manages your finances.

til

Table of contents

Feature

  • Able to add an expense with a name and amount
  • Able to update an expense by name or price in pounds
  • Able to delete an expense by id
  • Able to list all expenses
  • Able to view a summary of all expenses
  • Able to view a summary of expenses for a specific month [TODO]

Additional features [TODO]

  • Add expense categories and able to filter expenses by category
  • Able to set a budget for each month
  • Able to export expenses to a CSV file

Prerequisites

Node.js 18+ version

Installation

git clone https://github.com/zeinaaabbb/expense-tracker.git
cd expense-tracker
npm link 

Usage

expense-tracker list 
expense-tracker add <name> <price>
expense-tracker summary
expense-tracker summary <month>
expense-tracker delete <id> 
expense-tracker update <id> <updatedName> <updatedPrice>

Example

$ expense-tracker list 
┌─────────┬────┬────────────────────────────┬───────────┬────────┐
│ (index) │ id │ date                       │ name      │ price  │
├─────────┼────┼────────────────────────────┼───────────┼────────┤
│ 0       │ 2  │ '2024-08-06''hotel'   │ 9000   │
│ 1       │ 5  │ '2025-12-25T21:49:27.796Z''coffee'  │ 89     │ 
│ 3       │ 7  │ '2025-12-25T21:54:16.867Z''car'     │ 900000 │
│ 4       │ 8  │ '2025-12-25T21:55:08.244Z''xbox'    │ 2000   │ 
└─────────┴────┴────────────────────────────┴───────────┴────────┘

$ expense-tracker add trainers 50
┌─────────┬────┬────────────────────────────┬────────────┬────────┐
│ (index) │ id │ date                       │ name       │ price  │
├─────────┼────┼────────────────────────────┼────────────┼────────┤
│ 0       │ 2  │ '2024-08-06''hotel'    │ 9000   │
│ 1       │ 5  │ '2025-12-25T21:49:27.796Z''coffee'   │ 89     │  
│ 6       │ 10 │ '2025-12-25T22:08:20.154Z''stanley'  │ 60     │
│ 7       │ 11 │ '2025-12-25T22:08:30.115Z''table'    │ 100    │
│ 8       │ 12 │ '2025-12-27T17:44:48.079Z''movies'   │ 20     │
│ 9       │ 13 │ '2025-12-27T18:05:00.623Z''trainers' │ 50     │
└─────────┴────┴────────────────────────────┴────────────┴────────┘

$ expense-tracker summary
// Total expenses: 911418

$ expense-tracker update 2 9999
┌─────────┬────┬────────────────────────────┬────────────┬────────┐
│ (index) │ id │ date                       │ name       │ price  │
├─────────┼────┼────────────────────────────┼────────────┼────────┤
│ 0       │ 2  │ '2024-08-06''hotel'    │ 9999   │
└─────────┴────┴────────────────────────────┴────────────┴────────┘

Data is stored in a JSON in expense.json file.

Example JSON structure:

[
  {
    "id": 1,
    "date": "2025-12-25T21:50:08.118Z",
    "name": "Hotel",
    "price": 9000
  }
]

About

A Command Line Interface (CLI) that trackers and manages your finances.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors