accounted is a free, open source finance & accounting project written in TypeScript and released under AGPL-3.0. It has 504 GitHub stars, 140 forks and 170 open issues, and was last pushed 13 hours ago. On this registry it ranks #38 of 42 tracked projects in Finance & Accounting, with 5 head-to-head comparisons available. It gained 4 stars over the last 4 tracked days.

What is accounted?

Accounted is an AGPL-3.0-licensed, self-hostable Swedish accounting and ERP system for sole traders (enskild firma) and limited companies (aktiebolag) that implements double-entry bookkeeping under Bokföringslagen and exposes the whole ledger to AI agents through more than 150 Model Context Protocol tools.

What it is

Accounted is a TypeScript accounting application built specifically for the Swedish market, where it handles double-entry bookkeeping on the BAS 2026 chart of accounts for the two entity forms its README names: sole traders and limited companies. It lives inside the Swedish financial ecosystem rather than beside it, exchanging data through the SIE interchange format, mapping VAT to the SKV 4700 form, producing NE-bilaga, INK2 and SRU exports for Skatteverket, sending and receiving Peppol BIS Billing 3 e-invoices through the Qvalia access point, signing documents with BankID, and reading mail from the Kivra and Billo digital mailboxes. The thing it replaces is the closed, vendor-hosted Swedish bookkeeping package: the same ledger, invoicing, payroll and declaration work, packaged as software the user can run themselves, with a hosted option at app.accounted.se for those who would rather not.

The concrete problem it solves is compliance drift, the gap between what a bookkeeper intends and what the ledger records. Voucher immutability, sequential voucher numbering, period locks and seven-year document retention are enforced by database triggers rather than by convention, and corrections follow audited paths described in the architecture guide. The second problem is unsupervised automation: instead of letting a script write straight into the books, the engine is exposed as 150+ MCP tools and posting is staged for human approval, so an agent proposes and the user decides.

Key capabilities

  • Double-entry bookkeeping on the BAS 2026 chart of accounts, with a draft/commit workflow, sequential voucher numbering, and immutability, period locks and seven-year retention enforced by database triggers.
  • Invoicing with mixed VAT rates and PDF generation, VAT declaration mapped to the SKV 4700 form with per-rate breakdown and EU/export handling, and NE-bilaga, INK2 and SRU exports for Skatteverket.
  • Payroll covering salary runs, payslips and AGI (arbetsgivardeklaration) employer declarations.
  • Bank reconciliation over PSD2 bank feeds with 4-pass automatic matching, supplier invoice registration with input VAT deduction, and betalfil batch payments written as ISO 20022 pain.001 files that render byte-identical on every download.
  • Peppol BIS Billing 3 e-invoicing sent and received through Qvalia, a certified Swedish Access Point, with received documents landing directly in the supplier invoice inbox.
  • Inkorg, a single inbox for receipts, supplier invoices and emailed documents, alongside the Kivra and Billo mailboxes; the document archive carries SHA-256 integrity checks, seven-year retention and full ZIP export.
  • Agent access through 150+ MCP tools with scoped API keys or OAuth 2.1, a Claude connector and plugin with approval-gated skills such as /accounted:bookkeep, /accounted:vat and /accounted:year-end, and a command line installed with npm install -g accounted.

Who uses it and how

  • Sole traders and limited companies that file Swedish declarations, which are the two entity forms the project is explicitly written for.
  • Small teams that want an agent to do the routine work: categorizing transactions, drafting vouchers, reconciling periods and preparing declarations, with every posting staged for a human to approve.
  • Users connecting Claude, ChatGPT, Grok, Gemini, Microsoft Copilot Studio or Cursor over OAuth 2.1, or the same skills installed into Codex and Cursor from the Accounted plugin.
  • Operators who run Docker and Supabase themselves to keep the books on their own infrastructure, and those who prefer the hosted service at app.accounted.se.
  • Organizations with an audit trail obligation, where period locks, document retention and audited correction paths matter more than convenience.

Getting started

Self-hosting is documented in docs/SELF-HOSTING.md and runs on Docker with Supabase, while the hosted version is available at app.accounted.se. The command line client installs with npm install -g accounted and runs every tool from a terminal, a script or a coding agent's shell under the same permissions and staged approvals.

