@billionaire-sh/cli 0.3.0 → 1.0.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 (2) hide show
  1. package/README.md +55 -8
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -42,6 +42,29 @@ pnpm i -g @billionaire-sh/cli
42
42
 
43
43
  ---
44
44
 
45
+ ## From the checkout: always the code as it stands
46
+
47
+ Homebrew and npm install a build, and a build is behind the checkout: a
48
+ command added today is not in the binary of last week. Whoever works in the
49
+ repository links the starter into a folder of the `PATH` once:
50
+
51
+ ```sh
52
+ ln -s ~/Projects/kadal/apps/billionaire/cli/bin/billionaire.mjs /opt/homebrew/bin/billionaire
53
+ billionaire --version
54
+ ```
55
+
56
+ From then on `billionaire` runs `src/cli.ts` of that checkout — no build,
57
+ no release, nothing to upgrade. It needs the checkout installed
58
+ (`pnpm install`) and nothing else. The commands that work on the files of
59
+ the chart editions (`charts lock`, `charts seal`, `charts parse`,
60
+ `charts check`) look at the folder you call them from, so call them inside
61
+ the checkout whose files you mean.
62
+
63
+ The starter is three lines (`bin/billionaire.mjs`); the mechanism is
64
+ `@kolaveri/dev-tools/cli-from-source`, shared with the `order3000` CLI.
65
+
66
+ ---
67
+
45
68
  ## Shell completion (tab autocomplete)
46
69
 
47
70
  `billionaire completion <shell>` prints a completion script for your
@@ -119,23 +142,43 @@ billionaire charts check skr-03 2026
119
142
  Both run the parser package in the repository's uv workspace; the installed
120
143
  CLI outside a checkout answers that the documents are in the repository.
121
144
 
122
- What becomes of each account from one edition to the next is derived from
123
- the editions' files and checked in as a lock
124
- (`libs/billionaire/charts/README.md`, "Succession"):
145
+ What follows from the editions' files is derived and checked in as a lock
146
+ (`libs/billionaire/charts/README.md`, "Succession" and "Mappings"): what
147
+ becomes of each account from one edition to the next, the counterpart of
148
+ each account on the other chart line, its place in each taxonomy edition,
149
+ and the rules its purposes stand for. A change of an account in
150
+ `meaning.json` ends with `lock`, and the diff of the locks is part of it:
125
151
 
126
152
  ```sh
127
- # Write every succession lock and each chart line's CHANGES.md.
153
+ # Write every lock and each chart line's CHANGES.md.
128
154
  billionaire charts lock
129
155
 
130
156
  # Exit 1 unless every checked-in lock is exactly what the derivation gives.
131
157
  billionaire charts lock --check
132
158
  ```
133
159
 
160
+ The chart data is sealed by the owner (`libs/billionaire/charts/README.md`,
161
+ "The seal"): every file of the editions has its hash in `seal.json`, signed
162
+ with a key whose passphrase only the owner knows. A change of the chart
163
+ data — and of the locks that follow from it — waits for that seal:
164
+
165
+ ```sh
166
+ # Exit 1 unless every file of the chart data is what the owner sealed.
167
+ # Needs no key.
168
+ billionaire charts seal --check
169
+
170
+ # The owner's: show what changed since the last seal — data as a table
171
+ # (account, field, was, is), locks as pairs of lines — then sign.
172
+ # ssh-keygen asks for the passphrase of the sealing key on the terminal.
173
+ billionaire charts seal # the key at ~/.ssh/billionaire/chart_seal
174
+ billionaire charts seal --key /path/to/key # a key file somewhere else
175
+ ```
176
+
134
177
  A number answers with one of:
135
178
 
136
179
  | `status` | Meaning |
137
180
  |---|---|
138
- | `account` | The chart keeps an active account there — the only answer that may be booked on. Comes with name, account type, booking role and taxonomy position. |
181
+ | `account` | The chart keeps an active account there — the only answer that may be booked on. Comes with name, account type, the booking purposes it answers (with their conditions) and taxonomy position. |
139
182
  | `inactive` | The platform keeps the account, but it is no longer booked on. |
140
183
  | `reserved` | DATEV reserves the number (with the block and the page of the publication). Not an account. |
141
184
  | `unknown` | The chart does not know the number. An account of an entity's own may take it. |
@@ -145,6 +188,10 @@ A number answers with one of:
145
188
  The charts are inlined at build time from the ONE place the platform keeps
146
189
  them — the library `libs/billionaire/charts` (`editions/<provider>/<chart>/<edition>/`: what the source prints and what
147
190
  we decide, beside the source PDFs), taken from the DATEV Kontenrahmen named in
148
- each file's `edition`. The app's database (account templates, account
149
- rules, taxonomy positions) is seeded from the same files. The CLI holds no
150
- copy and no number of its own.
191
+ each file's `edition`. The CLI holds no copy and no number of its own.
192
+
193
+ The CLI has no database and no network, so it loads none: a database is
194
+ loaded from the same files by the app, which holds the connection
195
+ (`apps/billionaire/billionaire/scripts/typescript/apply-chart-edition.ts`),
196
+ and held equal to them by `check-chart-editions-against-database.ts` —
197
+ `libs/billionaire/charts/README.md`, "Loading an edition into a database".
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@billionaire-sh/cli",
3
- "version": "0.3.0",
3
+ "version": "1.0.0",
4
4
  "description": "Agent-friendly command-line interface for the billionaire platform",
5
5
  "type": "module",
6
6
  "private": false,
@@ -25,10 +25,10 @@
25
25
  "tsx": "^4.19.2",
26
26
  "typescript": "^5.9.3",
27
27
  "vitest": "^4.1.7",
28
- "@billionaire/charts": "0.3.0",
29
- "@kolaveri/eslint-config": "1.27.0",
30
- "@kolaveri/tsconfig": "1.0.1",
31
- "@kolaveri/prettier-config": "1.0.6"
28
+ "@kolaveri/eslint-config": "1.28.0",
29
+ "@billionaire/charts": "0.5.0",
30
+ "@kolaveri/prettier-config": "1.0.6",
31
+ "@kolaveri/tsconfig": "1.0.1"
32
32
  },
33
33
  "prettier": "@kolaveri/prettier-config",
34
34
  "scripts": {