ekwo-os 0.4.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +149 -17
  2. package/dist/assets/expected-objects.json +411 -4
  3. package/dist/assets/migrations/20260919090000_a_posted_row_is_undone_in_one_gesture.sql +691 -0
  4. package/dist/assets/migrations/20260919190727_what_has_not_left_goes_back_to_draft.sql +817 -0
  5. package/dist/assets/migrations/20260921084142_filing_deadline_rule_depends_on_taxpayer.sql +23 -0
  6. package/dist/assets/migrations/20260921084143_a_silence_the_pack_states.sql +80 -0
  7. package/dist/assets/migrations/20260921145411_three_cadences_more.sql +21 -0
  8. package/dist/assets/migrations/20260921145412_a_cadence_of_any_months_and_a_box_at_its_unit.sql +440 -0
  9. package/dist/assets/migrations/20260921145425_a_supply_measured_against_its_seller.sql +1620 -0
  10. package/dist/assets/migrations/20260922072635_schema_version_0_5_0.sql +41 -0
  11. package/dist/assets/migrations/20260922081645_books_taken_over_from_an_export.sql +410 -0
  12. package/dist/assets/migrations/20260922091348_schema_version_0_6_0.sql +37 -0
  13. package/dist/assets/seed/00_currencies.sql +25 -2
  14. package/dist/assets/seed/00_territories.sql +455 -19
  15. package/dist/assets/seed/10_pack_be.sql +31 -26
  16. package/dist/assets/seed/11_pack_fr.sql +143 -39
  17. package/dist/assets/seed/12_pack_lu.sql +58 -43
  18. package/dist/assets/seed/13_pack_ee.sql +49 -34
  19. package/dist/assets/seed/14_pack_gb.sql +39 -30
  20. package/dist/assets/seed/15_pack_us.sql +33 -19
  21. package/dist/assets/seed/16_pack_ie.sql +958 -0
  22. package/dist/assets/seed/17_pack_nl.sql +1017 -0
  23. package/dist/assets/seed/18_pack_de.sql +826 -0
  24. package/dist/assets/seed/19_pack_es.sql +1120 -0
  25. package/dist/assets/seed/20_pack_sn.sql +1996 -0
  26. package/dist/assets/seed/21_pack_ci.sql +1984 -0
  27. package/dist/assets/seed/22_pack_bj.sql +1977 -0
  28. package/dist/assets/seed/23_pack_bf.sql +1990 -0
  29. package/dist/assets/seed/24_pack_cm.sql +1970 -0
  30. package/dist/assets/seed/25_pack_cf.sql +1964 -0
  31. package/dist/assets/seed/26_pack_km.sql +2001 -0
  32. package/dist/assets/seed/27_pack_cg.sql +1981 -0
  33. package/dist/assets/seed/28_pack_ga.sql +2003 -0
  34. package/dist/assets/seed/29_pack_gn.sql +1967 -0
  35. package/dist/assets/seed/30_pack_gw.sql +1997 -0
  36. package/dist/assets/seed/31_pack_gq.sql +1989 -0
  37. package/dist/assets/seed/32_pack_ml.sql +1988 -0
  38. package/dist/assets/seed/33_pack_ne.sql +1985 -0
  39. package/dist/assets/seed/34_pack_cd.sql +1980 -0
  40. package/dist/assets/seed/35_pack_td.sql +1996 -0
  41. package/dist/assets/seed/36_pack_tg.sql +1988 -0
  42. package/dist/assets/seed/37_pack_it.sql +660 -0
  43. package/dist/assets/seed/40_pack_au.sql +729 -0
  44. package/dist/assets/seed/41_pack_nz.sql +661 -0
  45. package/dist/assets/seed/42_pack_mx.sql +891 -0
  46. package/dist/assets/seed/43_pack_pt.sql +701 -0
  47. package/dist/assets/seed/50_pack_sg.sql +773 -0
  48. package/dist/assets/seed/51_pack_jp.sql +887 -0
  49. package/dist/assets/seed/52_pack_hk.sql +448 -0
  50. package/dist/assets/seed/53_pack_tw.sql +559 -0
  51. package/dist/assets/seed/54_pack_kr.sql +604 -0
  52. package/dist/assets/seed/55_pack_vn.sql +556 -0
  53. package/dist/assets/seed/56_pack_th.sql +579 -0
  54. package/dist/assets/seed/60_pack_ae.sql +588 -0
  55. package/dist/assets/seed/62_pack_ch.sql +595 -0
  56. package/dist/assets/seed/63_pack_at.sql +644 -0
  57. package/dist/assets/seed/64_pack_pl.sql +698 -0
  58. package/dist/assets/seed/71_pack_sa.sql +620 -0
  59. package/dist/assets/seed/modules/assets/10_pack_be.sql +1 -1
  60. package/dist/assets/seed/modules/assets/11_pack_fr.sql +1 -1
  61. package/dist/assets/seed/modules/assets/14_pack_gb.sql +1 -1
  62. package/dist/assets/seed/modules/assets/15_pack_us.sql +1 -1
  63. package/dist/cli.d.ts +1 -1
  64. package/dist/cli.d.ts.map +1 -1
  65. package/dist/cli.js +80 -15
  66. package/dist/cli.js.map +1 -1
  67. package/dist/commands/document.d.ts +19 -5
  68. package/dist/commands/document.d.ts.map +1 -1
  69. package/dist/commands/document.js +75 -17
  70. package/dist/commands/document.js.map +1 -1
  71. package/dist/commands/entry.d.ts +14 -0
  72. package/dist/commands/entry.d.ts.map +1 -0
  73. package/dist/commands/entry.js +34 -0
  74. package/dist/commands/entry.js.map +1 -0
  75. package/dist/commands/import.d.ts +34 -0
  76. package/dist/commands/import.d.ts.map +1 -0
  77. package/dist/commands/import.js +228 -0
  78. package/dist/commands/import.js.map +1 -0
  79. package/dist/commands/init.d.ts +1 -1
  80. package/dist/commands/init.d.ts.map +1 -1
  81. package/dist/commands/init.js +13 -0
  82. package/dist/commands/init.js.map +1 -1
  83. package/dist/commands/pack.d.ts +3 -2
  84. package/dist/commands/pack.d.ts.map +1 -1
  85. package/dist/commands/pack.js +186 -6
  86. package/dist/commands/pack.js.map +1 -1
  87. package/dist/index.d.ts +2 -1
  88. package/dist/index.d.ts.map +1 -1
  89. package/dist/index.js +2 -1
  90. package/dist/index.js.map +1 -1
  91. package/dist/output.d.ts.map +1 -1
  92. package/dist/output.js +4 -3
  93. package/dist/output.js.map +1 -1
  94. package/dist/pack/compile.js +42 -10
  95. package/dist/pack/compile.js.map +1 -1
  96. package/dist/pack/describe.d.ts +267 -0
  97. package/dist/pack/describe.d.ts.map +1 -0
  98. package/dist/pack/describe.js +203 -0
  99. package/dist/pack/describe.js.map +1 -0
  100. package/dist/pack/filing.d.ts +6 -1
  101. package/dist/pack/filing.d.ts.map +1 -1
  102. package/dist/pack/filing.js +6 -1
  103. package/dist/pack/filing.js.map +1 -1
  104. package/dist/pack/lists.d.ts +44 -0
  105. package/dist/pack/lists.d.ts.map +1 -0
  106. package/dist/pack/lists.js +181 -0
  107. package/dist/pack/lists.js.map +1 -0
  108. package/dist/pack/read.d.ts +50 -9
  109. package/dist/pack/read.d.ts.map +1 -1
  110. package/dist/pack/read.js +124 -5
  111. package/dist/pack/read.js.map +1 -1
  112. package/dist/pack/territories.d.ts +17 -0
  113. package/dist/pack/territories.d.ts.map +1 -1
  114. package/dist/pack/territories.js +0 -0
  115. package/dist/pack/territories.js.map +1 -1
  116. package/dist/schema.d.ts +1 -1
  117. package/dist/schema.js +1 -1
  118. package/package.json +3 -3
  119. package/schema/output.1.json +87 -2
