Skip to content
Warrantv0.1

CLI

Three commands: init, doctor, try.

warrant has three commands — configure an MCP client, check your key reaches the API, and run one warrant end to end in sandbox.

warrant <command>

  init      configure this project's MCP client
  doctor    check the key and reach the API
  try       open, verify and settle one warrant in sandbox

Flags

  --client <claude-code|cursor|claude-desktop|codex>
  --dry-run    print what init would write, change nothing

Three commands and two flags do not justify an argument-parser dependency in something people run with npx, where every byte is a download before anything happens. The parsing is by hand for that reason.

init

Detects the MCP client from what is on disk, writes its config, prints the install line, and stops.

npx gowarrant init
npx gowarrant init --client cursor
npx gowarrant init --dry-run

Detection is by artefact rather than by asking: .mcp.json means Claude Code, .cursor/ means Cursor, .codex/ means Codex. Where nothing is detected it prints every install line rather than guessing, because guessing wrong costs more than a list.

It creates no account, mints no key and sends nothing anywhere. --dry-run shows exactly what would be written first.

doctor

Checks that a key is present and that the API answers.

export WARRANT_API_KEY=wr_test_8f0c1b4e2b1a4d599d0e3a2f7c1b9e44
npx gowarrant doctor

Reach for this when a call is failing and you are not sure whether the problem is your key, your network or your request. It exits non-zero on failure, so it works in a CI step.

try

Opens a warrant, verifies it and settles it, in sandbox, printing each step.

npx gowarrant try

This is the fastest way to see the whole lifecycle without writing code. It uses a wr_test_ key and sandbox funds — nothing real moves.

Amounts

The CLI takes decimal strings and converts them to the smallest unit before anything reaches the wire, the same as the SDK's usdc() helper.

"8.40"       →   "8400000"   8.40 USDC

What crosses the wire is always the integer string, validated against ^[0-9]+$. A JSON number is rejected — see the API reference.