How it compares

The supplied facts name no comparable accounting or ERP product, so Accounted stands alone in this registry rather than being contrasted against a named alternative. What is on the record is its shape: AGPL-3.0-or-later licensing, a fully self-hostable Docker and Supabase deployment, and a hosted option at app.accounted.se for teams that do not want to operate it.

When to use it — and when not to

A self-hoster takes on Docker and Supabase, and still depends on third parties for PSD2 bank feeds, Peppol traffic through Qvalia, the Kivra and Billo mailboxes and BankID signing, so it is not an entirely single-vendor setup. It is a poor fit for anyone outside Sweden, since the chart of accounts, VAT mapping, AGI declarations, SIE exchange and BankID signing are all bound to Swedish law and Swedish counterparties, and the AGPL-3.0-or-later licence will not suit teams that need to embed the code in a proprietary product. The project also carries 170 open issues against roughly 500 stars, and the README excerpt supplied here breaks off mid-sentence in its agent skills section, so the documentation should be read before committing.

project readme (upstream, from github) — read inline

Accounted

Open-source Swedish accounting software for sole traders (enskild firma) and limited companies (aktiebolag). Double-entry bookkeeping that complies with Swedish accounting law, built to be operated by you or by your AI agent.

License: AGPL-3.0-or-later Docker

Use Accounted · Self-host · Documentation · What's new · Contribute

Why Accounted?

Compliant by construction. Accounted implements double-entry bookkeeping under Swedish accounting law (Bokföringslagen). Voucher immutability, sequential voucher numbering, period locks, and 7-year document retention are enforced by database triggers, not by convention. See the architecture guide for the engine, enforcement, and audited correction paths.

Agent-native. The full bookkeeping engine is exposed as 150+ MCP (Model Context Protocol) tools with scoped API keys or OAuth, so an AI agent can do the books in Accounted: categorize transactions, draft vouchers, reconcile periods, and prepare declarations. Posting is staged for human approval, so the agent proposes and you decide.

Yours to run. AGPL-3.0 licensed and fully self-hostable with Docker and Supabase. Use the hosted version at app.accounted.se or run your own.

Features

  • Double-entry bookkeeping: BAS 2026 chart of accounts, draft/commit workflow, sequential voucher numbering
  • Invoicing: Create, send, and track invoices with mixed VAT rates and PDF generation
  • Bank reconciliation: PSD2 bank feeds, 4-pass automatic matching
  • VAT declaration: SKV 4700 form mapping, per-rate breakdown, EU/export handling
  • Tax reports: NE-bilaga, INK2, SRU export for Skatteverket
  • Payroll: Salary runs, payslips, and AGI (arbetsgivardeklaration) employer declarations
  • Supplier invoices: Registration, payment tracking, input VAT deduction
  • Supplier payment files (betalfil): Batch supplier payments into ISO 20022 pain.001 files for upload to the bank, rendered byte-identical on every download
  • E-invoicing (Peppol): Send and receive Peppol BIS Billing 3 e-invoices through Qvalia, a certified Swedish Access Point; received documents land in the supplier invoice inbox
  • Skattekonto: Tax account transactions synced from Skatteverket or imported from statement files, linked to the booked 1630 movements for reconciliation
  • Document archive: SHA-256 integrity, 7-year retention enforcement, full archive ZIP export
  • Inkorg: One inbox for receipts, supplier invoices and emailed documents; an invoice and its receipt become one purchase, booked in one step
  • Digital mailboxes: Kivra and Billo: read incoming mail into the Inkorg, send invoices and payslips
  • Document signing: Send a PDF for signing with BankID; every signature gets a signeringsbevis
  • SIE import/export: Standard Swedish accounting interchange format
  • Agent access (MCP): 150+ bookkeeping tools over the Model Context Protocol, with scoped API keys and staged approvals; connects to Claude, ChatGPT, Grok, Gemini, Microsoft Copilot Studio and Cursor over OAuth 2.1
  • Claude connector and plugin: Connect Claude.ai or Claude Code over OAuth 2.1 and install approval-gated workflow skills (/accounted:bookkeep, /accounted:vat, /accounted:year-end, ...) from the Accounted plugin; the same plugin installs in Codex and Cursor
  • Command line: npm install -g accounted runs every tool from a terminal, a script or a coding agent's shell, with the same permissions and staged approvals
  • Extension system: Opt-in plugins for AI document extraction, bank sync, email, calendar, and more

