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.2.tar.gz (73.1 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.2-py3-none-any.whl (59.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spendctl-0.2.2.tar.gz
  • Upload date:
  • Size: 73.1 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.2.tar.gz
Algorithm Hash digest
SHA256 c794c41402e2f1002c3be89d0212a29eaa40a23fb6787539015f3c52dfd40b91
MD5 1f68b40ba31f0cad78c1ac7b6f7ed445
BLAKE2b-256 1b58b2c817080c1f5bc25d7404db1048e19a0cf1d44a2c4d00dbc3650a8d9404

See more details on using hashes here.

Provenance

The following attestation bundles were made for spendctl-0.2.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: spendctl-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f9cd44c5ffa04307d15d5abef6e7c0d6f1f69b4c8a2ef4138d1d5eaf0e828800
MD5 fe84494f3e630bb5304cf8f84f606438
BLAKE2b-256 743095ceab1b0c1ca15ba30b35349d9aa0d8e1d95e63eccd2079fffb5fd00e05

See more details on using hashes here.

Provenance

The following attestation bundles were made for spendctl-0.2.2-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