netbox-super-cli¶
Dynamic NetBox CLI driven by the live OpenAPI schema. The same nsc binary works
against any NetBox version (4.5+) and exposes plugin-provided endpoints automatically
because the schema — not hand-written code — defines the surface.
Why nsc¶
- Plugins just work. New endpoints from any installed plugin appear as commands automatically.
- Multi-instance. Named profiles per NetBox instance, plus env-var overrides.
- Safe by default. Writes preview as dry-runs unless you pass
--apply. Anaudit_redaction: fullmode strips every request/response body from the audit log, leaving only{method, url, status_code, timestamp, profile}. - Fast bulk writes.
--workers Nruns up to N concurrent requests on a bulk write (default1, max32), with per-record error handling intact. - Agent-friendly. Deterministic command shape, machine-readable JSON output, stable error envelope with documented exit codes.
- Curated aliases + completion.
nsc ls/get/rm/searchover any resource — with singular forms for common ones (nsc ls device) — and dynamic shell completion of resource, profile, and enum values from the cached schema. - Interactive TUI.
nsc tuiopens a keyboard-driven UI to browse, filter, edit, bulk-edit and search — see the Interactive TUI guide.
Three killer examples¶
# 1. Read every device with status=active across the whole instance.
nsc dcim devices list --status active --all --output json
# 2. Bulk-create devices from an NDJSON file (preview first, then apply).
nsc dcim devices create -f devices.ndjson --explain
nsc dcim devices create -f devices.ndjson --apply
# 3. Run safely from CI: machine-readable output, locked exit codes.
NSC_URL=https://netbox.example.com NSC_TOKEN=$NSC_TOKEN \
nsc ipam prefixes create --field prefix=10.0.0.0/24 --apply --output json
Where to next¶
- First time? Start with Install → First run → Concepts.
- Looking for a specific pattern? Jump to the Guides.
- Need an exact command? CLI reference is auto-generated from the bundled NetBox schema.
- Curious how it works? Read Architecture: overview.