natural CLI is the fastest way to exercise the Natural API while you build an agent: run a call before you wire it into code, and set up the agent and wallets your code will run against. Every resource command maps one-to-one to an API endpoint.
Install
The install script auto-detects your OS and architecture and needs no toolchain. macOS and Linux:natural to ~/.natural/bin, adding that directory to your shell profile when possible. Confirm it:
Restart your shell after installation if
natural is not immediately found on your PATH.curl -fsSL https://natural.com/install.sh | NATURAL_VERSION=x.y.z bash. Natural publishes .zip archives for macOS and .tar.gz archives for Linux, with Intel and ARM builds, under https://natural.com/install/v<version>/. Check the current version.
Update
Once installed,natural update upgrades the CLI in place:
Authenticate
For local, interactive use, sign in with browser OAuth:natural login opens a Natural authorization page, returns through a local redirect, and stores OAuth credentials on your machine. Access tokens are short-lived and refreshed automatically, so you can use the full CLI without creating or pasting an API key.
Use an API key for CI, non-interactive scripts, SDK/REST integrations, or as an explicit override:
sk_ntl_prod_.
Confirm it works:
natural <resource> <verb> [flags]. Add --help to any command for its flags.
Test in the sandbox
Point the CLI at the sandbox with a sandbox key, and use thenatural simulations commands to act as the counterparty:
Test a call before you code it
Run an endpoint from the terminal and see the real response shape before you wire it into your agent.--debug prints the full HTTP request and response, the same call your SDK will make:
--amount is in cents. counterparty is a typed object (email, phone, party_id, agent_id, or handle) passed through --params, or send the whole body with --json. Reusing an --idempotency-key safely returns the original result instead of charging twice.
Provision what your agent runs against
Your agent needs an agent identity, a funded wallet, and (when it acts for customers) customer connections. Set them up once:natural external-accounts list then gives you the eac_* id to deposit from.
Check what your agent sees
When you’re debugging agent behavior, inspect the same state your agent reads:Flags that work on every command
The API key comes from the
NATURAL_API_KEY environment variable or your stored OAuth login; there is no key flag.
Related
- SDKs: Python and TypeScript client libraries
- MCP: Connect Claude, Cursor, and other AI hosts to Natural
- API reference: Field-level detail for every endpoint