package/README.md CHANGED
@@ -112,8 +112,10 @@ the packs the database holds. A preselected country is a chart of accounts
112
112
  nobody chose.
113
113
 
114
114
  The same is true of the financial year: a pack that declares no usual opening
115
- month makes `--fiscal-year-start` required. Both packs shipped here open on the
116
- calendar year, so it rarely comes up.
115
+ month makes `--fiscal-year-start` required. Most packs name the calendar year
116
+ in `defaults.fiscal_year_default`; one that names none — the United Kingdom's,
117
+ where a company's year ends on the accounting reference date it chose — asks
118
+ for the day.
117
119
 
118
120
  ## Where table access comes from
119
121
 
@@ -158,7 +160,7 @@ migrations put the privileges back themselves, and they take away the blanket
158
160
  table access the project's defaults had handed `anon`. Dropping `public` is
159
161
  still not something to do on a project you intend to keep — it takes your books
160
162
  with it. The decision and what it changed are in
161
- [`docs/decisions.md`](../../docs/decisions.md).
163
+ [decision 0003](../../docs/decisions/0003-the-schema-grants-its-own-rights.md).
162
164
 
163
165
  ## Before you go live: four things on your project
164
166
 
@@ -217,7 +219,7 @@ and read by a person.
217
219
  | Step | What happens | Why it is done this way |