Agent skills

Accounted's workflows and its Swedish accounting knowledge ship as Agent Skills: folders with a SKILL.md that Claude Code, Codex, Cursor, OpenClaw and other agents load when the task calls for them. There are three sets.

Bookkeeping flows

The Accounted plugin bundles the MCP connection with these flows. Each one works from the company's live data and stages every write for your approval. They need an Accounted account, hosted or self-hosted; the sign-in screen creates one.

Skill What it does
start Connect, orient, and surface what needs attention
start-company Start a new aktiebolag: interview, documents, verksamt.se, setup after registration
bookkeep Clear unbooked bank transactions and receipts
check Read-only health check with a prioritized fix list
month-close Close the month against the product's checklist
vat Prepare and reconcile the momsdeklaration
payroll Monthly salary run and AGI underlag
year-end Bokslut, readiness-gated
clients Every company on the connection in one table; run one task for all of them
# Claude Code
/plugin marketplace add erp-mafia/accounted
/plugin install accounted@accounted

# Codex, then install "accounted" from the plugin list
codex plugin marketplace add erp-mafia/accounted

Cursor and every other MCP client: see the plugin README.

Integration skills

For building against Accounted, or driving it from a shell. They live in skills/.

Skill What it does
accounted-api Build against the REST API: auth, conventions and every endpoint
accounted-cli Work in the books from a shell with the accounted command
accounted-gather Find and upload the documents the archive says are missing
accounted-start-company Start a Swedish aktiebolag: the verksamt.se steps, the board and naming rules, and what to file after registration
openapi-to-skill Turn any OpenAPI spec into an agent skill
npx skills add erp-mafia/accounted --skill accounted-api

Add -a codex, -a cursor, -a openclaw or another agent name to choose where the skill is installed.

Swedish accounting knowledge

Reference skills on Swedish bookkeeping law, tax and reporting. They are MIT licensed, work without an Accounted account, and are published in erp-mafia/accounted-skills. An agent connected to Accounted loads the current versions with accounted_load_skill.

Skill Covers
swedish-accounting-compliance BFL, BFNAR, BAS kontoplan, K2/K3, verifikationer, bokföringsskyldighet
swedish-asset-accounting Anläggningsredovisning, planenlig avskrivning and överavskrivning, BAS 10xx-12xx/78xx
swedish-cash-register Kassaregister, personalliggare, dagskassor, kassadifferens, dricks, presentkort
swedish-daily-bookkeeping Kontering of everyday transactions: payment providers, foreign purchases, skattekonto, owner transactions, receipts
swedish-e-invoicing Peppol BIS Billing 3, EN 16931, the B2G mandate, Swedish CIUS rules, ViDA
swedish-ef-skatteplanering Enskild firma: räntefördelning, expansionsfond, egenavgifter, NE-bilaga, EF vs AB
swedish-financial-reporting Årsredovisning, Bolagsverket filing, INK2/INK2R/INK2S, noter
swedish-inventory Varulager: lägsta värdets princip, FIFU, inkurans, inventering
swedish-invoice-compliance Mandatory invoice fields (ML 17 kap), kreditfaktura, ROT/RUT, reverse charge
swedish-k3-k4-judgment K3 (BFNAR 2012:1) in depth, K4 at a high level, switching from K2 to K3
swedish-payroll AGI, arbetsgivaravgifter, skatteavdrag, förmånsbeskattning, semesterlöneskuld, BAS 7xxx
swedish-project-accounting Projektredovisning, pågående arbeten, revenue recognition under K2 and K3, SIE dimensions
swedish-sie-import-export SIE4 parsing, validation, generation, encoding
swedish-sru-filing SRU files for Skatteverket (INFO.SRU and BLANKETTER.SRU), INK2 field codes
swedish-tax-planning Aktiebolag: periodiseringsfond, överavskrivningar, koncernbidrag, 3:12-reglerna
swedish-travel-expenses Tjänsteresor: traktamente, milersättning, logi, tremånadersregeln
swedish-vat Momsdeklaration rutor, EU VAT, reverse charge, BAS 26xx, ML 2023:200
swedish-year-end-closing Bokslut for AB and enskild firma, closing entries, tax provisions, filing
npx skills add erp-mafia/accounted-skills                      # choose from the list
npx skills add erp-mafia/accounted-skills --skill swedish-vat  # one skill

