@capxul/cli 4.20.0-beta.1
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/README.md +107 -0
- package/dist/esm-DUNJOL6b.mjs +4092 -0
- package/dist/esm-DUNJOL6b.mjs.map +1 -0
- package/dist/lib-BOge5QZP.mjs +2154 -0
- package/dist/lib-BOge5QZP.mjs.map +1 -0
- package/dist/lib-C4fpnzyy.mjs +6991 -0
- package/dist/lib-C4fpnzyy.mjs.map +1 -0
- package/dist/lib-C8ENT9j6.mjs +1764 -0
- package/dist/lib-C8ENT9j6.mjs.map +1 -0
- package/dist/lib-DH_xJGSE.mjs +3642 -0
- package/dist/lib-DH_xJGSE.mjs.map +1 -0
- package/dist/lib-DVGoRCJN.mjs +12226 -0
- package/dist/lib-DVGoRCJN.mjs.map +1 -0
- package/dist/main.mjs +49748 -0
- package/dist/main.mjs.map +1 -0
- package/dist/secp256k1-Cc9JhcTQ.mjs +2219 -0
- package/dist/secp256k1-Cc9JhcTQ.mjs.map +1 -0
- package/package.json +51 -0
package/README.md
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Capxul CLI
|
|
2
|
+
|
|
3
|
+
The CLI provides local diagnostics, an online backend check, and one global
|
|
4
|
+
collection preference. It requires Node 24 or later on macOS or Linux.
|
|
5
|
+
|
|
6
|
+
```sh
|
|
7
|
+
capxul --help
|
|
8
|
+
capxul --version
|
|
9
|
+
capxul --completions bash
|
|
10
|
+
capxul doctor --json
|
|
11
|
+
capxul telemetry status --json
|
|
12
|
+
capxul telemetry disable --json
|
|
13
|
+
capxul telemetry enable --json
|
|
14
|
+
capxul doctor --online --timeout-ms 30000 --json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Help, version, and completion do not read configuration or contact a server.
|
|
18
|
+
`doctor` checks local configuration unless `--online` is present. An online
|
|
19
|
+
check uses the public Capxul SDK and verifies the backend response nonce.
|
|
20
|
+
It does not authenticate a person or submit a transaction.
|
|
21
|
+
|
|
22
|
+
## Configuration
|
|
23
|
+
|
|
24
|
+
| Variable | Use |
|
|
25
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------------------------ |
|
|
26
|
+
| `CAPXUL_CLI_HOME` | Directory for global CLI settings. Defaults to `$XDG_CONFIG_HOME/capxul/cli`, or `$HOME/.config/capxul/cli`. |
|
|
27
|
+
| `CAPXUL_PUBLISHABLE_KEY` | Application publishable key, required for an online check. |
|
|
28
|
+
| `CAPXUL_BOOTSTRAP_URL` | Bootstrap origin. Defaults to `https://api.staging.capxul.com`. Convex Cloud origins are rejected. |
|
|
29
|
+
| `CAPXUL_POSTHOG_HOST` | PostHog ingestion origin. |
|
|
30
|
+
| `CAPXUL_POSTHOG_PROJECT_TOKEN` | Project ingestion token. Both PostHog variables are required for export. |
|
|
31
|
+
| `CAPXUL_TELEMETRY_DISABLED` | Set to `true` to disable remote observation regardless of the saved preference. |
|
|
32
|
+
|
|
33
|
+
Collection defaults to enabled. Local commands send no remote signals.
|
|
34
|
+
`telemetry disable` saves one preference for the OS user and sends no final
|
|
35
|
+
remote event. Already running CLI processes check the current preference before
|
|
36
|
+
each export. Requests already sent cannot be recalled. `telemetry status`
|
|
37
|
+
reports the stored preference, effective policy, configuration, and reason.
|
|
38
|
+
|
|
39
|
+
Settings use a versioned JSON file in a directory with mode `0700`. The file has
|
|
40
|
+
mode `0600`. Writes are atomic and serialize between processes. A later writer
|
|
41
|
+
can recover an abandoned lock after the owning process exits. Invalid schemas,
|
|
42
|
+
unsafe permissions, symlinks, and corrupt state produce a storage failure.
|
|
43
|
+
|
|
44
|
+
## Output
|
|
45
|
+
|
|
46
|
+
`--json` writes one version 1 envelope to stdout. Success contains `data`.
|
|
47
|
+
Failure contains `error.code` and CLI-owned `error.message`. Each envelope has
|
|
48
|
+
`command`, `invocationId`, and `outcome`. An invocation ID is null before a
|
|
49
|
+
command starts. Human errors go to stderr.
|
|
50
|
+
|
|
51
|
+
| Exit | Meaning |
|
|
52
|
+
| ----- | -------------------------------------------- |
|
|
53
|
+
| `0` | Command completed |
|
|
54
|
+
| `1` | Unexpected defect |
|
|
55
|
+
| `2` | Invalid input, configuration, or local state |
|
|
56
|
+
| `3` | Authentication required |
|
|
57
|
+
| `4` | Authority refused |
|
|
58
|
+
| `5` | Dependency failure |
|
|
59
|
+
| `124` | Online deadline exceeded |
|
|
60
|
+
| `130` | Interrupted |
|
|
61
|
+
|
|
62
|
+
## Distribution
|
|
63
|
+
|
|
64
|
+
The npm package is `@capxul/cli`. The Homebrew formula consumes that exact npm
|
|
65
|
+
release, verifies its checksum, and installs Bash, Zsh, and Fish completions.
|
|
66
|
+
Public installation status is in the
|
|
67
|
+
[Homebrew tap](https://github.com/Xelmar-tech/homebrew-tap).
|
|
68
|
+
|
|
69
|
+
After publication:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
npm install -g @capxul/cli
|
|
73
|
+
brew install xelmar-tech/tap/capxul
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Homebrew installs Zsh completions in its standard completion directory. npm
|
|
77
|
+
users can generate the same script:
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
mkdir -p ~/.zsh/completions
|
|
81
|
+
capxul --completions zsh > ~/.zsh/completions/_capxul
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Add these lines to `.zshrc`, before any existing `compinit` call. If the shell
|
|
85
|
+
framework already calls `compinit`, add only the `fpath` line before it.
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
fpath=(~/.zsh/completions $fpath)
|
|
89
|
+
autoload -Uz compinit
|
|
90
|
+
compinit
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Use `npm update -g @capxul/cli` or `brew upgrade xelmar-tech/tap/capxul` to update.
|
|
94
|
+
Use one installer for the `capxul` executable to avoid conflicting PATH entries.
|
|
95
|
+
|
|
96
|
+
## Development commands
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
vp test run apps/cli
|
|
100
|
+
vp run --filter @capxul/cli check-types
|
|
101
|
+
vp run --filter @capxul/cli build
|
|
102
|
+
vp exec node --test --test-name-pattern='@capxul/cli' scripts/__tests__/pack-install-smoke.test.mjs
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The last command installs the tarball outside the workspace and exercises the
|
|
106
|
+
installed executable with isolated settings and a local HTTP server. The CI
|
|
107
|
+
`CLI / Linux / Node 24.0.0` job runs this proof at the declared minimum version.
|