Get started
Set up Ekwo for 中国
Two ways in, and both end the same way: the rules of 中国 installed in a database you own.
Run it yourself
Free, for ever. One command on your own Supabase project applies the schema, installs the 中国 pack and creates your first company. Nothing is gated.
npx ekwo-os init --country CNIt asks for the rest as it goes: the connection to your project, the chart of accounts where there is a choice, your organisation and your first administrator.
Create your Ekwo Cloud account
The hosted edition, operated for you: the web application and your own instance. No password — Ekwo Cloud sends a code to your address.
Step by step
The same path as text: every command with 中国 already on it, and the codes a first invoice is written with. An AI agent helping you reads the same text as Markdown, at /countries/cn/set-up.md.
Ekwo OS is open source software for keeping double-entry books in a database you own. This page is generated from the 中国 pack, version 0.1.0; every code on it is read from the pack.
The 中国 pack is community: contributed, and reviewed by nobody.
Ekwo is software, not an accountant and not tax advice: a pack is a reading of the rules at the date of its version, and it can be wrong for your situation. Have a qualified professional in 中国 check your set-up and your first declarations. See what Ekwo is, and what it is not.
1. What you need
- A Supabase project of your own. The free plan is enough to start; Ekwo does not create it, pay for it or have access to it.
- From its dashboard: the connection string (Connect → Session pooler), the Project URL and the
service_rolekey (Project Settings → API). The key is used once, to create your first administrator, and is written nowhere. The anon (publishable) key, on the same page, is what you sign in with afterwards. - Node 20 or later on your machine. Nothing else: no Supabase CLI, no Docker, no clone.
2. Install
One command. It asks for the rest as it goes.
npx ekwo-os init --country CN
- One chart of accounts: 企业会计准则 会计科目(节选)— Accounts of the Accounting Standards for Business Enterprises, abridged, 156 accounts.
- The books can be kept in
zh,en; the installer asks. Without a terminal, pass--language <code>. - The 增值税及附加税费申报表(一般纳税人适用) — VAT and surcharges return, general taxpayer, main table is filed on one of these cadences:
month,quarter. Pass--vat-period <cadence>to set yours. - A financial year follows the calendar unless you pass
--fiscal-year-start YYYY-MM-DD.
The same, with no question asked — every value your own:
npx ekwo-os init \
--country CN \
--language zh \
--vat-period <month|quarter> \
--db-url "postgresql://postgres.<ref>:<password>@<pooler host>:5432/postgres" \
--supabase-url "https://<ref>.supabase.co" \
--service-role-key "$SUPABASE_SERVICE_ROLE_KEY" \
--org "Your Organisation" --company "Your Company" \
--admin-email "you@example.com" \
--yes
3. Before you go live
Four settings of your project no installer can reach: turn off self sign-up, keep two administrators, keep the service_role key off every other machine, and read the disclaimer. init prints them; the installation guide explains each.
4. A first invoice
Sign in as the administrator you just created, pick the company, and write a draft. --dry-run shows the entry the database would write, and writes nothing; post books it.
ekwo login --supabase-url https://<ref>.supabase.co --anon-key <publishable key> --email you@example.com
ekwo use "Your Company"
ekwo contact add "First Customer" --country CN --ref customer-1
ekwo doc new --contact "First Customer" --ref invoice-1 --line "name=Consulting,price=1000.00,account=6001,tax=CN-S-13-G"
ekwo post invoice-1 --dry-run
ekwo post invoice-1
A line names its account and its tax by code, never by rate. 6001 is the account the pack names for sales; the chart may carry a closer one for what you sell — services, a reduced rate — and list_accounts lists them.
What the invoice says about your company — its address, its VAT number — comes from the company’s profile, which the MCP tool update_company_profile fills; ekwo init sets only the name.
The domestic sale taxes the pack carries today. Which one a sale carries is a question about that sale, for you or your accountant: the list is the pack’s, not advice.
| Tax code | Name | Rate |
|---|---|---|
CN-S-13-G |
销售货物 13% | 13 % |
CN-S-13-S |
加工修理修配、有形动产租赁 13% | 13 % |
CN-S-9-G |
销售货物 9% | 9 % |
CN-S-9-S |
交通运输、邮政、基础电信、建筑、不动产 9% | 9 % |
CN-S-6 |
销售服务、无形资产 6% | 6 % |
CN-S-3-SIMPLE |
简易计税 3%(一般纳税人) | 3 % |
CN-S-SS-3 |
小规模纳税人 3% | 3 % |
5. With an AI agent
The MCP server lets an agent keep the books as you, under your own row level security, and never with the service_role key. Configuring it, and what an agent must and must not do.
What the 中国 pack carries
- Charts of accounts: 企业会计准则 会计科目(节选)— Accounts of the Accounting Standards for Business Enterprises, abridged (156).
- 23 taxes, at 0 %, 1 %, 3 %, 6 %, 9 %, 13 %.
- The 增值税及附加税费申报表(一般纳税人适用) — VAT and surcharges return, general taxpayer, main table (
CN-VAT-GENERAL), 17 boxes, filed month, quarter. - Financial statements: 资产负债表(会企01表)— Balance sheet, 利润表(会企02表)— Income statement.
What it does not do
- No library of this repository writes the file of the CN-VAT-GENERAL yet: the return is computed and frozen here, and typed on the administration’s portal.
- Nothing is sent to an administration, a Peppol network or a bank by the open source software: transmission is yours, or an operator’s you appoint.
- What the pack leaves out on purpose is in its README.