Skip to main content

Allowance agent purchase wallet CLI

Project description

allowance

allowance is the CLI for Allowance — the agent purchase wallet. It has two roles:

  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.
  2. 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

  1. Create the npm scope/org @allowance and grant maintainer access.
  2. Create an npm automation token with publish permission.
  3. Add it as a GitHub repository secret:
    • name: NPM_TOKEN
    • value: npm token string
  4. Current npm automation token expires on June 23, 2026. Rotate both the GitHub NPM_TOKEN secret and your local ~/.npmrc entry before that date.

Release flow

  1. Bump version in package.json.
  2. Commit and push main.
  3. Tag and push a npm release tag:
git tag npm-v0.1.1
git push origin npm-v0.1.1
  1. GitHub Action .github/workflows/publish-npm.yml runs 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

  1. Create a PyPI account for the maintainer/org.
  2. Create a project-scoped API token in PyPI.
  3. Add the token as a GitHub repository secret:
    • name: PYPI_API_TOKEN
    • value: pypi-...

Release flow

  1. Bump version in pyproject.toml.
  2. Commit and push main.
  3. Tag and push a version tag:
git tag v0.1.1
git push origin v0.1.1
  1. GitHub Action .github/workflows/publish-pypi.yml runs:
    • 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).

Runtime checkout (used by agents)

Command What It Does
allowance request Request spend approval from the user; 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-url to target another environment for one invocation

Configuration

  • ALLOWANCE_API_BASE_URL (default: https://api.useallowance.com)
  • ALLOWANCE_HTTP_TIMEOUT_SECONDS (default: 20)

Tests

./scripts/test_unit.sh
./scripts/test_smoke.sh
./scripts/test_all.sh

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

allowance-0.1.4.tar.gz (45.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

allowance-0.1.4-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file allowance-0.1.4.tar.gz.

File metadata

  • Download URL: allowance-0.1.4.tar.gz
  • Upload date:
  • Size: 45.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for allowance-0.1.4.tar.gz
Algorithm Hash digest
SHA256 250a03468ce7622de05815afce4ff4074af784ba20898900938be8e0f23b8732
MD5 ecfc78d849c76a0e6649c9d16bf9c987
BLAKE2b-256 85964a5ac8a4129001403791f02b3ebb7535ad4946a9f7441e8aee921679ff6c

See more details on using hashes here.

File details

Details for the file allowance-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: allowance-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for allowance-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2f309f633df9fddfd44cc9aab58beebbd77492fb0d037528f608993315cf4a2a
MD5 720834d9c09f08e61a8dba3c9edacfe2
BLAKE2b-256 e025e9745b1bb690f79f76db70d65f758f150d636e7a281f0858869dd685a9d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page