@candledottv/cli 0.9.2 → 0.11.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 (3) hide show
  1. package/README.md +44 -1
  2. package/dist/index.js +44846 -26100
  3. package/package.json +6 -3
package/README.md CHANGED
@@ -7,7 +7,7 @@ health from the terminal. Zero runtime dependencies; the whole thing is one self
7
7
  ## Quick start
8
8
 
9
9
  ```
10
- Install the Candle CLI (macOS or Linux):
10
+ Install the Candle CLI (macOS 13 or later, or Linux):
11
11
 
12
12
  curl -fsSL https://candle.tv/install.sh | bash
13
13
 
@@ -24,6 +24,8 @@ login` on its own does just the authorization step.
24
24
 
25
25
  The npm package `@candledottv/cli` stays published for CI, programmatic use, and Windows until
26
26
  `install.ps1` ships; `npx -y @candledottv/cli@latest <command>` runs it once without installing.
27
+ It is also the way in on macOS 12 or earlier: the release binaries need macOS 13, and `install.sh`
28
+ and Homebrew refuse an older Mac rather than install a binary not built for it.
27
29
 
28
30
  ### No-npm fallback
29
31
 
@@ -57,6 +59,10 @@ node packages/cli/dist/index.js auth login
57
59
  | `candle keys create [--scopes <a,b,c>] [--label <name>] [--expires-in <days>] [--tx-limit <usd> [--reset daily\|weekly\|monthly\|never]]` | Creates a new API key and prints the plaintext exactly once, with the same optional name, expiration, and USD transaction limit the portal's create form takes. Stored locally only if the CLI does not already hold a working key. |
58
60
  | `candle keys revoke <prefix>` | Revokes an API key by prefix. Revoking the CLI's own stored key also clears it locally. |
59
61
  | `candle wallets` | Shows the account's embedded (launch) wallets and any linked wallets, using the API key, with a `Signer` column saying whether this machine holds each linked wallet's signing key. |
62
+ | `candle vault init\|status\|new-key\|phrase show\|restore` | The encrypted local vault, `vault.enc`. `init` creates it with a passphrase factor and a 24-word recovery phrase, `new-key` derives a key inside it, `phrase show` displays the phrase on a terminal (never in `--json`, a log or a pipe), and `restore --phrase` rebuilds the derived keys on another machine. No key ever leaves the vault to reach Candle. See [The vault](https://docs.candle.tv/developers/cli#the-vault). |
63
+ | `candle vault factor list\|add passphrase\|add security-key\|add touch-id\|add passkey\|remove`, `vault backup --to <path>`, `vault verify-backup <path>` | What can open the vault, and proving a copy of it works: `backup` verifies the copy in full before reporting (a copy is sealed to the passphrase envelope unless it goes to a recognised local disk or removable drive, so a cloud folder and any path the CLI cannot place are both sealed unless `--accept-shared-domain` is passed), and `verify-backup` re-checks an existing one against this vault's key and address set. `add security-key` enrolls a FIDO2 security key (CTAP2 `hmac-secret`, user-verified with the key's PIN or biometric) through the bundled `candle-fido2` helper; one key is not a recoverable factor, two keys are a pair, and the passphrase stays the recovery floor. Every vault command then takes `--factor <id\|passphrase\|security-key>` to say which envelope opens it and `--device <id>` to name the key when several are attached. |
64
+ | `candle vault transfer\|promote\|fund\|demote\|export-key` | Moving value and authority. `transfer` and `fund` sign locally from a vault key after showing the decoded transaction; `promote` turns a vault key into a delegated TEE wallet (fresh, or the key's own address after a typed warning) and `demote` sweeps it back; `export-key` is the one ceremony that writes a single private key to a file you name. |
65
+ | `candle vault import-legacy --tee`, `candle vault retire-legacy` | Moves an existing `tee-wallets.enc` into the vault without deleting it, then retires the old file once the vault holds everything and a backup has been verified. |
60
66
  | `candle tee new\|enable\|fund\|status\|disable\|sweep` | A dedicated, capped TEE wallet for one agent: the CLI generates the key and seals it locally in `tee-wallets.enc`, `enable` delegates it to this profile's API key with a pinned sweep vault, `fund` prints what your vault signs, and `disable` then `sweep` stop the agent and move everything back to the vault, signed locally. Solana only. See [TEE wallets](https://docs.candle.tv/developers/cli#tee-wallets). |
61
67
  | `candle profile list` | Lists profiles on this machine, with cached accounts. |
62
68
  | `candle profile add <name> --api-url <url>` | Creates a profile before authenticating it. |
@@ -123,6 +129,43 @@ guarantee is unconfirmed: a wallet stop whose remote enforcement is still pendin
123
129
  enabled without verified signing authority, or a sweep that left a residual). Treat `3` as not
