/budget-cli

:heavy_dollar_sign: Manage your Google budget spreadsheets from terminal.

Primary LanguagePythonMIT LicenseMIT

budget-cli

  • insert transaction entries
  • view transaction logs & summary
  • synchronize with annual budget
  • once-in-a-year configuration

Demo

Preliminaries

  1. Create monthly budget spreadsheets for each month from the spreadsheet template gallery.

  2. Optionally, create an additional annual budget spreadsheet if you want to use the synchronization feature.

  3. Take note of the SPREADSHEET_IDs which is embedded inside the URL:

https://docs.google.com/spreadsheets/d/<SPREADSHEET_ID>/edit#gid=<SHEET_ID>

Install

  1. Complete steps 1 in the quickstart guide. Make sure that you copy the credentials.json file into project directory.

  2. Update spreadsheet IDs inside config.json with your own monthly budget spreadsheet IDs.

  3. From project directory:

./install.sh

Uninstall

./uninstall.sh

Usage

  • For summary, categories, log and sync commands, this month's spreadsheet will be used unless specified explicitly.

  • For expense and income commands, today's date will be assigned and this month's spreadsheet will be used unless a custom date is specified explicitly as the first argument of transaction parameters.

  • For edit, original date of the transaction is assigned and this month's spreadsheet will be used unless date is specified explicitly.

Transaction Entry

# append expense for custom date
budget expense "Jun 29, 40, Pizza, Food"

# append expense for today
budget expense "40, Pizza, Food"

# append income for custom date
budget income "Aug 2, 3000, Salary, Paycheck"

# append income for today
budget income "3000, Salary, Paycheck"

# edit line 4 of income for this month (see line number in `budget log`)
budget edit income 4 "65, Tax Return, Other"

# edit line 5 of expense for September (see line number in `budget log`)
budget edit expense 5 "Sep 17, Mobile Plan, Communication"

Summary

# print monthly budget summary for all months so far
budget summary

# print monthly budget summary for January
budget summary jan

Categories

# list all monthly budget categories & amounts for this month
budget categories

# list all monthly budget categories & amounts for February
budget categories feb

Log

# log monthly budget transaction history for this month
budget log

# log monthly budget transaction history for March
budget log mar

Synchronization

For annual synchronization, expense & income categories must be exactly the same across monthly and annual budget spreadsheets.

# update annual budget with expenses & income of this month
budget sync

# update annual budget with expenses & income of April
budget sync apr