Skip to main content

API-first NetBox CLI + Textual TUI

Project description

NetBox CLI and TUI

netbox-cli is a terminal client for NetBox with two ways to work:

  • fast command-line operations such as nbx dcim devices get --id 1
  • interactive terminal apps such as nbx tui and nbx dev tui

Temporary naming note: the GitHub repository remains netbox-cli, but the published PyPI package is currently netbox-console due to PyPI naming policy constraints tracked in https://github.com/pypi/support/issues/9925. This will be reverted to netbox-cli on PyPI after that issue is resolved.

Quick Start with the Demo Instance

Install (official PyPI):

sudo apt-get update && sudo apt-get install -y curl
curl -fsSL https://raw.githubusercontent.com/emersonfelipesp/netbox-cli/main/install.sh | bash

Reload your shell:

source ~/.bashrc   # bash
source ~/.zshrc    # zsh

Authenticate against the public demo instance:

nbx demo init

Try a few commands:

nbx demo dcim devices list
nbx demo ipam prefixes list
nbx demo tui
nbx demo dev tui

Install

Install from official PyPI:

pip install netbox-console

or with uv:

uv tool install --force netbox-console

Install from a local checkout (developer workflow):

cd <path-to-netbox-cli>
uv tool install --force .

If nbx is not available after install, make sure ~/.local/bin is in your PATH.

Configure

Set up your normal profile:

nbx init

Set up the demo profile:

nbx demo init

You can also pass credentials directly when needed:

nbx demo init --username <your-demo-user> --password <your-demo-password>

Common Commands

List and inspect resources:

nbx dcim devices list
nbx dcim devices get --id 1
nbx ipam prefixes list

Create or update objects:

nbx ipam ip-addresses create --body-json '{"address":"192.0.2.10/24","status":"active"}'
nbx dcim devices patch --id 1 --body-json '{"name":"edge-sw01"}'

Send direct HTTP requests:

nbx call GET /api/status/
nbx call POST /api/ipam/ip-addresses/ --body-file ./payload.json

Explore available groups, resources, and operations:

nbx groups
nbx resources dcim
nbx ops dcim devices

TUI Modes

Main TUI:

nbx tui
nbx demo tui

Developer workbench:

nbx dev tui
nbx demo dev tui

Log viewer:

nbx logs

Themes

List available themes:

nbx tui --theme

Start with a specific theme:

nbx tui --theme dracula
nbx tui --theme netbox-light
nbx dev tui --theme netbox-dark

You can also change themes live from the top-left theme selector in the TUI.

Useful TUI Keys

  • / focus search
  • g focus navigation
  • s focus results
  • r refresh current resource
  • f open filters
  • d switch to details
  • q quit

Custom Themes

Built-in themes include:

  • netbox-dark
  • dracula
  • netbox-light

You can add your own theme by placing a JSON theme file in netbox_cli/themes/.

Tips

  • nbx demo ... uses a separate demo profile from your normal nbx ... profile.
  • If a command works in the CLI, there is usually a matching flow in the TUI.
  • The Dev TUI is useful for exploring endpoints, request timing, and raw JSON responses.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netbox_sdk-0.0.3.tar.gz (499.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netbox_sdk-0.0.3-py3-none-any.whl (504.1 kB view details)

Uploaded Python 3

File details

Details for the file netbox_sdk-0.0.3.tar.gz.

File metadata

  • Download URL: netbox_sdk-0.0.3.tar.gz
  • Upload date:
  • Size: 499.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for netbox_sdk-0.0.3.tar.gz
Algorithm Hash digest
SHA256 178b70c5a0f7c7a4e4ef3bf8813f4287b8bcc7d3442affd5496428d65d3d2f06
MD5 72e24315b548c5f1dcf6d432567b66f1
BLAKE2b-256 9ce44bbf5507e9a5ffeb372811ec648308f3024664d350747cb66b885a64e887

See more details on using hashes here.

File details

Details for the file netbox_sdk-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: netbox_sdk-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 504.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for netbox_sdk-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d361058cec5452ff423cccb489947b0baa51f1f4f5a9869be42ed51558f7e013
MD5 9d88e2a130e3e8e2d759e4edaf8a8e74
BLAKE2b-256 3e58fe3c2389f4b57bd89ded2a87cdf6deb659c48df8a666ef27b97cbbe6241f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page