218
220
  |---|---|---|
219
221
  | 1 | Applies `supabase/migrations/*.sql` in order | Recorded in `supabase_migrations.schema_migrations`, the Supabase CLI's own history table, so `supabase db push` and `ekwo migrate` stay interchangeable |
220
- | 2 | Applies the six reference seeds, in file-name order: `00_currencies.sql`, `05_framework_generic.sql`, `10_pack_be.sql`, `11_pack_fr.sql`, `12_pack_lu.sql`, `13_pack_ee.sql` | The currencies, the country-less financial statements every chart falls back on, and the four country packs. They are exactly the six `supabase/config.toml` lists, so `supabase db push` installs the same set; a test compares both paths row by row. `90_demo_company.sql` is sample data and is never applied here |
222
+ | 2 | Applies every reference seed of `supabase/seed/`, in file-name order: `00_currencies.sql`, `00_territories.sql`, `05_framework_generic.sql`, then one `<n>_pack_<cc>.sql` per country pack, in the order of the number each pack declares | The currencies, the territories the tax rules name, the country-less financial statements every chart falls back on, and every country pack of the release so a company in any of them can be created later without installing anything. They are exactly the seeds `supabase/config.toml` lists (a list `ekwo pack build` writes from `packs/`), so `supabase db push` installs the same set; a test compares both paths row by row. `90_demo_company.sql` is sample data and is never applied here |
221
223
  | 3 | Creates the first administrator through the Supabase Auth admin API | See below: a database connection cannot be a signed-in user |
222
224
  | 4 | `init_instance()`, `claim_instance_admin()`, the company, `company_members` as owner, `install_country_template()`, the first financial year, and the bank account when an IBAN was given | The six steps of the root README, in the same order, plus the one thing nobody can derive |
223
225
  | 5 | Writes `ekwo.json` | Project URL, country, schema version. Nothing else, ever |
@@ -248,7 +250,7 @@ instead if the account already exists, and no key is needed.
248
250
 
249
251
  | Command | What it does |
250
252
  |---|---|
251
- | `ekwo init` | The whole installation, interactive or not. |
253
+ | `ekwo init` | The whole installation, interactive or not: the socle's migrations, the reference seeds, then the modules', as `ekwo migrate` applies them. |
252
254
  | `ekwo migrate` | Applies the migrations this release adds, after showing the gap — the socle's, then the modules'. Re-applies the reference seeds, which are idempotent. `--no-modules` leaves the modules alone. |
253
255
  | `ekwo status` | Schema version installed against available, pending migrations, the instance, its administrators, the country packs it holds and, per company, the pack version it copied. Exits 1 when something is pending. |
254
256
  | `ekwo doctor` | Every object this release defines and every privilege it grants, against what the database holds; row level security on every table, a policy on every protected table, no pending migration, no membership pointing at a deleted user, every company with a bank account, statements that tie to their lines, posted entries that balance. Exits 1 on a problem, 0 on warnings. |
@@ -263,10 +265,13 @@ instead if the account already exists, and no key is needed.
263
265
  | `ekwo use <company>` | Picks the company the next commands run on. |