Self-Hosting

git clone https://github.com/erp-mafia/accounted.git
cd accounted
./docker/setup.sh       # Prompts for Supabase credentials, generates .env
docker compose up -d

You need a Supabase project and must apply the database migrations before first use. See docs/SELF-HOSTING.md for the full step-by-step guide, including Supabase setup, auth configuration, optional features (AI, email), and troubleshooting. To run everything on Swedish infrastructure (your own Supabase stack, Swedish hosting, AI on Swedish GPUs), see docs/SOVEREIGN.md.

Development Setup

Prerequisites: Node.js 20 or newer (CI and the hosted app run Node 24; the Docker image ships Node 22), Docker, and the Supabase CLI. No Supabase account is needed.

npm install
npm run local:up    # Local Supabase with every migration applied, a user and a company, and the dev server
npm run local:down  # Stop it and delete its data
npm test            # Run tests
npm run build       # Production build
npm run lint        # ESLint

npm run local:up prints the URL to open and the login to use. A start takes several minutes: it downloads the Supabase images the first time and applies every migration. It will not start in a checkout that has a .env, .env.local or .env.development file, because the dev server would load the keys in them. Add -- --sim for a company with three years of example books.

To develop against a Supabase project of your own instead, see the contributing guide, which also covers the full development workflow.

Tech Stack

  • Framework: Next.js 16 (App Router), React 19, TypeScript (strict)
  • Database: Supabase (PostgreSQL + Row Level Security + email/password auth + TOTP MFA)
  • Styling: Tailwind CSS 4 + shadcn/ui
  • Integrations: bank feeds over PSD2 (Enable Banking, or Open Payments through Accounted Connect), Qvalia (Peppol), Skatteverket, Kivra and Billo (digital mailboxes), Anthropic SDK on Amazon Bedrock (eu-north-1; direct Anthropic or any OpenAI-compatible endpoint for self-hosted via the Vercel AI SDK), Resend, JSZip

The Kivra and Billo integrations are Accounted's own code, built on the providers' public developer documentation. They are not official Kivra or Billo products, and neither provider supports them or answers for their security. Running them takes your own agreement and credentials with each provider.

Repository map

Path Purpose
src/ Application routes, components, accounting services, translations, and extensions
packages/ MCP bridges, the accounted command-line client, connector contract, and the agent plugin (Claude Code, Codex, Cursor)
supabase/ Database configuration and migration history
tests/ Shared fixtures, database suites, and cross-cutting tests; unit tests also live beside their code
scripts/, docker/ Development tools and self-hosting internals
docs/ Architecture, hosting, and operations

packs/ holds bookkeeping templates, registry/ holds community content, and skills/ holds installable agent skills. These are maintained inputs, not generated build folders.

Documentation

The documentation index groups the repository guides by task.

Community

Contributing

Contributions are welcome. See contributing guide for the full guide.

Your first pull request asks you to accept the Contributor License Agreement once; the bot links it.

License

AGPL-3.0-or-later. See NOTICE for third-party attributions.

gnubok - Swedish bookkeeping software
Copyright (C) 2025-2026 Jakob Wennberg

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

If the AGPL's obligations don't work for you, for example because you want to embed Accounted in a closed product, contact us at support@accounted.se for a commercial license from Arcim Technology AB.

The name Accounted and the Accounted logo are trademarks of Arcim Technology AB and are not covered by the AGPL: a modified version you offer to others needs its own name. See TRADEMARK.md.

Frequently asked questions

Is accounted free to use?

accounted is open source under the AGPL-3.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does accounted do?

The Open Source ERP Built for Agents

What is accounted written in?

accounted is primarily written in TypeScript. Its source is publicly available at https://github.com/erp-mafia/accounted, and it has 504 GitHub stars.