nexla-cli
Command-line client for the Nexla agent API. Depends on only typer and
httpx — no FastAPI, Daytona, Supabase, or other backend dependencies.
Install
PyPI (recommended)
Requires Python 3.12+. Installs a self-contained package — nothing to approve, works out of the box:
uv tool install nexla-cli # or: pipx install nexla-cli / pip install nexla-cli
Run once-off without installing:
uvx nexla-cli sources list
npm (native binary, no Python required)
npm install -g @nexla/nexla-cli
This installs a prebuilt native binary behind a thin npm/ wrapper — no
Python interpreter needed on the target machine.
Note (npm 11+): the binary is fetched in a
postinstallstep, so npm may print anallow-scriptswarning during install. Installation still completes andnexla-cliworks — no action needed. (npm approve-scriptsis not required, and does not apply to global installs.) The PyPI/uv install above has no install script at all.
From source
uv tool install "git+https://github.com/nexla-opensource/nexla-agent-cli.git"
Quick start
export NEXLA_API_URL=https://<your-deployed-api>
export NEXLA_TOKEN=$(nexla-cli login --service-key <your-service-key>)
nexla-cli sources list
nexla-cli login prints a bearer token to stdout (see command substitution
above); alternatively, set the following environment variables directly:
NEXLA_API_URL— base URL of the deployed Nexla agent APINEXLA_TOKEN— bearer token to authenticate requests
Using this CLI from Claude Code
The package ships a Claude Code skill in two layers, both installed alongside the nexla_cli package:
SKILL.md+AGENTS.md— the thin CLI-specific adapter: output modes,--dry-run,--json/--paramsprecedence,--wait-until, exit codes, response sanitization, and the DB-sink table preflight — invariants an agent can't infer from--helpalone.skill_pack/reference/+skill_pack/examples/— the canonical Nexla domain docs (connector configs and probe shapes, credential/OAuth modes, Quartz cron, DB query macros, custom REST iteration types, transforms, toolsets/MCP, monitoring, and worked end-to-end examples), vendored fromnexla/express-codeso there's one canonical domain source. Seeskill_pack/VENDORED_FROM.md.
Claude Code only discovers skills placed at ~/.claude/skills/<name>/SKILL.md (global) or .claude/skills/<name>/SKILL.md (project-local) — a file merely present inside an installed package isn't picked up automatically. Install it once, after installing the CLI (works the same way regardless of whether you installed via uv tool, pipx, pip, or the npm-wrapped binary):
nexla-cli skill install
# or, for a project-local install instead of the global default:
nexla-cli skill install --target .claude/skills/nexla-cli
skill install copies all three parts (SKILL.md, AGENTS.md, and the whole skill_pack/ tree). Re-run it after upgrading nexla-cli to pick up any content changes. Restart Claude Code (or start a new session) afterward for it to be picked up.
Install targets — Claude Code, Codex, OpenCode, and others
--target accepts any directory — it just copies the skill tree there. Point it at whatever directory your agent discovers skills in:
# Claude Code — global (default) or project-local:
nexla-cli skill install # ~/.claude/skills/nexla-cli
nexla-cli skill install --target .claude/skills/nexla-cli # project-local
# Any other agent — point --target at that agent's skills directory, e.g.:
nexla-cli skill install --target ~/.codex/skills/nexla-cli # Codex
nexla-cli skill install --target ~/.config/opencode/skills/nexla-cli # OpenCode
The Codex / OpenCode paths above are examples — if your install discovers skills elsewhere, pass that directory instead. The content is plain Markdown, so it's useful to any agent that reads a skills/instructions directory.
Standalone OAuth limitation
The vendored domain docs describe a connect_oauth_credential flow and an explore_credential UI that only exist inside the Express agent sandbox. A standalone nexla CLI cannot run the interactive OAuth consent flow. For OAuth-only connectors, complete the grant in the Nexla web UI and reuse the resulting credential by id, or use a non-OAuth (service-account / API-key) auth mode with nexla-cli credentials create. Each affected vendored doc carries a note mapping the sandbox surface onto standalone CLI commands.
Global flags
Available on every command except login and schema (both always print raw output regardless of these flags):
| Flag | Effect |
|---|---|
--output / -o table|json|ndjson |
Force an output mode. Defaults to table on a TTY, json otherwise (also settable via NEXLA_OUTPUT/OUTPUT_FORMAT). |
--fields id,name,... |
Mask output down to just these keys, on any list/get. |
--page-all |
Stream every page of a list command as NDJSON instead of returning one page. |
These can be placed before or after the subcommand, e.g. both nexla-cli --output json sources list and nexla-cli sources list --output json work.
Because these flags are hoisted from anywhere in the command line, -o, --output, --fields, and --page-all are reserved: an argument or value that must be one of those literal strings has to come after a -- end-of-options separator, which stops the hoisting (everything after -- is passed through untouched), e.g. nexla-cli sources get -- --output.
Every mutating command also accepts --dry-run: runs a shallow structural lint of the request body (required fields present + top-level types) and prints {"valid": ...} without making the real (mutating) call. It does not check enums, patterns, formats, numeric bounds, or nested objects — the live API still fully validates those on the real call.
Raw JSON payloads
create/update-style commands (sources, sinks, credentials, toolsets, nexsets transform, mcp-servers attach, tools set-runtime-config) accept the full request body directly, not just their named flags:
nexla-cli sources create --name my-source --connector s3 --json '{"credential_id": 123}'
nexla-cli sources update 42 --params description="updated via params"
Precedence when a key is given more than one way: named CLI flags win, then --json, then --params (lowest). This lets you set a field the CLI hasn't added a dedicated flag for yet, without waiting on a CLI release.
Response sanitization
Every response is passed through a sanitizer before rendering, in every output mode: ANSI escape sequences, control characters, and invisible Unicode (zero-width spaces, byte-order marks, bidirectional overrides) are stripped unconditionally — always on, no flag. This defends against a malicious API response field hijacking a human's terminal, or hiding text from a human while an agent still reads it. It is not a semantic filter — API response content should still be treated as untrusted data (see AGENTS.md), this only strips characters no legitimate field value would ever need.
Full command reference
nexla-cli --help
nexla-cli <resource> --help
| Resource | Commands |
|---|---|
login |
login --service-key <key> [--api-url <url>] — exchanges a service key for a bearer token, printed to stdout |
schema |
schema [<resource>.<verb>] — machine-readable JSON signature of one command or the whole /nexla/* surface, fetched live from the deployed API's OpenAPI doc |
sources |
list, get, create, update, activate, pause, delete, sample, file-upload |
sinks |
list, get, create, update, activate, pause, delete |
nexsets |
list, get, transform, activate |
credentials |
list, get, create, update, delete |
flows |
list, get, activate, pause, delete |
transforms |
test |
connectors |
search, describe, describe-credential, describe-credential-mode, describe-source, describe-source-endpoint, describe-sink, describe-sink-endpoint |
probe |
run |
toolsets |
list, get, create, update, delete, add-nexsets |
tools |
list, get, set-runtime-config, clear-runtime-config, delete |
mcp-servers |
list, attach, sync, detach (nested under a toolset) |
triage |
errors, status, run, metrics, resource-status, org-metrics, user-metrics, notifications, search, logs, quarantine — flow/log triage via the Nexla monitoring MCP server, not the main API |
context |
get |
orgs |
list, get |
code-containers |
list |
metrics |
catalog, for-resource, get |
users |
list, get |
notifications |
list |
code-containers, metrics, users, and notifications proxy resources the API hasn't implemented yet (they return HTTP 501 until it does). orgs get (unlike orgs list) is also currently unimplemented, returning the same stub response for any id.
Exit codes
| Code | Meaning |
|---|---|
| 0 | success |
| 2 | bad local input (validation, --dry-run failure) |
| 3 | NEXLA_API_URL/NEXLA_TOKEN not set |
| 4 | 401/403 from the API |
| 5 | 404 |
| 6 | 5xx from the API |
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nexla_cli-0.3.1.tar.gz.
File metadata
- Download URL: nexla_cli-0.3.1.tar.gz
- Upload date:
- Size: 155.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c9b56ea1d69e6e0475c585017bb22d1ee362cb20313bad3825c58244e45c11d
|
|
| MD5 |
a3667f2bcd807c53b6627fa727974522
|
|
| BLAKE2b-256 |
9a86d8376f40b9ae52c4523664cc996672319925940e278379ccf043eab942b5
|
Provenance
The following attestation bundles were made for nexla_cli-0.3.1.tar.gz:
Publisher:
publish-pypi.yml on nexla-opensource/nexla-agent-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nexla_cli-0.3.1.tar.gz -
Subject digest:
9c9b56ea1d69e6e0475c585017bb22d1ee362cb20313bad3825c58244e45c11d - Sigstore transparency entry: 2180470008
- Sigstore integration time:
-
Permalink:
nexla-opensource/nexla-agent-cli@81117de370519d6a21d1e70fe36c0619552d0fcb -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/nexla-opensource
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@81117de370519d6a21d1e70fe36c0619552d0fcb -
Trigger Event:
push
-
Statement type:
File details
Details for the file nexla_cli-0.3.1-py3-none-any.whl.
File metadata
- Download URL: nexla_cli-0.3.1-py3-none-any.whl
- Upload date:
- Size: 111.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a990d407ef70adcc13af8c0310563d51a141eff1cc9ae4935518f6fe7dd2961
|
|
| MD5 |
ce6e997cf1ca3c8bf80a509fd66b71f4
|
|
| BLAKE2b-256 |
d370d940bf49da1c71d81a3c48890baf14f16e62e52332d5d5f5dcf189d4f33d
|
Provenance
The following attestation bundles were made for nexla_cli-0.3.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on nexla-opensource/nexla-agent-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nexla_cli-0.3.1-py3-none-any.whl -
Subject digest:
3a990d407ef70adcc13af8c0310563d51a141eff1cc9ae4935518f6fe7dd2961 - Sigstore transparency entry: 2180470327
- Sigstore integration time:
-
Permalink:
nexla-opensource/nexla-agent-cli@81117de370519d6a21d1e70fe36c0619552d0fcb -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/nexla-opensource
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@81117de370519d6a21d1e70fe36c0619552d0fcb -
Trigger Event:
push
-
Statement type: