domani-cli 0.4.75 → 0.4.84

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 +29 -3
  2. package/dist/domani.cjs +222 -208
  3. package/package.json +2 -1
package/README.md CHANGED
@@ -39,6 +39,8 @@ domani mcp serve
39
39
  `domani login` stores the credential in the operating-system keychain when one
40
40
  is available. The stdio bridge resolves it locally and forwards MCP requests to
41
41
  `https://domani.run/mcp`; stdout remains reserved for JSON-RPC messages.
42
+ To pin the bridge to one of several saved accounts, start it with
43
+ `DOMANI_ACCOUNT=<name> domani mcp serve` (or `domani --account <name> mcp serve`).
42
44
 
43
45
  For an agent acting on someone else's behalf, request a scoped, expiring
44
46
  credential instead of their account key:
@@ -228,8 +230,10 @@ domani transfer-away <domain> Check outbound transfer status
228
230
 
229
231
  ```
230
232
  domani login Log in to domani.run (opens browser)
231
- domani logout Clear saved credentials
232
- domani me Show account info
233
+ domani logout Forget the current account's login (--account <name> for another)
234
+ domani accounts List saved accounts, * marks the one in use
235
+ domani use <name> Switch the active account
236
+ domani me Show account info and the CLI account in use
233
237
  domani billing Add or update payment method (opens browser)
234
238
  domani invoices List payment invoices
235
239
  domani notifications List notifications (--unread, --limit, --cursor; --read marks all read)
@@ -303,13 +307,33 @@ domani buy myapp.dev # Charged to saved card
303
307
  | OS keychain | Credential saved by `domani login` when available |
304
308
  | `~/.domani/config.json` | Non-secret CLI settings, plus legacy fallback on systems without a keychain |
305
309
 
306
- The CLI checks `$DOMANI_API_KEY` first, then falls back to `~/.domani/config.json`.
310
+ The CLI checks `$DOMANI_API_KEY` first, then falls back to the saved login.
307
311
 
308
312
  ```bash
309
313
  domani login # Interactive (opens browser)
310
314
  export DOMANI_API_KEY=domani_sk_... # Or set env var
311
315
  ```
312
316
 
317
+ ### Several accounts
318
+
319
+ The CLI can keep more than one Domani account, each under a name, with its own
320
+ keychain entry:
321
+
322
+ ```bash
323
+ domani login --account work # save a second account as "work"
324
+ domani accounts # list them; * marks the one in use
325
+ domani use work # make "work" the active account
326
+ domani --account personal list # use another account for one command
327
+ DOMANI_ACCOUNT=work domani mcp serve # pin an agent's MCP bridge to "work"
328
+ domani logout --account work # forget that login only
329
+ ```
330
+
331
+ The credential a command uses is, in order: `DOMANI_API_KEY`, `--account`,
332
+ `DOMANI_ACCOUNT`, then the active account. `domani me` shows the account in use,
333
+ and the buy, renew and transfer confirmations name it before anything is
334
+ charged. A login saved by an earlier CLI version becomes the account `default`,
335
+ with nothing to redo.
336
+
313
337
  Scoped API tokens can be created with `domani tokens create --scopes read,dns --expires-in 86400`.
314
338
 
315
339
  ## Environment variables
@@ -317,6 +341,8 @@ Scoped API tokens can be created with `domani tokens create --scopes read,dns --
317
341
  | Variable | Description |
318
342
  |----------|-------------|
319
343
  | `DOMANI_API_KEY` | API key (takes precedence over saved config) |
344
+ | `DOMANI_ACCOUNT` | Saved CLI account to use (below `--account`, above `domani use`) |
345
+ | `DOMANI_CONFIG_DIR` | Config directory (default `~/.domani`) |
320
346
 
321
347
  ## License
322
348