@visa/cli 2.4.0 → 2.4.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 CHANGED
@@ -6,18 +6,14 @@ AI-powered payments over MCP. Exposes Visa-funded paid tools as MCP (Model Conte
6
6
 
7
7
  | Platform | Credential Storage | Payment Auth | Install |
8
8
  |----------|-------------------|--------------|---------|
9
- | **macOS** | Keychain | Touch ID / Secure Enclave | `bash <(curl -fsSL https://visacli.sh/install.sh)` or `npm i -g @visa/cli` |
10
- | **Windows** | ACL-restricted file | Server-verified (restricted limits) | `npm i -g @visa/cli` or `iwr -useb https://visacli.sh/install.ps1 \| iex` |
11
- | **Linux** | libsecret (GNOME Keyring / KDE Wallet) | Server-verified (restricted limits) | `bash <(curl -fsSL https://visacli.sh/install.sh)` or `npm i -g @visa/cli` |
9
+ | **macOS** | Keychain | Touch ID / Secure Enclave | `curl -fsSL https://app.visacli.sh/cli \| bash` |
10
+ | **Windows** | ACL-restricted file | Server-verified (restricted limits) | `iwr -useb https://app.visacli.sh/install.ps1 \| iex` |
11
+ | **Linux** | libsecret (GNOME Keyring / KDE Wallet) | Server-verified (restricted limits) | `curl -fsSL https://app.visacli.sh/cli \| bash` |
12
12
 
13
13
  ## Install
14
14
 
15
15
  ```bash
16
- # one-liner (installs Node.js check + npm install + verification)
17
- bash <(curl -fsSL https://visacli.sh/install.sh)
18
-
19
- # or directly via npm
20
- npm install -g @visa/cli
16
+ curl -fsSL https://app.visacli.sh/cli | bash
21
17
  ```
22
18
 
23
19
  ## MCP setup
@@ -50,36 +46,56 @@ visa-cli config hud enable
50
46
  ## CLI commands
51
47
 
52
48
  ```bash
53
- visa-cli login # GitHub OAuth opens browser, stores session token
54
- visa-cli add-card # Enroll a Visa card via VGS secure form
55
- visa-cli status # Show auth state, enrolled cards, daily spend remaining
56
- visa-cli tokens create my-demo-app
57
- # Create an API token for an app or agent
58
- visa-cli history # Recent transactions with amounts and status
59
- visa-cli config hud enable
60
- # Enable the Claude Code statusLine HUD
61
- visa-cli config hud doctor
62
- # Diagnose HUD setup
63
- visa-cli config hud disable
64
- # Remove the Claude Code statusLine HUD
65
- visa-cli config hud enable claude
66
- # Explicitly register the Claude Code statusLine renderer
67
- visa-cli config hud enable shell
68
- # Opt-in shell prompt HUD for zsh/bash
69
- visa-cli config statusline
70
- # Renderer for statusLine integrations
49
+ visa-cli setup # First run: register MCP server, GitHub OAuth, enroll a card
50
+ visa-cli status # Show auth state, enrolled cards, wallet balance, daily spend remaining
51
+
52
+ # Cards
53
+ visa-cli cards add # Enroll a Visa card via the VGS secure form
54
+ visa-cli cards list # List enrolled cards
55
+ visa-cli cards default <id> # Set the default payment card
56
+ visa-cli cards remove <id> # Remove an enrolled card
57
+
58
+ # Balance & credits
59
+ visa-cli balance show # Prepaid balance + recent ledger entries
60
+ visa-cli balance topup --amount 5 # Top up balance from your default card (Touch ID)
61
+
62
+ # API tokens for apps and agents
63
+ visa-cli tokens create my-demo-app # Create an API token (prints the vk_... key once)
64
+ visa-cli tokens list # List API tokens
65
+ visa-cli tokens revoke <id> # Revoke an API token
66
+
67
+ # Run merchant tools
68
+ visa-cli generate image|video|music|speech|3d # Generate media with merchant tools
69
+ visa-cli run-llm # Chat-completion via an OpenRouter-backed LLM
70
+ visa-cli merchants list # Discover paid merchant tools
71
+
72
+ # Spend HUD & config
73
+ visa-cli config hud enable # Enable the Claude Code statusLine HUD (claude is the default surface)
74
+ visa-cli config hud enable shell # Opt-in shell prompt HUD for zsh/bash
75
+ visa-cli config hud disable # Remove the HUD
76
+ visa-cli config hud doctor # Diagnose HUD setup
77
+ visa-cli config statusline # Renderer for statusLine integrations
78
+ visa-cli config biometric off # Toggle Touch ID enforcement for remote payments
79
+
80
+ # Maintenance
81
+ visa-cli update # Update Visa CLI to the latest stable version
82
+ visa-cli uninstall # Remove the MCP server from an AI client
83
+ visa-cli feedback # Submit feedback about Visa CLI
84
+
71
85
  # MCP (stdio): run the bundled entrypoint (IDE configs use the same path — see getServerEntry in src/clients.ts)
72
86
  # node "$(npm root -g)/@visa/cli/dist/mcp-server/index.js"
73
87
  ```
74
88
 
89
+ Transaction history with amounts, merchants, and status is available through the `transaction_history` MCP tool (ask your assistant), or as a recent ledger via `visa-cli balance show`. There is no standalone `history` subcommand.
90
+
75
91
  ---
76
92
 
77
93
  ## Authentication
78
94
 
79
- Login is GitHub OAuth. Your session token is stored at `~/.visa-mcp/session-token`.
95
+ Login is GitHub OAuth and runs as part of `visa-cli setup`. Your session token is stored at `~/.visa-mcp/session-token`.
80
96
 
81
97
  ```bash
82
- visa-cli login # opens github.com/login/oauth/authorize in your browser
98
+ visa-cli setup # registers the MCP server, then opens github.com/login/oauth/authorize in your browser
83
99
  visa-cli status # verify you're logged in
84
100
  ```
85
101
 
@@ -87,10 +103,10 @@ visa-cli status # verify you're logged in
87
103
 
88
104
  ## Card enrollment
89
105
 
90
- Cards are tokenized via VGS — your raw card number never touches Visa servers. `add_card` opens a hosted VGS Collect form in your browser. You receive $1 in free credits on your first card enrollment.
106
+ Cards are tokenized via VGS — your raw card number never touches Visa servers. `visa-cli cards add` (or the `add_card` MCP tool) opens a hosted VGS Collect form in your browser. You receive $1 in free credits on your first card enrollment.
91
107
 
92
108
  ```bash
93
- visa-cli add-card
109
+ visa-cli cards add
94
110
  ```
95
111
 
96
112
  Multiple cards can be enrolled. The first becomes the default; you can switch defaults with `set_default_card` from within your assistant. To remove a card: `remove_card` (requires authentication).
@@ -111,7 +127,7 @@ Share your referral link (visible in `get_status`) and you both get **$2 in free
111
127
 
112
128
  Every paid tool call requires authentication. On macOS, this is Touch ID (or device password); on Windows and Linux, payments are server-verified with restricted spending limits. Your assistant will show you the amount and merchant before prompting. If you cancel, the payment is aborted — nothing is charged.
113
129
 
114
- Remote CLI/MCP servers can run ordinary paid tools under those server-enforced limits, but card-funded credit top-ups require local biometric attestation. Credits and the biometric preference are account-level: top up from any interactive Touch ID-capable CLI signed into the same account, optionally run `visa-cli biometric off` there for remote ordinary payments, then use that balance from the remote server. Credit top-ups still require local attestation even when biometric is off. For unattended server workloads, scoped API keys with daily caps are also supported.
130
+ Remote CLI/MCP servers can run ordinary paid tools under those server-enforced limits, but card-funded credit top-ups require local biometric attestation. Credits and the biometric preference are account-level: top up from any interactive Touch ID-capable CLI signed into the same account, optionally run `visa-cli config biometric off` there for remote ordinary payments, then use that balance from the remote server. Credit top-ups still require local attestation even when biometric is off. For unattended server workloads, scoped API keys with daily caps are also supported.
115
131
 
116
132
  You can set hard limits via the `update_spending_controls` tool, or check your current limits any time:
117
133
 
@@ -232,7 +248,7 @@ Paid calls then spend from that explicit approval window until the cap is used,
232
248
  **Touch ID prompt doesn't appear (macOS)**
233
249
  Make sure the MCP process (`node …/dist/mcp-server/index.js`) runs in a foreground TTY with access to the macOS security framework. Running inside some sandboxed environments may prevent Touch ID. On Windows and Linux, biometric prompts are not used for ordinary payments. Buying credits with an enrolled card currently requires local biometric attestation from the CLI; remote servers can spend account balance topped up from any interactive Touch ID-capable CLI signed into the same account.
234
250
 
235
- **"Not logged in" after `visa-cli login`**
251
+ **"Not logged in" after `visa-cli setup`**
236
252
  Restart the MCP server after logging in — your MCP client needs to reconnect to pick up the new session.
237
253
 
238
254
  **Card not showing in `get_cards`**