124
130
  done: follow the printed next step, usually re-running the same command.
125
131
 
132
+ A generated vault passphrase is shown once on the terminal and never inside a JSON value, so
133
+ `vault init` and `vault factor add passphrase` under `--json` take `--own-passphrase` (typed at a
134
+ hidden prompt, nothing shown) and refuse the generated form with exit `2`. Prompts themselves are
135
+ rendered on stderr, so a command that unlocks a vault on a terminal still leaves stdout as one
136
+ JSON value. A security key's PIN is read the same way, by the CLI on its own hidden prompt, and
137
+ reaches the `candle-fido2` helper only inside a request piped to it; the helper never reads the
138
+ terminal and the PIN never appears in any output.
139
+
140
+ The security key factor needs the `candle-fido2` helper beside the `candle` binary, which the
141
+ installer script and Homebrew put there (Homebrew also installs `libfido2`, which the helper loads
142
+ at run time; the installer names the package to add), and it needs libfido2's udev rule on Linux.
143
+ The npm package ships no native helper: there the factor is refused with `VAULT_HELPER_MISSING`
144
+ until a release build's `candle-fido2` is installed and `CANDLE_FIDO2_HELPER` points at it. No
145
+ other factor is ever substituted for one that is refused.
146
+
147
+ The Touch ID factor (`candle vault factor add touch-id`; not yet released) needs
148
+ the signed `candle-enclave.app` helper, which the darwin tarball, the installer script and Homebrew
149
+ place beside `candle` once a release ships it; a release cut before Apple's approval ships no
150
+ helper and the CLI refuses the factor with a typed code that says so. The CLI verifies the
151
+ helper's code signature with `/usr/bin/codesign` before trusting it, and `CANDLE_ENCLAVE_HELPER`
152
+ points at a bundle elsewhere. The factor opens the vault on one Mac only and is never a recovery
153
+ factor; the passphrase remains the recovery floor.
154
+
155
+ The synced passkey factor (`candle vault factor add passkey`; not yet released)
156
+ runs through the same signed helper on macOS 15 or later, and needs the helper's
157
+ associated-domains entitlement for `webcredentials:cli.candle.tv` with an embedded provisioning
158
+ profile, plus an `apple-app-site-association` served at
159
+ `https://cli.candle.tv/.well-known/apple-app-site-association` (status 200, no redirect,
160
+ `Content-Type: application/json`, `{"webcredentials":{"apps":["<TEAM ID>.tv.candle.cli.enclave"]}}`).
161
+ Each missing piece is a typed refusal before any passkey sheet, and the refusal names what must be
162
+ served. The passkey follows the Apple account, so it is a recoverable factor; two are one factor,
163
+ and a copy of the vault is sealed to the passphrase envelope by default unless it goes to a
164
+ recognised local disk or removable drive, so that one account never holds
165
+ both the blob and a factor that opens it. iCloud Drive and other cloud folders are sealed for that
166
+ reason, and so is any path the CLI cannot place, since it cannot tell whether that path syncs to an
167
+ account; `--accept-shared-domain` writes the full copy and the acceptance is recorded.
168
+
126
169
  The failure envelope is stable:
127
170
 
128
171
  ```json