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_console-0.0.3.tar.gz (495.5 kB view details)

Uploaded Source

Built Distribution

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

netbox_console-0.0.3-py3-none-any.whl (502.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for netbox_console-0.0.3.tar.gz
Algorithm Hash digest
SHA256 d4d7ea060bd55f62706d3aa5bf0f5ccc398630e2623e89c2524c60aa74c158ea
MD5 6873312d2b06e0cc50420b18d78f5300
BLAKE2b-256 18c11c3b3b4378c8390c236b86cfaf876d34bdd1cbecb048d7e24039f0aa69ec

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for netbox_console-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1f62353b66d6a559e15ffa4c2e20e52879716b5d364e4ab6cca2acb7f97a29ed
MD5 40978d24be9cf9e456e75bb5023c0991
BLAKE2b-256 cea95cf8c034667fa699845d8d187d7a909472255c140bbafc1b76543c1c911e

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