@nativapi/cli
v0.1.3
Published
Command-line tool for Nativ.
Readme
@nativapi/cli
The Nativ command-line tool, built on @nativapi/sdk.
Installation
npm i -g @nativapi/cliThis installs the nativ binary globally.
Authenticate
nativ loginAn interactive prompt will ask for your API key (input is masked) and optionally a base URL. The values are stored in ~/.nativ/config.json with mode 0600.
Resolution precedence:
| Setting | Priority order (highest → lowest) |
|----------|------------------------------------|
| API key | --api-key flag → NATIV_API_KEY env → ~/.nativ/config.json |
| Base URL | --base-url flag → NATIV_BASE_URL env → ~/.nativ/config.json → built-in production default |
Commands
nativ login
Store your API key (and optional base URL) in the local config file.
nativ loginnativ integrations [id]
List all available integrations, or show the detail for a single one (description, available tools, required credential fields).
nativ integrations
nativ integrations githubnativ connect <integrationId>
Interactive wizard: prompts for a connected-account label then for each required credential field (password fields are masked), then creates the connection.
nativ connect githubnativ connections [id]
List all connections, or show the detail for a single one.
nativ connections
nativ connections conn_abc123nativ interactions [id]
List interaction history, or show the detail for a single interaction. Use --connection to filter history by a specific connection.
nativ interactions
nativ interactions int_xyz789
nativ interactions --connection <connectionId>nativ run <connectionId> <tool> [--input <json>]
Run a tool against a connection. Shows live status while the run is in progress; if the run pauses waiting for a 2FA code, prompts you to enter it interactively, then resumes. Prints the tool output on completion.
nativ run conn_abc123 get_profile
nativ run conn_abc123 send_message --input '{"to":"[email protected]","body":"hello"}'nativ verify <connectionId>
Re-verify a connection's credentials. Shows the same live status and 2FA prompt as run.
nativ verify conn_abc123Scriptable / --json
Pass --json as a global flag to print plain JSON to stdout instead of the interactive TUI. Useful for piping output to jq or other tools.
nativ integrations --json | jq '.[].id'
nativ connections --jsonIn --json mode, a run that requires a 2FA code will exit non-zero with a clear error message instead of hanging. Rerun without --json to handle the 2FA interactively.
Global options
| Flag | Description |
|------|-------------|
| --api-key <key> | Override the API key for this invocation |
| --base-url <url> | Override the API base URL for this invocation |
| --input <json> | JSON input string passed to run |
| --json | Print raw JSON instead of the interactive TUI |
License
MIT
