@billionaire-sh/cli 0.0.0-stage → 0.1.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.
- package/LICENSE +21 -0
- package/README.md +116 -2
- package/package.json +40 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Kolaveri Labs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,117 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `billionaire` — agent-friendly CLI for the billionaire platform
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Built after [`order3000`](../../order3000/cli): the same command
|
|
4
|
+
conventions (citty), the same output contract, the same exit codes.
|
|
5
|
+
|
|
6
|
+
Output adapts automatically: text for people when stdout is a terminal,
|
|
7
|
+
JSON otherwise — an agent or a script gets JSON without a flag. Force
|
|
8
|
+
either with `--json` / `--pretty`.
|
|
9
|
+
|
|
10
|
+
Exit codes: `0` ok · `1` user error · `99` unexpected. Branch on the exit
|
|
11
|
+
code, never on stderr text.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Install via Homebrew (macOS — Apple Silicon or Intel)
|
|
16
|
+
|
|
17
|
+
This is the recommended path. The Homebrew binary bundles the runtime and
|
|
18
|
+
the chart data, so you don't need to install Node yourself.
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
# 1. Add the billionaire tap (one-time setup)
|
|
22
|
+
brew tap billionaire-sh/tap
|
|
23
|
+
|
|
24
|
+
# 2. Install the CLI
|
|
25
|
+
brew install billionaire
|
|
26
|
+
|
|
27
|
+
# 3. Verify
|
|
28
|
+
billionaire --version
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
That's it. From here, `billionaire` is on your `$PATH` like any other
|
|
32
|
+
Homebrew binary. To upgrade to the latest release later:
|
|
33
|
+
`brew upgrade billionaire`.
|
|
34
|
+
|
|
35
|
+
> **Linux Homebrew users**: the same two commands work.
|
|
36
|
+
|
|
37
|
+
Or via npm:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
pnpm i -g @billionaire-sh/cli
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Shell completion (tab autocomplete)
|
|
46
|
+
|
|
47
|
+
`billionaire completion <shell>` prints a completion script for your
|
|
48
|
+
shell. Pipe it to your shell's completions directory once and tab
|
|
49
|
+
autocomplete works on every `billionaire …` invocation thereafter.
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
# zsh — Homebrew on macOS
|
|
53
|
+
billionaire completion zsh > "$(brew --prefix)/share/zsh/site-functions/_billionaire"
|
|
54
|
+
autoload -Uz compinit && compinit
|
|
55
|
+
|
|
56
|
+
# bash
|
|
57
|
+
billionaire completion bash > /usr/local/etc/bash_completion.d/billionaire
|
|
58
|
+
|
|
59
|
+
# fish
|
|
60
|
+
billionaire completion fish > ~/.config/fish/completions/billionaire.fish
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## From source (this monorepo)
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
# Build the CLI from a local checkout
|
|
69
|
+
pnpm --filter @billionaire-sh/cli build
|
|
70
|
+
|
|
71
|
+
# Run the just-built binary
|
|
72
|
+
node apps/billionaire/cli/dist/cli.js --help
|
|
73
|
+
|
|
74
|
+
# Or compile to a single-file native binary (this Mac)
|
|
75
|
+
pnpm --filter @billionaire-sh/cli build:binaries darwin-arm64
|
|
76
|
+
./apps/billionaire/cli/dist/binaries/billionaire-darwin-arm64 --help
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## `charts` — the reference for DATEV account numbers
|
|
82
|
+
|
|
83
|
+
DATEV reserves numbers and drops accounts from one edition to the next. A
|
|
84
|
+
number from memory or from a web page is not a source. **Ask this before a
|
|
85
|
+
DATEV number goes into code, a spec, a fixture or a booking.**
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
# What is on these numbers?
|
|
89
|
+
billionaire charts account skr-03 4930 1579 1330
|
|
90
|
+
|
|
91
|
+
# Which account is it? Words of the name, German or English.
|
|
92
|
+
billionaire charts account skr-04 "innergemeinschaftlichem Erwerb"
|
|
93
|
+
|
|
94
|
+
# For scripts and hooks: exit 1 unless every number is an active account.
|
|
95
|
+
billionaire charts account skr-03 4930 1574 --check
|
|
96
|
+
|
|
97
|
+
# Which charts, from which DATEV publication?
|
|
98
|
+
billionaire charts list
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
A number answers with one of:
|
|
102
|
+
|
|
103
|
+
| `status` | Meaning |
|
|
104
|
+
|---|---|
|
|
105
|
+
| `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. |
|
|
106
|
+
| `inactive` | The platform keeps the account, but it is no longer booked on. |
|
|
107
|
+
| `reserved` | DATEV reserves the number (with the block and the page of the publication). Not an account. |
|
|
108
|
+
| `unknown` | The chart does not know the number. An account of an entity's own may take it. |
|
|
109
|
+
|
|
110
|
+
### Where the data comes from
|
|
111
|
+
|
|
112
|
+
The charts are inlined at build time from the ONE place the platform keeps
|
|
113
|
+
them — `apps/billionaire/billionaire/src/features/platform/server/utils/datevCharts/`
|
|
114
|
+
(`skr-03.json`, `skr-04.json`), taken from the DATEV Kontenrahmen named in
|
|
115
|
+
each file's `edition`. The app's database (account templates, account
|
|
116
|
+
rules, taxonomy positions) is seeded from the same files. The CLI holds no
|
|
117
|
+
copy and no number of its own.
|
package/package.json
CHANGED
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@billionaire-sh/cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Agent-friendly command-line interface for the billionaire platform",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": false,
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"bin": {
|
|
11
|
+
"billionaire": "./dist/cli.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"citty": "^0.1.6",
|
|
18
|
+
"consola": "^3.4.2"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@types/node": "^24.10.0",
|
|
22
|
+
"eslint": "^8.57.1",
|
|
23
|
+
"prettier": "^3.7.4",
|
|
24
|
+
"tsup": "^8.3.5",
|
|
25
|
+
"tsx": "^4.19.2",
|
|
26
|
+
"typescript": "^5.9.3",
|
|
27
|
+
"vitest": "^4.1.7",
|
|
28
|
+
"@kolaveri/prettier-config": "1.0.6",
|
|
29
|
+
"@kolaveri/eslint-config": "1.26.0",
|
|
30
|
+
"@kolaveri/tsconfig": "1.0.1"
|
|
31
|
+
},
|
|
32
|
+
"prettier": "@kolaveri/prettier-config",
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsup",
|
|
35
|
+
"build:binaries": "tsx scripts/build-binaries.ts",
|
|
36
|
+
"build:binaries:check": "tsx scripts/build-binaries.ts --check",
|
|
37
|
+
"dev": "tsup --watch",
|
|
38
|
+
"start": "node ./dist/cli.js",
|
|
39
|
+
"test": "vitest run",
|
|
40
|
+
"lint": "dev-tools validate-changesets && tsc --noEmit && eslint src --ext .ts && vitest run",
|
|
41
|
+
"lint:fix": "eslint src --ext .ts --fix"
|
|
42
|
+
}
|
|
6
43
|
}
|