@vapi-network/cli 0.2.3 → 0.3.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/README.md CHANGED
@@ -1,6 +1,14 @@
1
- # @vapi-network/cli
1
+ # `@vapi-network/cli`
2
2
 
3
- The command-line interface used by the `vapi-network` distribution. It keeps
4
- the wallet key encrypted on the local machine and signs x402 payments locally.
3
+ The command implementations behind the `vapi` binary of
4
+ [vAPI Network](https://github.com/vAPI-Network/vapi-network): wallet management,
5
+ discovery, payment, receipts, the OS secret store and the MCP launcher. The
6
+ wallet key stays encrypted on the local machine and every x402 payment is signed
7
+ locally.
8
+
9
+ Two entry points: `@vapi-network/cli` exports `runCli` and the `HELP` text for
10
+ embedding, and `@vapi-network/cli/cli` is the executable itself.
5
11
 
6
12
  Most users should install or run the unscoped `vapi-network` package instead.
13
+ See the [root README](https://github.com/vAPI-Network/vapi-network#readme) for
14
+ the full command reference.
package/dist/cli.d.ts CHANGED
@@ -1,10 +1,28 @@
1
- export declare const HELP = "vAPI Network\n\nUsage:\n vapi init [--networks <base,solana>] [--json]\n vapi fund [--amount <usd>] [--json]\n vapi accounts [--enable solana] [--json]\n vapi search [query] [--kind <kind>] [--network <caip2>] [--limit <n>] [--cursor <cursor>] [--json]\n vapi inspect <id> [--endpoint <name>] [--json]\n vapi pay <id-or-url> [--method <method>] [--endpoint <name>] [--body <json>] [--content-type <type>] [--network <caip2>] [--expected-pay-to <address>] [--max <amount>] [--json]\n vapi balance [--json]\n vapi receipts [--limit <n>] [--json]\n vapi receipts export --format <json|csv> [--range <24h|7d|30d>]\n vapi stats [--range <24h|7d|30d>] [--json]\n vapi sweep <address> [--network <caip2>] [--json]\n vapi export-key [--network <caip2>] [--json]\n vapi report \"<what happened>\" [--include-addresses] [--send] [--json]\n vapi mcp [--json]\n vapi serve [--json]\n vapi version [--json]\n vapi publish [--json]\n\nWith no command, vapi shows this help. The MCP server starts only with `vapi mcp`.";
1
+ import { type SecretStore } from "@vapi-network/core";
2
+ export declare const HELP = "vAPI Network\n\nUsage:\n vapi init [--networks <base,solana>] [--json]\n vapi wallet list [--json]\n vapi wallet create <name> [--networks <base,solana>] [--label <text>] [--json]\n vapi wallet use <name> [--json]\n vapi wallet rename <old> <new> [--json]\n vapi wallet remove <name> [--force] [--json]\n vapi wallet restore <name> [--json]\n vapi wallet caps <name> [--per-call <usd>] [--per-day <usd>] [--json]\n vapi fund [--amount <usd>] [--wallet <name>] [--json]\n vapi accounts [--enable solana] [--wallet <name>] [--json]\n vapi search [query] [--kind <kind>] [--network <caip2>] [--limit <n>] [--cursor <cursor>] [--json]\n vapi inspect <id> [--endpoint <name>] [--json]\n vapi pay <id-or-url> [--method <method>] [--endpoint <name>] [--body <json>] [--content-type <type>] [--network <caip2>] [--expected-pay-to <address>] [--max <amount>] [--wallet <name>] [--json]\n vapi balance [--wallet <name>] [--json]\n vapi receipts [--limit <n>] [--wallet <name>] [--all-wallets] [--json]\n vapi receipts export --format <json|csv> [--range <24h|7d|30d>] [--wallet <name>] [--all-wallets]\n vapi stats [--range <24h|7d|30d>] [--wallet <name>] [--all-wallets] [--json]\n vapi sweep <address> [--network <caip2>] [--wallet <name>] [--json]\n vapi export-key [--network <caip2>] [--wallet <name>] [--json]\n vapi backup [--wallet <name>] [--json]\n vapi import (--phrase | --key) [--wallet <name>] [--networks <base,solana>] [--replace] [--force] [--json]\n vapi passphrase [--wallet <name>] [--json]\n vapi unlock [--wallet <name>] [--json]\n vapi lock [--wallet <name> | --all] [--json]\n vapi report \"<what happened>\" [--include-addresses] [--send] [--json]\n vapi mcp [--wallet <name>] [--json]\n vapi serve [--json]\n vapi version [--json]\n vapi publish [--json]\n vapi help [--json]\n\nEvery command that touches a wallet takes `--wallet <name>`, falls back to `VAPI_WALLET`, then to the default set by `vapi wallet use`, and names the wallet it used on its first line.\n\n`vapi fund` opens the funding page: card via Coinbase (needs a Coinbase account; US guest checkout), send from MetaMask/Coinbase Wallet/WalletConnect, or bridge from another chain.\n\n`vapi unlock` keeps one wallet's passphrase in the OS secret store \u2014 the macOS Keychain, or libsecret on Linux \u2014 so an agent can pay without `VAPI_KEYSTORE_PASSWORD` in its configuration. `vapi lock` takes it out again. Unlock order: `VAPI_KEYSTORE_PASSWORD`, then the secret store, then a prompt on a terminal. Windows still needs the variable.\n\n`vapi backup` and `vapi export-key` print a secret, so they run only on a real terminal, never for an agent, and ask you to type the wallet name first. Set `VAPI_NO_SECRETS=1` to switch them off entirely. Every export and every wallet change is logged to ~/.vapi/audit.log.\n\nWith no command, vapi shows this help. The MCP server starts only with `vapi mcp`.";
2
3
  export type CliIo = {
3
4
  stdout(message: string): void;
4
5
  stderr(message: string): void;
5
6
  };
7
+ /** Every secret the CLI reads is read here, so tests never touch a terminal. */
8
+ export type CliPrompts = {
9
+ /** Reads one line from the terminal without echoing it. */
10
+ secret(prompt: string): Promise<string>;
11
+ /**
12
+ * Reads one visible line, for a typed confirmation such as a wallet name.
13
+ * Never used for a secret, so it may echo.
14
+ */
15
+ line?(prompt: string): Promise<string>;
16
+ };
6
17
  export type CliDependencies = {
7
18
  fetchImpl?: typeof fetch;
19
+ prompts?: CliPrompts;
20
+ /** Whether a person is watching. Only then is a recovery phrase shown. */
21
+ interactive?: boolean;
22
+ /** The environment this run sees: wallet selection and agent detection. */
23
+ env?: NodeJS.ProcessEnv;
24
+ /** The OS secret store `vapi unlock` and `vapi lock` act on. */
25
+ secretStore?: SecretStore;
8
26
  };
9
27
  /** Run one CLI invocation and return its process exit code. */
10
28
  export declare function runCli(argv?: string[], io?: CliIo, dependencies?: CliDependencies): Promise<number>;