# netbox-sdk v0.0.1
netbox-sdk v0.0.1
| Field |Value |
| --- | --- |
| Canonical URL | https://emersonfelipesp.com/netbox-sdk/releases/v0.0.1 |
| GitHub URL | https://github.com/emersonfelipesp/netbox-sdk/releases/tag/v0.0.1 |
| Tag | v0.0.1 |
| State | stable |
| Author | emersonfelipesp |
| Created | 2026-03-21 15:44 UTC |
| Published | 2026-03-21 15:45 UTC |
| Target | main |
| Synced | 2026-08-24 06:53 UTC |
| Assets | 0 |
## Release notes
# First versioned release
API-first NetBox CLI and Textual TUI built on `aiohttp`, `Typer`, `Rich`, and `Textual`, driven entirely by the bundled NetBox OpenAPI schema.
## CLI and schema-driven API access
- Dynamic command routing from OpenAPI schema:
`nbx <group> <resource> list|get|create|update|delete`
- Example: `nbx dcim devices list`
- Example: `nbx ipam prefixes get --id 1`
- `--filter key=value` flags resolved against schema-indexed query parameters
- Structured table output with `--json` / `--yaml` flags and a loading spinner
- `--body-file <path>` for POST/PATCH payloads
- Cable trace:
- `--trace`
- `--trace-only`
- Available for DCIM interfaces and circuit terminations
- ASCII box-drawing renderer with Unicode line styles
- Config management:
- `nbx config setup`
- `nbx config show`
- `nbx config --show-token`
- Schema discovery:
- `nbx schema groups`
- `nbx schema resources`
- `nbx schema fields`
## TUI features
- NetBox-style shell layout:
- top search bar
- collapsible left navigation tree (`group → resource`)
- main tabbed workspace (`Results / Details / Filters`)
- footer
- Async, non-blocking data loading with instant navigation and HTTP response cache
- Results `DataTable` with row selection, keyboard navigation, and incremental refresh
- Details panel:
- paginated key/value attribute view
- semantic cell rendering:
- status badges
- label chips
- color swatches
- linked-object chips
- Dependent-object navigation:
- click a related object in the Details panel to jump directly to its detail view
- Filters panel:
- field picker built from OpenAPI schema
- active filters persist across navigations
- Cable trace panel inline in Details for `dcim/interfaces`
- `created` / `last_updated` columns always sort to the end of tables
- Hex color fields rendered as colored block swatches
## Themes
- Themes are JSON files auto-discovered from `netbox_cli/themes/`
- Built-in themes:
- `default` (NetBox dark)
- `dracula` (official palette)
- Strict schema validation on load:
- required color and variable keys
- `#RRGGBB` color format
- alias/name collision detection
- Live theme switching in TUI, persisted in `~/.config/netbox-cli/tui_state.json`
- Theme commands:
- `nbx tui --theme <name>`
- `nbx tui --theme` (list available themes)
## Demo environment support
- `nbx demo init`
- Playwright-based browser automation to authenticate against `demo.netbox.dev`
- stores an API token
- supports `--headless`, `--username`, and `--password` flags for CI use
- `nbx demo tui`
- launches TUI against `demo.netbox.dev`
- `nbx demo <group> <resource> ...`
- full dynamic command tree against demo
- v1 token fallback:
- automatic retry with `Authorization: Token` on `401/403` when a v2 token is rejected
## Security and hardening
- Base URL validation rejects:
- non-HTTP(S) schemes
- embedded credentials
- query strings
- fragments
- implemented in `config.py`
- Relative-path enforcement:
- all outbound requests are scoped to the configured NetBox base URL
- absolute URLs and paths with query/fragment are rejected
- implemented in `api.py`
- Private filesystem permissions:
- config directory/files at `0700/0600`
- HTTP cache directory/entries at `0700/0600`
- writes use explicit mode, not `umask`
- Cache key privacy:
- auth token is fingerprinted with SHA-256
- never stored in plaintext in cache file names
- Terminal output sanitization strips:
- ANSI ESC sequences (`CSI`, `OSC`, two-character forms)
- C1 control characters `U+0080–U+009F`
- including C1 `CSI` (`U+009B`) and C1 `OSC` (`U+009D`)
- raw C0 controls except newline, carriage return, and tab
- `125` automated tests covering all hardening paths
## Documentation and automation
- Material for MkDocs site with:
- Getting Started
- CLI Reference
- TUI
- Developer Guide
- `nbx docs generate-capture`
- captures every CLI command via Typer `CliRunner`
- generates Markdown and per-command JSON artifacts for the docs site
- GitHub Actions:
- CI (`pytest` matrix)
- docs deploy to GitHub Pages
- automated docs capture with Playwright against `demo.netbox.dev`
- One-liner curl installer:
`curl -fsSL .../install.sh | bash`
- installs `uv` if needed
- installs `netbox-cli` via `uv tool install git+...`
- installs Playwright Chromium
- POSIX-compatible
- Per-directory `CLAUDE.md` developer context documentation for every package, test, docs, workflow, and reference folder
## Assets
No binary assets attached.
Source archives:
| Format |URL |
| --- | --- |
| zip | https://api.github.com/repos/emersonfelipesp/netbox-sdk/zipball/v0.0.1 |
| tar.gz | https://api.github.com/repos/emersonfelipesp/netbox-sdk/tarball/v0.0.1 |