264
266
  | `ekwo whoami` | Who you are on which instance, the companies you can see, and what you may do on the one in use. |
265
267
  | `ekwo contact add` / `list` | A customer or a supplier, and finding one again. |
266
- | `ekwo invoice new` / `invoice line add` | A draft document — any kind, with `--type` — and one more line on it. A draft books nothing. |
268
+ | `ekwo doc new` / `doc line add` | A draft document — any kind, with `--type` — and one more line on it. A draft books nothing. `ekwo invoice` is the old name of `ekwo doc`, kept as an alias. |
267
269
  | `ekwo post <document>` | Books it, through `post_document()`. `--dry-run` shows the entry the database would write and writes nothing. |
270
+ | `ekwo cancel <document>` | Undoes a posted invoice, and says how. Back to draft, through `unpost_document()`, where its country allows it and nothing about it has left; otherwise through `cancel_document()`: the credit note that names it, posted and matched against it, and the invoice cancelled. `--date` books the credit note on another day than the invoice's, which is how a locked period is stepped over; `--credit` asks for the note where a draft was possible. |
271
+ | `ekwo reverse <entry>` | Undoes a posted entry keyed by hand, through `reverse_entry()`: its mirror, posted and matched against it. By id or by number; `--date` as for `cancel`. |
268
272
  | `ekwo payment record` | Money in or out, booked and matched. With `--doc`, against that document. |
269
273
  | `ekwo match <transaction> <document>` | A bank statement line pays a document, through `settle_from_statement()`. |
