link-cli
БесплатноБез исполняемых скриптовНе проверенStripe Link agent wallet CLI. Use when the user wants an agent to make payments on their behalf, create one-time-use virtual cards, spend via Machine Payments…
от okou-ai★ 81 звезда на GitHubОб этом скилле
link-cli — Stripe Link Agent Wallet
Let AI agents get secure, one-time-use payment credentials from a Link wallet — so they can complete purchases on your behalf without ever storing your real card details. Uses the OAuth 2.0 device authorization grant (RFC 8628): no browser, no localhost callback, no API token.
Repo: https://github.com/stripe/link-cli Install: runs via
npx -y @stripe/link-cli(no pre-install needed)
Auth Flow
link-cli uses device authorization. The pattern for every auth-dependent command:
- Run the command — if unauthenticated, it returns a
verification_url+phrase - Present the URL to the user and ask them to approve in the Link app
- Poll until authenticated — do not wait for the user to reply before polling
Credentials are stored at ~/.config/link-cli-nodejs/config.json.
1. Log In
npx -y @stripe/link-cli auth login --format json
Returns verification_url, phrase, and _next.command. The user visits the URL and enters the phrase in their Link app.
2. Poll Until Authenticated
Use the _next.command from the login response, or:
npx -y @stripe/link-cli auth status --interval 5 --max-attempts 60 --format json
Exits when authenticated is true. The --interval / --max-attempts flags control polling behavior.
3. Check Auth Status
npx -y @stripe/link-cli auth status --format json
Returns authenticated (bool), credentials_path, and if pending, the current verification_url + phrase.
4. Log Out
npx -y @stripe/link-cli auth logout --format json
Payment Methods
5. List Payment Methods
npx -y @stripe/link-cli payment-methods list --format json
Returns saved payment methods with id, type (CARD), name, is_default, and card_details (brand, last4, exp_month, exp_year).
Spend Requests
The core flow: create a spend request → user approves in Link app → agent receives one-time credentials.
6. Create a Spend Request
npx -y @stripe/link-cli spend-request create \
--payment-method-id "<payment-method-id>" \
--merchant-name "Gumroad" \
--merchant-url "https://example.com/checkout" \
--amount 100 \
--currency usd \
--context "Buying HTTPZine from Gumroad — a free comic about HTTP. Patrick Collison demoed this at Stripe Sessions 2026. This is a test of the Link CLI agent payment flow." \
--format json
Required for virtual card flow (--credential-type card, the default):
--payment-method-id— frompayment-methods list--merchant-name— human-readable merchant name--merchant-url— the merchant's website--amount— in cents, max 50000 ($500.00)--currency— 3-letter ISO code (default:usd)--context— min 100 characters describing the purchase and rationale
Optional:
--credential-type shared_payment_token— for MPP/HTTP 402 flows (omits--merchant-name/--merchant-url)--test— use test mode (generates test card4242 4242 4242 4242)--line-item name:<name>,unit_amount:<cents>,quantity:<n>— repeatable--total type:<type>,display_text:<text>,amount:<cents>— repeatable
Returns an approval_url and _next.command for polling.
7. Poll for Approval
npx -y @stripe/link-cli spend-request retrieve <spend-request-id> \
--interval 2 --max-attempts 150 --format json
Exits when status is approved, denied, or expired. On timeout while pending, exits non-zero with POLLING_TIMEOUT.
8. Reveal Card Details
npx -y @stripe/link-cli spend-request retrieve <spend-request-id> \
--include card --format json
When approved, the response includes a card object with number, cvc, brand, exp_month, exp_year, billing_address, and valid_until. The card is one-time-use and expires after valid_until.
9. Update a Spend Request
npx -y @stripe/link-cli spend-request update <spend-request-id> \
--merchant-url "https://example.com/new-url" --format json
10. Request Approval (Separately)
If --request-approval was omitted during create:
npx -y @stripe/link-cli spend-request request-approval <spend-request-id> --format json
Machine Payments Protocol (MPP)
For merchants that support MPP/HTTP 402, skip the checkout form entirely.
11. Decode an MPP Challenge
npx -y @stripe/link-cli mpp decode \
--challenge '<WWW-Authenticate header value>' --format json
Extracts the network_id needed for SPT spend requests.
12. Pay via MPP
npx -y @stripe/link-cli mpp pay "https://api.example.com/resource" \
--spend-request-id "<approved-spend-request-id>" \
--method GET --format json
The spend request must be approved and have credential_type: shared_payment_token. The token is single-use — if payment fails, create a fresh spend request.
Options: --method (GET/POST/PUT/DELETE/PATCH), --data '<json>', --header "Key: value" (repeat
Установить link-cli в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл link-cli?
Stripe Link agent wallet CLI. Use when the user wants an agent to make payments on their behalf, create one-time-use virtual cards, spend via Machine Payments Protocol (MPP), or manage their Link wallet. Triggers on mentions of "buy with Link", "agent payment", "Link wallet", "spend request", or "link-cli".
Как установить скилл link-cli?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл link-cli запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic