
rastrata
com.rastrata/rastrata
Open-source accounting for US small businesses. Your own AI agent keeps the books.
Documentation
Open-source accounting your own AI agent runs.
The open-source alternative to QuickBooks and Xero. Keep your books in one SQLite file.
Connect Claude Code, Codex, or ChatGPT with no AI markup. Lean 4 proofs guard the math.
Website | Rastrata Cloud | Self-host | Connect an agent | Stripe App | Docs
Claude Code drafted 37 entries for Willow Lane Studio and flagged the 2 lines that need a human answer. Watch the 45-second video.
Why Rastrata
You pay for QuickBooks or Xero, and you still spend hours sorting transactions. Or you pay an AI bookkeeping startup a markup on tokens to lock your books in their cloud.
Rastrata flips both. Bring the AI agent you pay for. Your agent imports statements, sorts lines, writes rules, and drafts entries. You answer the two hard questions and close the month at $0.00.
Stripe payouts, split right
One lump-sum Stripe payout splits into sales, sales tax, refunds, disputes, and Stripe fees. Sales, tax, refunds, and Stripe fees balance to $103.65.
Clean books. Clear agent limits.
Choose what your agent can do: full access, prepare for approval, or read only. Every change stays in the audit log, and you can revoke any token in one click.
Quick start
1. Self-host with Docker ($0 forever)
Run the web app, API, SQLite file, backups, and CLI in one container using docker-compose.yml:
export RASTRATA_PASSWORD="$(openssl rand -base64 18)"
docker compose up -d
Open http://localhost:7278 and sign in with your password. Set RASTRATA_PUBLIC_ORIGIN=https://books.example.com behind a reverse proxy or custom domain. See the self-hosting guide for Docker Secrets, Railway, and backups.
2. Connect your AI agent (CLI or MCP)
Install the MIT CLI on macOS or Linux:
curl -fsSL https://rastrata.com/install.sh | sh
rastrata login
On Windows (PowerShell):
irm https://rastrata.com/install.ps1 | iex
rastrata login
Connect Claude or ChatGPT to Rastrata Cloud over remote MCP at https://app.rastrata.com/mcp, or run the MIT stdio MCP container with Claude Desktop, Cursor, or Docker Desktop:
docker run --rm -i \
-e RASTRATA_API_URL="https://app.rastrata.com" \
-e RASTRATA_TOKEN="rst_..." \
ghcr.io/gant-street/rastrata-mcp:latest
3. Self-hosted vs. Rastrata Cloud
Do not want to manage servers or upload bank CSVs? Try Rastrata Cloud free for 30 days ($19/month after). Export your books anytime to self-host.
| Capability | Self-hosted ($0) | Rastrata Cloud ($19/mo) | QuickBooks / Xero |
|---|---|---|---|
| Double-entry engine, web app, and Lean 4 proofs | Included | Included | Proprietary |
| SQLite file and open CSV / JSONL export | Included | Included | Export limits |
| Bring your own AI agent (CLI & MCP, no AI markup) | Included | Included | Locked in |
| Live US bank feeds (daily sync) | Manual / SimpleFIN / plugins | Included | Included |
| One-click Stripe payout sync (Stripe App) | CLI / API key / plugins | Included | Paid add-ons |
Remote MCP (https://app.rastrata.com/mcp) | Self-managed HTTPS | Included | None |
| Managed daily backups & unlimited team / CPA seats | Self-managed | Included | Per-seat fees |
Why Lean 4
AI agents make mistakes. Rastrata keeps your books safe in the engine, not in a prompt. Lean 4 proofs in proofs/ check the accounting rules, and our build tests the code against them:
- Every journal entry balances to
$0.00. - Posted entries never change. Fixes post a reversal tied to the original entry.
- Closed months stay locked.
- Reconciliations close only when the difference equals
$0.00.
Local development & repository layout
Run from source
.bun-version and .go-version pin the tool versions.
bun install --frozen-lockfile
bun run dev:api # http://127.0.0.1:4010
RASTRATA_API_URL=http://127.0.0.1:4010 bun run dev:web # http://127.0.0.1:4000
Build the Go CLI and TUI:
bun run --cwd apps/terminal build
apps/terminal/dist/rastrata tui
Build the single-executable package (rastrata-service + rastrata + install.sh):
bun run package
Verify:
bun run gate
bun run typecheck
bun run lint
bun run format:check
bun run test
Repository layout
| Path | License | Purpose |
|---|---|---|
packages/kernel/ | AGPL-3.0 | Double-entry accounting kernel (100% test coverage) |
packages/ledger/ | AGPL-3.0 | Durable book storage and replay |
packages/application/ | AGPL-3.0 | Bookkeeping workflows, ingestion, rules, reconciliation, tax, and reports |
packages/booklog/ | AGPL-3.0 | Hash-chained book log and snapshotting |
packages/plugin-sdk/ | MIT | Zero-dependency SDK, runner, and test harness for ingestion plugins |
packages/plugin-stripe/ | MIT | Official Stripe payout, evidence, and bank-clearing plugin |
packages/plugin-ramp/ | MIT | Official Ramp corporate card, pending authorizations, and OCR receipt plugin |
packages/mcp-tools/ | MIT | Shared MCP tool schemas and handlers for local and remote agent connectors |
packages/telemetry/ | AGPL-3.0 | Static OpenTelemetry metric and span catalog |
packages/ui/ | AGPL-3.0 | SolidJS and Ark UI ledger design system |
apps/api/ | AGPL-3.0 | Application HTTP server and single-file rastrata-service binary |
apps/web/ | AGPL-3.0 | Web application (SolidJS) |
apps/terminal/ | MIT | Go CLI and TUI (rastrata) |
apps/mcp/ | MIT | Model Context Protocol (MCP) server (HTTP and stdio) |
plugins/rastrata/ | MIT | Agent plugin manifest and bookkeeping skills |
proofs/ | AGPL-3.0 | Lean 4 proofs of the accounting kernel |
docs/ | AGPL-3.0 | Tutorials, how-to guides, and architecture explanations |
Licensing and contributing
- Core engine, service, web app, and proofs: GNU AGPLv3
- CLI, MCP server, and plugin SDK: MIT
- Trademarks: TRADEMARK.md
- Security: SECURITY.md
- Contributing and CLA: CONTRIBUTING.md
Like what we are building? Star this repo to follow releases.
No installation packages available.