274
+ | `ekwo import <source> <file>…` | Books kept elsewhere — `trial-balance`, `fec`, `journal-items`, `journal-report` — whole or not at all, through `import_books()`, with a correspondence of accounts and journals you save and give back; or a bank statement — `camt.053`, `coda`, `cfonb120` — as pending lines. `--dry-run` rehearses. See [taking over books](#taking-over-books-ekwo-import). |
270
275
  | `ekwo doc list` / `show` | What exists, and with `--unpaid` what is posted and still owed. See [keeping books](#keeping-books). |
271
276
 
272
277
  There is no `eject`, because there is nothing to eject from. The schema is in
@@ -280,6 +285,10 @@ a terminal and never when `NO_COLOR` is set, no spinner and no line redrawn in
280
285
  place, so the output reads the same in a file or a CI log — and takes `--json`
281
286
  for a program.
282
287
 
288
+ `ekwo help --json` answers the list of commands and, in `usage`, the whole
289
+ text of `--help` without colour: every flag and variable, for an assistant
290
+ that reads one document rather than a terminal.
291
+
283
292
  Under `--json` the standard output is **one JSON document and nothing else**;
284
293
  the prose still goes by, on the standard error. The document has the same
285
294
  shape whatever happened:
@@ -423,11 +432,12 @@ them as it reads a driver's.
423
432
 
424
433
  ```bash
425
434
  ekwo contact add "Client Example" --country <cc> --ref crm-42
426
- ekwo invoice new --contact client --date 2026-06-15 --ref job-7 \
435
+ ekwo doc new --contact client --date 2026-06-15 --ref job-7 \
427
436
  --line "name=Audit,price=1500.00,account=<account code>,tax=<tax code>"
428
- ekwo invoice line add job-7 --name Travel --price 250.00 --account <account code>
437
+ ekwo doc line add job-7 --name Travel --price 250.00 --account <account code>
429
438
  ekwo post job-7 --dry-run # the entry the database would write; nothing is written
430
439
  ekwo post job-7 # post_document()
440
+ ekwo cancel job-7 # back to draft where the country allows it, else the credit note
431
441
  ekwo payment record --doc job-7 --amount 1750.00 --date 2026-06-30 --bank-account <id> --ref bank-1
432
442
  ekwo match <bank transaction id> job-9
433
443
  ekwo doc list --unpaid --since 2026-06-01 --json
@@ -439,8 +449,9 @@ and none is ever picked for you: with no company in use a verb ends on
439
449
 
440
450
  **Each verb is one function, and it is not ours.** The functions live in
441
451
  `@ekwo-ai/core` and the MCP server calls the same ones: `contact add` is
442
- `create_contact`, `invoice new` is `create_document`, `post` is
443
- `post_document`, `payment record` is `record_payment`, `doc list` and
452
+ `create_contact`, `doc new` is `create_document`, `post` is
453
+ `post_document`, `cancel` is `unpost_document` or `cancel_document` `unpost_refusal` chooses —, `reverse` is `reverse_entry`,
454
+ `payment record` is `record_payment`, `doc list` and
444
455
  `doc show` are `list_documents` and `get_document`. Underneath them the rules
445
456
  are the schema's — the balance, the numbering, the locks, the taxes, the
446
457
  territory, the tax point. **This CLI computes no amount**: what you type goes
@@ -456,7 +467,7 @@ not a draft, a document with nothing open — is exit code 2: the call has to
456
467
  change.
457
468
 
458
469
  **`--ref`, so that nothing is created twice.** On what creates (`contact add`,
459
- `invoice new`, `payment record`), `--ref <your reference>` is kept on the row,
470
+ `doc new`, `payment record`), `--ref <your reference>` is kept on the row,
460
471
  unique per company. The same reference a second time returns what the first
461
472
  call created, with `"replayed": true`, and writes nothing — and finishes what
462
473
  a dropped connection left half done: a draft whose lines never arrived, a
@@ -481,7 +492,7 @@ given beside it win.
481
492
  ```bash
482
493
  echo '{"contact":"client","document_date":"2026-06-15","client_ref":"job-8",
483
494
  "lines":[{"name":"Review, \"urgent\"","unit_price":"200.00","account_code":"<code>"}]}' \
484
- | ekwo invoice new --stdin --json
495
+ | ekwo doc new --stdin --json
485
496
  ```
486
497
 
487
498
  **`--line`, for a person.** Named fields, never positions: `name`, `price`,
@@ -496,6 +507,100 @@ Two values are supplied when nobody gives them, and said when they are:
496
507
  `--type` is `sale_invoice`, and `--date` is today on the machine running the
497
508
  command. Whether that date may be booked on is the database's decision.
498
509
 
510
+ ## Taking over books: `ekwo import`
511
+
512
+ To try Ekwo on your own books, bring them. One command, one reader per
513
+ source, and nothing is posted while an account has no answer:
514
+
515
+ ```bash
516
+ ekwo import fec 123456789FEC20251231.txt --dry-run --open-years --save-mapping map.json
517
+ # read, propose a correspondence, rehearse the import in the database, take it back
518
+ $EDITOR map.json # answer what is null, correct what is wrong
519
+ ekwo import fec 123456789FEC20251231.txt --mapping map.json --open-years
520
+ ekwo import trial-balance balance.csv --opening-date 2026-01-01 --dry-run --save-mapping map.json
521
+ ekwo import journal-items items.csv accounts.csv partners.csv --dry-run --save-mapping map.json
522
+ ekwo import journal-report report.csv chart.csv --date-order dmy --dry-run --save-mapping map.json
523
+ ekwo import camt.053 statement.xml # or coda, cfonb120: pending lines for `ekwo match`
524
+ ```
525
+
526
+ | Source | What it reads |
527
+ |---|---|
528
+ | `trial-balance` | A trial balance as CSV — `account`, `debit`, `credit`, or one signed `balance` — which becomes the opening entry of the year `--opening-date` starts |
529
+ | `fec` | A *fichier des écritures comptables*: the eighteen columns of the arrêté of 29 July 2013, tab or bar separated |
530
+ | `journal-items` | The lines of every entry exported as CSV from the list view of an ERP whose ledger is a table of lines, with the chart of accounts and the partners exported beside it |
531
+ | `journal-report` | A journal report or a general ledger detail, saved as CSV from a cloud service's spreadsheet export, with its Journal ID and Account Code columns, and the chart and the contacts beside it |
532
+ | `camt.053`, `coda`, `cfonb120` | A bank statement: its lines, pending, ready for `ekwo match` |
533
+
534
+ Each reader is a brick of [`packages/formats/`](../formats/README.md), named
535
+ after the file; its README says which columns it reads and which official
536
+ pages the format was read from. The exports of other ledgers can also be named
537
+ by the software they come from: `ekwo import --help` lists those names, and
538
+ [`docs/compatibility.md`](../../docs/compatibility.md) gives each one's export,
539
+ official page and state.
540
+
541
+ **The correspondence is yours.** Every account of the old chart has to become
542
+ an account of the company's chart, and every old journal a journal of the
543
+ company. The core proposes, from the codes alone — the same code, the same
544
+ digits without the zeros a chart pads with (`411` and `411000`), or the
545
+ account whose digits are the longest beginning of the old code, three at least
546
+ (`401ACME` → `401000`); a tie is no answer — and each proposal says which rule
547
+ found it. `--save-mapping` writes it as JSON:
548
+
549
+ ```json
550
+ {
551
+ "version": 1,
552
+ "source": "fec",
553
+ "accounts": { "411000": "411000", "401ACME": "401000", "471200": null },
554
+ "journals": { "VE": "SAL", "AN": "@opening", "BQ1": "MISC" }
555
+ }
556
+ ```
557
+
558
+ and `--mapping` gives it back: what it answers wins over the proposal, so the
559
+ second run posts what the first one showed. A journal mapped to `@opening`
560
+ becomes the opening entry of its year instead of ordinary entries — the
561
+ *à-nouveaux* of a FEC, typically. A journal whose code is the one the pack
562
+ opens years on is proposed as `@opening` on its own; `*` stands for entries
563
+ the source gives no journal.
564
+
565
+ **Whole or not at all.** `import_books()` is one call and one transaction: the
566
+ fiscal years it needs (with `--open-years`, as years of the same length and
567
+ first day as the company's own; without, an entry outside every year is
568
+ refused by name), the parties the lines name — found by their code or their
569
+ name, or created as customers or suppliers according to where their lines are
570
+ booked — every entry as a draft then posted by `post_entry()`, and the opening
571
+ through `opening_balance()`. One refusal — a locked period, an account the
572
+ chart does not have, a capability you do not hold — and nothing stays, not
573
+ even the years or the parties.
574
+
575
+ **`--dry-run` is the real thing, taken back.** The database runs the whole
576
+ import and rolls it back, so the numbers shown are the ones the entries would
577
+ take now and a refusal is the one the import would give. For a bank statement a
578
+ dry run reads the file and asks nothing: a statement books nothing anyway.
579
+
580
+ What else to know:
581
+
582
+ - **Refused before the database is asked**, and listed under `refusals` by a
583
+ dry run: an account or a journal with no answer, books whose reader found
584
+ something that does not add up (an entry that does not balance, a line of a
585
+ draft entry), a currency the files name that is not the company's.
586
+ - **The numbers** are drawn by the journal each entry goes to; the old number
587
+ is kept as the entry's reference. `--keep-numbers` posts each under its old
588
+ number instead, where the country allows a number chosen by hand or you hold
589
+ `entries.import`.
590
+ - **No tax.** An imported line carries an account and an amount, not the tax
591
+ that produced it: the history feeds the ledger, the trial balance and the
592
+ statements, and no box of a VAT return. A period kept elsewhere was declared
593
+ from where it was kept.
594
+ - **The same files twice are refused** (`import_already_done`): `book_imports`
595
+ keeps the checksum of what each import read.
596
+ - **Dates and encodings are said, never guessed**: `--encoding` for a file
597
+ that is not UTF-8, `--date-order` for a report that writes dates in digits.
598
+ - **Reconciliation marks are read and not re-applied yet**: the matching of an
599
+ imported receivable against its payment is done in Ekwo, with `reconcile`.
600
+
601
+ The MCP server offers the same as `import_books`, and `import_bank_statement`
602
+ for a statement. [`docs/import.md`](../../docs/import.md) is the long form.
603
+
499
604
  ## `ekwo module`
500
605
 
501
606
  A module is a Postgres schema beside the socle — `assets` for fixed assets,
@@ -637,12 +742,38 @@ migration runner and by nothing else.
637
742
 
638
743
  ```sh
639
744
  ekwo pack list # the packs this checkout carries, and their certification
640
- ekwo pack build be # write supabase/seed/10_pack_be.sql from packs/be
745
+ ekwo pack describe # everything each of them says; one country with `describe <cc>`
746
+ ekwo pack build be # write supabase/seed/10_pack_be.sql from packs/be, and the lists of packs
641
747
  ekwo pack build --all
642
- ekwo pack check be # validate one pack and compare its seed
643
- ekwo pack check --all # exit 1 if a committed seed is not the output of its pack
748
+ ekwo pack check be # validate one pack, compare its seed and the lists of packs
749
+ ekwo pack check --all # exit 1 if a committed seed or list is not the output of the packs
644
750
  ```
645
751
 
752
+ The lists are the blocks of other files that name every pack — the seeds of
753
+ `supabase/config.toml` and of the root README, the `/packs/<cc>/` lines of
754
+ `.github/CODEOWNERS`, the table of `docs/packs.md` — each between a
755
+ `generated:<name>` marker and `/generated`. They are written from `packs/` the
756
+ way a seed is, so a country is added in `packs/<cc>/` and nowhere else.
757
+
758
+ `list` is a line per country. `describe` is the whole of one: the charts and
759
+ who each is published for, the taxes and their distinct rates, the periodic
760
+ declaration with its cadences and its boxes, whether the country states a rule
761
+ for when the return is due, the brick that writes the file it is deposited as
762
+ or that it is filed by hand on a portal, the e-invoicing profile and the day it
763
+ starts, the accounts the tax balance lands on, every bank statement format the
764
+ country names and whether anything here reads it, the financial statements, and
765
+ the texts the pack was built from with the day each was last opened. Every
766
+ answer is read from the pack, and a "not yet" is printed rather than left out.
767
+
768
+ ```sh
769
+ ekwo pack describe --json | jq '.data.packs[] | {country, version}'
770
+ ```
771
+
772
+ Under `--json` the whole description of every pack is the result. It is the
773
+ same object the site at [ekwo.ai](https://ekwo.ai/countries/) builds each
774
+ country's page from, so the site and the command line cannot come to say
775
+ different things about a country.
776
+
646
777
  `check` validates every file of the pack against
647
778
  [`packs/schema/pack.1.json`](../../packs/schema/pack.1.json) and against the
648
779
  rest of the pack, then compares the committed seed with what the compiler makes
@@ -704,8 +835,8 @@ dashboard under Connect → Session pooler, is the form that is never derived.
704
835
  | `--admin-password <pw>` | Their password. Omitted, an invite link is generated and printed. |
705
836
  | `--admin-user-id <uuid>` | Use an account that already exists, instead of creating one. |
706
837
  | `--fiscal-year <year>` | Calendar year of the first financial year. Defaults to this year. |
707
- | `--fiscal-year-start <date>` | The day that year opens, as `YYYY-MM-DD`. Needed only where the pack names no usual opening month; the two packs shipped both open on the calendar year. |
708
- | `--currency <code>` | Currency of the company. Defaults to what the country model says: `EUR` for both countries shipped. |
838
+ | `--fiscal-year-start <date>` | The day that year opens, as `YYYY-MM-DD`. Needed only where the pack names no usual opening month (`defaults.fiscal_year_default`). |
839
+ | `--currency <code>` | Currency of the company. Defaults to the pack's `defaults.currency`. |
709
840
  | `--language <xx>` | Language of the books, two letters. Defaults to `country_defaults.language_default`, which the pack fills. It decides which label of the pack lands on each account; the others are kept in `name_i18n`. |
710
841
  | `--iban <iban>` | Creates the main bank account, wired to the bank journal and its ledger account. Omitted, no bank account is created and `ekwo doctor` says so. |
711
842
  | `--bic <bic>` | Optional, on that account. |
@@ -713,6 +844,7 @@ dashboard under Connect → Session pooler, is the form that is never derived.
713
844
  | `--demo` | Also load the sample company. |
714
845
  | `--register` | Register without being asked. `--register-email` sets the address. |
715
846
  | `--registry-url <url>` | Where the registration is announced. |
847
+ | `--no-modules` | Leave the modules out. By default `init` installs them, as `ekwo migrate` does — empty schemas until a company enables one. |
716
848
 
717
849
  Every command takes `--json`; see [what a command answers](#what-a-command-answers---json-and-the-exit-codes).
718
850
  `ekwo migrate` takes `--skip-seeds`.