Repository avatar
AI Tools
v0.3.0
active

rastrata

com.rastrata/rastrata

Open-source accounting for US small businesses. Your own AI agent keeps the books.

Documentation

Rastrata

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 drafting 37 accounting entries in Rastrata and flagging 2 lines for review

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 Stripe payout split into sales, sales tax, refunds, and Stripe fees balancing to $103.65

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.

Rastrata Today screen showing cash on hand, money in, money out, net profit, and items to review

Rastrata Agents settings showing Auto, Prepare, and Read only access levels

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.

CapabilitySelf-hosted ($0)Rastrata Cloud ($19/mo)QuickBooks / Xero
Double-entry engine, web app, and Lean 4 proofsIncludedIncludedProprietary
SQLite file and open CSV / JSONL exportIncludedIncludedExport limits
Bring your own AI agent (CLI & MCP, no AI markup)IncludedIncludedLocked in
Live US bank feeds (daily sync)Manual / SimpleFIN / pluginsIncludedIncluded
One-click Stripe payout sync (Stripe App)CLI / API key / pluginsIncludedPaid add-ons
Remote MCP (https://app.rastrata.com/mcp)Self-managed HTTPSIncludedNone
Managed daily backups & unlimited team / CPA seatsSelf-managedIncludedPer-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

PathLicensePurpose
packages/kernel/AGPL-3.0Double-entry accounting kernel (100% test coverage)
packages/ledger/AGPL-3.0Durable book storage and replay
packages/application/AGPL-3.0Bookkeeping workflows, ingestion, rules, reconciliation, tax, and reports
packages/booklog/AGPL-3.0Hash-chained book log and snapshotting
packages/plugin-sdk/MITZero-dependency SDK, runner, and test harness for ingestion plugins
packages/plugin-stripe/MITOfficial Stripe payout, evidence, and bank-clearing plugin
packages/plugin-ramp/MITOfficial Ramp corporate card, pending authorizations, and OCR receipt plugin
packages/mcp-tools/MITShared MCP tool schemas and handlers for local and remote agent connectors
packages/telemetry/AGPL-3.0Static OpenTelemetry metric and span catalog
packages/ui/AGPL-3.0SolidJS and Ark UI ledger design system
apps/api/AGPL-3.0Application HTTP server and single-file rastrata-service binary
apps/web/AGPL-3.0Web application (SolidJS)
apps/terminal/MITGo CLI and TUI (rastrata)
apps/mcp/MITModel Context Protocol (MCP) server (HTTP and stdio)
plugins/rastrata/MITAgent plugin manifest and bookkeeping skills
proofs/AGPL-3.0Lean 4 proofs of the accounting kernel
docs/AGPL-3.0Tutorials, how-to guides, and architecture explanations

Licensing and contributing

Like what we are building? Star this repo to follow releases.

No installation packages available.

Remote