@allowance/cli 0.1.2 → 0.1.3

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 (2) hide show
  1. package/README.md +24 -30
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # allowance
2
2
 
3
- `allowance` is a small CLI for OpenClaw setup only.
3
+ `allowance` is the CLI for Allowance the agent purchase wallet. It has two roles:
4
4
 
5
- It signs the user in with OTP, mints an Allowance connection token, and installs hosted Allowance MCP into OpenClaw. It is intentionally not a second runtime surface for requests, cards, or allowance operations, and OpenClaw config is the only long-term secret store.
5
+ 1. **Setup** (`allowance setup`) — signs the user in via OTP, mints a connection token, and writes agent skill files so Claude Desktop, Codex, or OpenClaw knows how to use Allowance.
6
+ 2. **Runtime checkout** — the full purchase flow agents use at runtime: request approval, issue a virtual card, fetch identity/address, and report the outcome.
6
7
 
7
8
  ## Install
8
9
 
@@ -105,48 +106,41 @@ git push origin v0.1.1
105
106
  - build wheels/sdist
106
107
  - publish to PyPI
107
108
 
108
- ## OpenClaw
109
+ ## Command surface
109
110
 
110
- All commands output JSON by default. Use `--pretty` for formatted JSON.
111
-
112
- | Command | What It Does | Use When |
113
- |---|---|---|
114
- | `allowance openclaw install` | Prompts for email or phone, completes OTP bootstrap, mints an OpenClaw-attributed token, and installs hosted Allowance MCP config | First-time setup or reinstall |
115
- | `allowance openclaw doctor` | Verifies OpenClaw availability, installed config, bearer wiring, and hosted MCP reachability | Troubleshooting |
116
- | `allowance openclaw uninstall` | Removes the Allowance MCP entry from OpenClaw and best-effort revokes the configured token | Cleanup |
117
-
118
- `allowance openclaw install` writes an OpenClaw MCP entry named `allowance` using:
119
-
120
- - hosted MCP URL from the Allowance API config when available
121
- - `transport: "streamable-http"`
122
- - `Authorization: Bearer ak_...`
123
-
124
- Install accepts either:
111
+ ### Setup
125
112
 
126
113
  ```bash
127
- allowance openclaw install --email you@example.com
128
- allowance openclaw install --phone +14155551234
114
+ allowance setup # auto-detect agent
115
+ allowance setup --for claude-code
116
+ allowance setup --for codex
117
+ allowance setup --for openclaw
118
+ allowance setup --for generic
129
119
  ```
130
120
 
131
- If no identifier flag is provided, the CLI prompts for an email address or E.164 phone number.
121
+ Authenticates via phone OTP, mints a connection token, and writes skill files for every detected agent (Claude Desktop, Codex, OpenClaw).
132
122
 
133
- The CLI uses `openclaw mcp set/show/unset` instead of editing OpenClaw config files directly.
123
+ ### Runtime checkout (used by agents)
134
124
 
135
- ## Global Flags
125
+ | Command | What It Does |
126
+ |---|---|
127
+ | `allowance request` | Request spend approval from the user; blocks until approved/denied |
128
+ | `allowance card issue` | Issue a one-time virtual card for an approved request |
129
+ | `allowance identity` | Fetch name, email, phone for checkout forms |
130
+ | `allowance address shipping` | Fetch shipping address for an approved request |
131
+ | `allowance address billing` | Fetch billing address for an approved request |
132
+ | `allowance purchase success` | Report a completed purchase |
133
+ | `allowance purchase failure` | Report a failed purchase attempt |
136
134
 
137
- - `--api-base-url` to target another environment for one invocation
138
- - `--pretty` for formatted JSON output
135
+ Runtime checkout commands output human-readable text by default. Pass `--json` to any checkout command for machine-parseable output (useful for scripting or agent use).
139
136
 
140
- Example:
137
+ ## Global Flags
141
138
 
142
- ```bash
143
- allowance --api-base-url http://127.0.0.1:8000 --pretty openclaw doctor
144
- ```
139
+ - `--api-base-url` to target another environment for one invocation
145
140
 
146
141
  ## Configuration
147
142
 
148
143
  - `ALLOWANCE_API_BASE_URL` (default: `https://api.useallowance.com`)
149
- - `ALLOWANCE_MCP_URL` (default: `https://mcp.useallowance.com`)
150
144
  - `ALLOWANCE_HTTP_TIMEOUT_SECONDS` (default: `20`)
151
145
 
152
146
  ## Tests
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@allowance/cli",
3
- "version": "0.1.2",
4
- "description": "Allowance OpenClaw MCP installation and diagnostics CLI",
3
+ "version": "0.1.3",
4
+ "description": "Allowance agent purchase wallet CLI",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -14,8 +14,8 @@
14
14
  "keywords": [
15
15
  "allowance",
16
16
  "cli",
17
- "openclaw",
18
- "mcp"
17
+ "agent",
18
+ "purchase"
19
19
  ],
20
20
  "bin": {
21
21
  "allowance": "bin/allowance.js"