How ekwo-ai/ekwo-os works
Ekwo OS is self-hosted accounting and tax data infrastructure built around a Postgres/Supabase accounting core, with CLI installation and operations, an MCP interface for people and AI agents, country-rule packs, and independent financial-format libraries. The principal workflow is to install and configure a database, load country rules, then use tools to create or read accounting records and prepare reports. The README documents the database capabilities and supported format families; source excerpts show selected CLI, MCP, and format implementations, so unsampled runtime connections are not asserted.
Main entry points: init.ts CLI commands · pack.ts Pack operations · server.ts MCP server · backend.ts Accounting schema
Components 22
Setup and packs
- CLI commands
packages/cli/src/commands/init.ts - Connection context
packages/cli/src/context.ts - Pack reader
packages/cli/src/pack/read.ts - Pack compiler
packages/cli/src/pack/compile.ts - Pack operations
packages/cli/src/commands/pack.ts - Country rule packs
packages/cli/src/pack/read.ts
Accounting core
- Supabase Postgres
- Accounting schema
packages/core/src/books/backend.ts - Documents and entries
packages/core/src/books/documents.ts - Book imports
packages/core/src/books/imports.ts - Accounting client
packages/core/src/client.ts
Agent interface
- MCP server
packages/mcp/src/server.ts - Database backend
packages/mcp/src/backend.ts - Read and reports
packages/mcp/src/tools/read.ts - Write operations
packages/mcp/src/tools/write.ts - Module tools
packages/mcp/src/tools/modules.ts
Financial formats
- Format libraries
packages/formats - Bank statement readers
packages/formats/coda/src/index.ts - VAT and journal formats
packages/formats/vat-consignment/src/index.ts - French FEC format
packages/formats/fec/src/index.ts
Other components
- Business operator
- AI agent or user
Connections 25
- Business operator → CLI commands: runs setup
- CLI commands → Connection context: opens connection
packages/cli/src/context.ts - CLI commands → Supabase Postgres: installs schema
- CLI commands → Pack operations: manages packs
packages/cli/src/commands/pack.ts - Pack operations → Pack reader: reads packs
packages/cli/src/commands/pack.ts - Pack operations → Pack compiler: compiles packs
packages/cli/src/commands/pack.ts - Pack reader → Country rule packs: loads rules
packages/cli/src/pack/read.ts - Pack compiler → Pack reader: reads pack data
packages/cli/src/pack/compile.ts - Pack operations → Supabase Postgres: checks loaded packs
packages/cli/src/commands/pack.ts - Supabase Postgres → Accounting schema: exposes accounting API
- Accounting schema → Documents and entries: enforces posting
packages/core/src/books/documents.ts - Documents and entries → Accounting schema: writes ledger
packages/core/src/books/documents.ts - Accounting client → Supabase Postgres: calls accounting RPCs
packages/core/src/client.ts - AI agent or user → MCP server: invokes tools
- MCP server → Read and reports: registers reads
packages/mcp/src/server.ts - MCP server → Write operations: registers writes
packages/mcp/src/server.ts - MCP server → Module tools: registers modules
packages/mcp/src/server.ts - Read and reports → Database backend: queries through
packages/mcp/src/tools/read.ts - Write operations → Database backend: writes through
packages/mcp/src/tools/write.ts - Database backend → Supabase Postgres: accesses database
packages/mcp/src/backend.ts - AI agent or user → Format libraries: uses format packages
- Format libraries → Bank statement readers: includes readers
packages/formats/coda/src/index.ts - Format libraries → VAT and journal formats: includes reporting formats
packages/formats/vat-consignment/src/index.ts - Accounting client → French FEC format: generates FEC
packages/core/src/client.ts - Book imports → Accounting schema: imports book data
packages/core/src/books/imports.ts