Skip to content

thientran2020/data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

119 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DATA - FINANCIAL CLI TOOL

A great tool helps you manage your financial data with beautiful color-coded output ^^

INSTALLATION

There are 2 ways: either use brew tap (recommended) or clone the project with git.

  1. Use brew tap. Open your terminal, run the following commands:
 ➜ brew tap thientran2020/homebrew-thientran2020
 ➜ brew install thientran2020/thientran2020/data

Verify if it was already installed successfully:

 ➜ data help

---------------------------------------------------------------------------------
				FINANCIAL CLI
   		 A great tool helps you manage your financial data ^^
---------------------------------------------------------------------------------
.....
  1. Clone project to your local machine
git clone git@github.com:thientran2020/data.git
cd data
cd cmd/data && go build -o data main.go && export PATH=$(pwd):$PATH

FEATURES

  • Beautiful color-coded output for better readability
    • Income amounts in green
    • Expense amounts in red
    • Headers in bold
    • Net amounts color-coded based on value
  • Consistent date formatting (MM-DD-YYYY)
  • Properly aligned financial data display
  • Subscription management
  • Trip expense tracking
  • Category-based organization

COMMANDS

  • data add (used to add a single record: either income or expense)
    -s  adding subscription
    -t  adding trip
    -i  adding income
    -c  specify category code
    -d  add description
    -n  set date to today
    -y  set date to yesterday
➜ data add
Enter date: : 12-19-2022
Use the arrow keys to navigate: ↓ ↑ → ←
? What type of financial data are you entering:
  ▸ Income
    Expense
? What did you work for today: ABC
Awesome. How much did you earn: 100
Use the arrow keys to navigate: ↓ ↑ → ←
? Pick the category that describe best your entered data:
  ▸ Income
    Mortgage
    Utilities
    Insurance
    Vehicle Services
    Fuel - Car Wash
    Subcription
    Restaurants
    Amazon Shopping
    Merchandise
    Travel
    Personal
    Trip

✔ Income
+-----+-----+-----+------------------------------------+--------+-------------------+
|    12/19/2022   | ABC                                | $100   | Income            |
+-----+-----+-----+------------------------------------+--------+-------------------+
? Do you confirm to enter above record? [y/N]
  • data show (used to retrieve your financial data)
    -i    show only income data
    -e   show only expense data
    -m  show only data filtered by specified month
    -y   show only data filtered by specified year
    -k   show only data filtered by specified keyword
    -c   show current month's records

ESPECIALLY: This command will update subscriptions automatically.
Please run once if you see your subscriptions/memberships are not renewed yet in the financial table.

Example output with color formatting:

➜ data show -m=7 -y=2024
SHOW FINANCIAL DATA FOR 7/2024:

+---+------------+-------------+----------+------+
| # |    DATE    | DESCRIPTION | CATEGORY | COST |
+---+------------+-------------+----------+------+
| 1 | 07-09-2024 | Salary      | Income   | $5000|
| 2 | 07-15-2024 | Groceries   | Food     | $150 |
+---+------------+-------------+----------+------+

TOTAL INCOME:      $5000
TOTAL EXPENSE:     $150
NET:               $4850
  • data get (used to retrieve category mapping or subscription details)
    -c  show category mapping table
    -s  show subscription details
    -t  show trip details

  • data search <keyword> (used to search records by keyword)
    Searches through descriptions and categories for the specified keyword.

DATA STORAGE

All financial data is stored in JSON format under the ./finance directory:

  • Yearly records: ./finance/YYYY.json
  • Subscriptions: ./finance/subscription.json
  • Trips: ./finance/trip.json

CATEGORIES

The tool comes with predefined categories for better organization:

  • Income
  • Mortgage
  • Utilities
  • Insurance
  • Vehicle Services
  • Fuel - Car Wash
  • Subscription
  • Restaurants
  • Amazon Shopping
  • Merchandise
  • Travel
  • Personal
  • Trip

You can view the complete category mapping using data get -c.

COPYRIGHT

Copyright (c) 2022 Thien Tran

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages