Set up with CLI

The nativeport command for humans and shell-driven agents

View as Markdown

@nativeport/cli is a zero-dependency Node 20+ command over the Agent API: find an endpoint, read its price, call it natively, check your balance. It is also published under the short alias nativeport, so npx nativeport and npx @nativeport/cli are the same thing.

1

Store your key once

npx nativeport@latest login

Prompts for the key without echoing it (or pass --key). It is validated against the gateway and stored with mode 0600 under ~/.config/nativeport/. NATIVEPORT_API_KEY in the environment always wins, which is what CI and agents should use.

2

Find, inspect, call

npx nativeport find google search
npx nativeport inspect serper
npx nativeport call serper --body '{"q":"apple inc"}'
npx nativeport account

call defaults method, path and body to the entry’s example; override with --method, --path (must start with the entry’s /<provider>), --query k=v and --body (literal JSON, @file, or - for stdin). Status goes to stderr and the body to stdout, so | jq works. Binary bodies are written to --out or an auto-named file.

Commands

CommandWhat it does
login [--key K] / logoutStore or forget the key.
accountBalance in µc and USD, status, trial state when present.
find <keywords...> [--limit N]Same ranking as GET /v1/catalog?q=.
inspect <id>The full entry with admitted actions, price, restrictions, docs and a ready curl.
call <id> [...]Runs the native route with your key.
catalogThe whole catalog.
skill [--install]Prints the SKILL.md, or installs it for Claude Code.
mcp [--client claude|cursor|json]Prints the MCP client configuration for /mcp.

Every command accepts --json. Colors appear only on a TTY and never when NO_COLOR is set.

Exit codes

CodeMeaning
0Success
1Usage error, unknown id, or a path outside the entry’s provider
2No key, or 401
3Insufficient credits (402)
4Suspended or restricted (403, 429)
5Any other non-2xx from the provider or gateway
6Network failure

An agent can branch on these without parsing text.

Source and issues: github.com/nativeport/nativeport-cli. Install globally with npm i -g @nativeport/cli for a bare nativeport command.