allowance
allowance is the CLI for Allowance — the agent purchase wallet. It has two roles:
- 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. - Runtime checkout — the full purchase flow agents use at runtime: request approval, issue a virtual card, fetch identity/address, and report the outcome.
Install
Primary (npm):
npm install -g @allowance/cli
This npm package exposes the allowance command and bootstraps the Python runtime automatically.
Prerequisite: Python 3.12+ on PATH (python3 or python).
Secondary (pipx):
pipx install allowance
Local source install:
pipx install .
Local development:
uv sync --dev
uv run allowance --help
CLI Help UX
The CLI supports:
allowance --help
allowance -h
allowance -help
allowance --version
Publish to npm
This repo supports npm publishing through GitHub Actions.
One-time setup
- Create the npm scope/org
@allowanceand grant maintainer access. - Create an npm automation token with publish permission.
- Add it as a GitHub repository secret:
- name:
NPM_TOKEN - value: npm token string
- name:
- Current npm automation token expires on June 23, 2026. Rotate both the GitHub
NPM_TOKENsecret and your local~/.npmrcentry before that date.
Release flow
- Bump
versioninpackage.json. - Commit and push
main. - Tag and push a npm release tag:
git tag npm-v0.1.1
git push origin npm-v0.1.1
- GitHub Action
.github/workflows/publish-npm.ymlruns and publishes@allowance/cli.
After workflow success, users can install with:
npm install -g @allowance/cli
Publish to PyPI
This repo also supports PyPI publishing for pipx users.
One-time setup
- Create a PyPI account for the maintainer/org.
- Create a project-scoped API token in PyPI.
- Add the token as a GitHub repository secret:
- name:
PYPI_API_TOKEN - value:
pypi-...
- name:
Release flow
- Bump
versioninpyproject.toml. - Commit and push
main. - Tag and push a version tag:
git tag v0.1.1
git push origin v0.1.1
- GitHub Action
.github/workflows/publish-pypi.ymlruns:- lint/type/test
- build wheels/sdist
- publish to PyPI
Command surface
Setup
allowance setup # auto-detect agent
allowance setup --for claude-code
allowance setup --for codex
allowance setup --for openclaw
allowance setup --for generic
Authenticates via phone OTP, mints a connection token, and writes skill files for every detected agent (Claude Desktop, Codex, OpenClaw).
The connection token secret is stored in OS credential storage via keyring
(macOS Keychain, Windows Credential Manager, or Linux Secret Service where
available). ~/.allowance/config.json stores non-secret metadata such as
token_id and api_base_url.
Runtime checkout (used by agents)
| Command | What It Does |
|---|---|
allowance request |
Request spend approval for local browser checkout; requires --local-browser-tool and blocks until approved/denied |
allowance card issue |
Issue a one-time virtual card for an approved request |
allowance identity |
Fetch name, email, phone for checkout forms |
allowance address shipping |
Fetch shipping address for an approved request |
allowance address billing |
Fetch billing address for an approved request |
allowance purchase success |
Report a completed purchase |
allowance purchase failure |
Report a failed purchase attempt |
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).
Global Flags
--api-base-urlto target another environment for one invocation
Configuration
ALLOWANCE_API_BASE_URL(default:https://api.useallowance.com)ALLOWANCE_HTTP_TIMEOUT_SECONDS(default:20)ALLOWANCE_CONNECTION_TOKENoverrides configured credential storage for CI/debugging.
Tests
./scripts/test_unit.sh
./scripts/test_smoke.sh
./scripts/test_all.sh
Release files for allowance 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| allowance-0.1.6.tar.gz | 60.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| allowance-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 83.7 kB
Release files / allowance-0.1.6.tar.gz
| Download URL | allowance-0.1.6.tar.gz |
|---|---|
| Size | 60.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12916bdd78b42756e504d61b10a8e063dae41854f89788fdfd4455dfa70ce569
|
|
BLAKE2b-256 checksum How to use checksums |
830981d9f7820f94b8f12c9bfa7e4ec8e46a8786802b856a2c8edf2651df140a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / allowance-0.1.6-py3-none-any.whl
| Download URL | allowance-0.1.6-py3-none-any.whl |
|---|---|
| Size | 23.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c66336fbd9c486b807bf371edf6a0f3bea0ad1ae09dd7a934b4151fbbf9d1c6c
|
|
BLAKE2b-256 checksum How to use checksums |
8b4db55e40e2cbf2c321d0aafce3b62f50ad064704b7cd3b772b3cc0aba39f98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|