Skip to main content

Personal finance CLI built for AI workflows

Project description

spendctl

CI Python 3.10+ License: MIT

A personal finance CLI built for AI workflows.

What it does

Track spending, income, debt, and net worth from your terminal. Every command supports --json output, making it straightforward to integrate with any AI assistant — Claude, GPT, local models via Ollama or LM Studio, or custom scripts. Your financial data stays in a local SQLite file. No APIs, no cloud sync, no accounts to create. An optional Streamlit dashboard is available for visual analysis when you want it.

Features

  • Zero runtime dependencies for the core CLI
  • --json output on every command for AI and script integration
  • Works with any AI — local models (Ollama, LM Studio), Claude, GPT, or custom scripts
  • Built-in Ollama integration for local AI analysis (spendctl ask)
  • Interactive setup wizard (spendctl init) — auto-configures Claude Code, Codex CLI, Gemini CLI, and Aider
  • 14 CLI commands: transactions, balances, budgets, debt tracking, and more
  • 7-page Streamlit dashboard (optional)
  • SQLite backend — portable, inspectable, no server needed
  • Config-driven — your accounts, categories, and budgets defined in one file

Quick Start

pip install spendctl
spendctl init                                                    # Interactive setup wizard
spendctl add 2024-01-15 "Grocery store" 87.42 --category Groceries
spendctl balance                                                 # See all account balances
spendctl balance --json | jq .                                   # AI-friendly output
spendctl ask "How's my budget looking?"                          # Ask your local AI

Commands

Command Description
spendctl init Interactive setup wizard
spendctl add Add a transaction
spendctl list List and filter transactions
spendctl balance Show account balances
spendctl spending Spending breakdown by category
spendctl debt Debt paydown progress
spendctl budget Budget vs actual comparison
spendctl summary Full monthly summary
spendctl subscriptions Manage recurring charges
spendctl backup Create a database backup
spendctl export-csv Export transactions to CSV
spendctl dashboard Launch the Streamlit dashboard
spendctl ask Ask your local AI about your finances
spendctl config View, edit, or reset configuration

How spendctl Compares

spendctl ledger / hledger beancount + fava budgetwarrior
Interface CLI + Streamlit dashboard CLI only CLI + web UI CLI only
Storage SQLite Plain text Plain text Custom binary
AI-friendly output --json on every command Limited No No
Setup Interactive wizard Edit text files Edit text files Manual
Dashboard 7-page Streamlit (optional) None Fava web UI None
Accounting model Single-entry Double-entry Double-entry Single-entry
Runtime deps Zero (core CLI) Haskell/C++ Python C++
Learning curve Low High High Medium

AI Integration

Terminal AI Assistants

During setup, spendctl init can auto-configure your terminal AI assistant to know about spendctl. Supported:

  • Claude Code — adds to ~/.claude/CLAUDE.md
  • Codex CLI — adds to ~/.codex/AGENTS.md
  • Gemini CLI — adds to ~/.gemini/GEMINI.md
  • Aider — generates context file and updates .aider.conf.yml

Local AI Analysis

If you have Ollama installed (locally or on a homelab), spendctl can use it to analyze your finances:

spendctl ask "How's my spending this month?"
spendctl ask "Am I on track with my debt payoff?"
spendctl ask "What should I cut from my budget?"

The init wizard auto-detects Ollama and walks you through model selection. Your data stays local — nothing leaves your machine.

JSON Output

Every command supports --json for structured output:

spendctl balance --json
spendctl spending --month 2024-01 --json
spendctl summary --json

This makes it easy to pipe financial data to any AI model or script.

Dashboard

Install with the optional dashboard dependencies:

pip install "spendctl[dashboard]"
spendctl dashboard

The dashboard runs at http://localhost:8501 and includes 7 pages:

  • Overview — sparklines, net worth gauge, budget vs actual at a glance
  • Spending — category pie and bar charts with budget alerts
  • Debt — progress bars, payoff projections, interest savings calculator
  • Transactions — filterable transaction table
  • Subscriptions — active and canceled recurring charges
  • Loans — student loan payoff tracking
  • Report — printable monthly budget summary

Configuration

Run spendctl init to create your config file at ~/.config/spendctl/config.json. The wizard walks you through setting up accounts, categories, income sources, and budget targets.

After setup, use the config subcommand to manage your configuration:

spendctl config show     # Print current config as JSON
spendctl config edit     # Edit a section interactively
spendctl config reset    # Delete config and re-run the wizard

Development

git clone https://github.com/Jscoats/spendctl.git
cd spendctl
pip install -e ".[dev]"
pytest
ruff check src/ tests/

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spendctl-0.2.0.tar.gz (72.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spendctl-0.2.0-py3-none-any.whl (59.9 kB view details)

Uploaded Python 3

File details

Details for the file spendctl-0.2.0.tar.gz.

File metadata

  • Download URL: spendctl-0.2.0.tar.gz
  • Upload date:
  • Size: 72.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for spendctl-0.2.0.tar.gz
Algorithm Hash digest
SHA256 52afe4444cd2b2015ea3925bfc2d0df6fb29f063bebb6f022f7ebcf11d1fb446
MD5 f21b0ec16ae8acc60c56d435a1966d22
BLAKE2b-256 0b9c2ad4083df5f26395599fceda96dfe8eebd705d41d8474ed9138de259f5fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for spendctl-0.2.0.tar.gz:

Publisher: release.yml on Jscoats/spendctl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spendctl-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: spendctl-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 59.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for spendctl-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b646337355402898899c7b509a282ed6cd278a4cf87392765640509889942683
MD5 4a0a5236c72b4302b062d0e6e3b7e3ae
BLAKE2b-256 f354d7cd143ebc2fe3bb2a02d4e4016ddfef90e0a8bfa923eef701ab87810b27

See more details on using hashes here.

Provenance

The following attestation bundles were made for spendctl-0.2.0-py3-none-any.whl:

Publisher: release.yml on Jscoats/spendctl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page