Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.20.3 instead.

snaplii-cli

Command-line client for Snaplii Agent-to-Merchant (A2M) payments. It lets AI agents and scripts buy gift cards accepted at over 500,000 locations, pay bills, and send P2P transfers — all from a prepaid Snaplii Cash balance, with cashback on every purchase and no checkout or card sharing.

Every command prints JSON, so any agent that can run a shell command can use it.

Requirements

  • Python 3.9+
  • A Snaplii account and API key. In the Snaplii app (iOS / Android) go to More → Payment Methods → AI Payment Management → + New API Key, choose a scope, and set a hard spending limit. The key is shown once.

Install

From PyPI, isolated with pipx (recommended):

pipx install snaplii-cli

From a checkout of the repository:

pipx install -e ./snaplii-cli

Plain pip install snaplii-cli also works. OS-specific pipx setup and troubleshooting are in the repository README.

Authenticate

snaplii init

Prompts for your API key with hidden input. The key is exchanged for a session token and never stored; the token is kept in your OS keychain when one is available.

Outside a recognized Muse runtime, a CLI without a working keychain does not keep a session that the next command could not reuse. In a terminal, init asks before the key whether this and future sessions may be kept in a private (mode 0600) plaintext token file; a yes saves allow_insecure_mode: true. Without a terminal it stops with no_persistent_storage, and explicit SNAPLII_ALLOW_INSECURE=1 opts into the same file. Signing in with --base-url saves that gateway as the default. Only a long-lived MCP server may hold a memory-only session. snaplii config show reports the actual storage and has_valid_token, without showing the token or API key. Protected requests require a usable session and are not automatically replayed after authentication errors.

Meta Muse secure credential store

To authenticate with an API key already saved in Muse's secure credential store:

snaplii init --vault-auth
snaplii config show

--agent-id is optional: Snaplii reuses a saved ID or generates one on successful login. Before using Snaplii, check that has_valid_token is true; the status output does not display credentials.

Recognized Muse runtimes select secure authentication by default for snaplii init and automatically keep the session token in a private file for later CLI processes. The API key remains in Muse's secure credential store. The accompanying skill directs Muse to use its native secure input when needed, and to stop on cancellation.

Run snaplii config doctor to check runtime detection and storage without logging in. If the secure path is unavailable, explicitly choose snaplii init --legacy-auth for the original hidden-input flow. --vault-auth and --legacy-auth are mutually exclusive.

For a separate test configuration, set SNAPLII_CONFIG_PATH to a new file path and use that same value for each command. This isolates Snaplii's session, not Muse's stored API key. Prerelease candidate installations keep their CLI and skill versions together; snaplii update will not replace a candidate with a PyPI release.

Usage

# Gift cards
snaplii browse tags                                  # categories and brands for your account's country
snaplii browse brand --id CB...                      # denominations and cashback
snaplii balance --country CA                         # spendable Snaplii Cash (CA=CAD, US=USD)
snaplii quote --item-id CB...-CT... --price 50       # price after voucher/cashback
snaplii purchase --item-id CB...-CT... --price 50    # buy; pays from Snaplii Cash
snaplii giftcard list                                # owned cards

# Bill pay
snaplii billpay payees
snaplii billpay save --payee-code PE... --first-name Alex --last-name Chen --amount 75.25 --account 1234567890
snaplii billpay quote --pay-code PC... --price 75.25
snaplii billpay pay --pay-code PC... --price 75.25

# P2P transfer (API key scope P2P or ALL)
snaplii transfer create --to-phone 4165550006 --amount 12.50
snaplii transfer status --order-no ZZ... --wait --timeout 330
snaplii transfer list
  • --item-id must be exactly {cardBrandId}-{cardTemplateId}, copied verbatim from the item_id in the denominations of snaplii browse brand; never either ID alone or one built by hand. Use the same value for quote and purchase.
  • Bill pay flow: payees → detail → save (returns payCode) → quote → pay → result.
  • A new transfer stays cancellable (transfer cancel) for about 5 minutes, then sends automatically; transfer finish sends it immediately. transfer status --wait polls for the outcome, but its --timeout defaults to 120s — pass a larger value (e.g. --timeout 330) to poll through the whole cancellable window.
  • snaplii help and snaplii <command> --help list every flag.

Commands

Group Commands
Auth & config init [--agent-id ID] [--vault-auth | --legacy-auth], config show, config doctor, config set --base-url URL, config clear
Catalog browse tags, browse brand --id ID
Balance & quotes balance [--country CA|US], quote --item-id ID --price P
Purchases purchase --item-id ID --price P, giftcard list, giftcard detail --card-no NO
Smart smart cashback --brand-id ID --amount A, smart dashboard
Bill pay billpay payees, billpay detail, billpay save, billpay vouchers, billpay quote, billpay pay, billpay result, billpay history
Transfers transfer create, transfer cancel, transfer finish, transfer status [--wait] [--timeout S], transfer list
Phone connection agent connect --agent NAME --phone NUMBER, agent connection, agent disconnect, agent balance, agent catalog, agent buy, agent order, agent top-up AMOUNT, agent top-up-status, agent top-up-cancel
Maintenance update, help

Safety model

Spending draws only from the prepaid Snaplii Cash balance. The per-key daily limit set in the app only covers gift cards; bill payments are not subject to it, and transfers have a separate rolling 24-hour per-key limit. Keys are scoped and can be revoked at any time from the app.

More

License

Apache License 2.0

Metadata

Release files for snaplii-cli 0.21.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snaplii-cli 0.21.0
File Size Uploaded Provenance Actions
snaplii_cli-0.21.0.tar.gz 66.3 kB With provenance Details for snaplii_cli-0.21.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for snaplii-cli 0.21.0
File Interpreter ABI Platform Actions
snaplii_cli-0.21.0-py3-none-any.whl Python 3 none any Details for snaplii_cli-0.21.0-py3-none-any.whl

Total release size: 145.1 kB

Release files / snaplii_cli-0.21.0.tar.gz

Download URL snaplii_cli-0.21.0.tar.gz
Size 66.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c03558c82f33fd5f1bff252b4b9ec90846cbffe1067d9eb3f6fe4b299f8ac854
BLAKE2b-256 checksum
How to use checksums
3d1cb8856afdb56ca71f13dd467ccd23afbc8a0e39a0e1b34099b447fc7486f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / snaplii_cli-0.21.0-py3-none-any.whl

Download URL snaplii_cli-0.21.0-py3-none-any.whl
Size 78.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6025cb52923a2350869bb2a1a56ee942c4b3156ad3757a45beecdf4af9658c52
BLAKE2b-256 checksum
How to use checksums
f5d0216607b6d96b7812ef9b5a7411053cae210b4dda9d41edb1f4c8d0ca0dc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for snaplii-cli 0.21.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for snaplii_cli-0.21.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page