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

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.2.tar.gz (494.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.2-py3-none-any.whl (502.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: netbox_console-0.0.2.tar.gz
  • Upload date:
  • Size: 494.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.2.tar.gz
Algorithm Hash digest
SHA256 ce14b91a9d096640cb2fe9f09c693f2002e482caa221adf6c19b53ba240d9b10
MD5 f49430265fbca8d131b8e89b051a494c
BLAKE2b-256 b3accc5593428a86e8e42344756a85f27782fd38b6df855beb48d3dd2f77b24b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: netbox_console-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 502.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_console-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 861678d165beff43c74924d0cf9dc07da277e6eef742fa9f14bb1e15e3a0c020
MD5 1f03052cc48a551d286453e7f510138f
BLAKE2b-256 a064aaf79ee37d1d966b46ec3e3b973d6ff9035b1bcaf783e821a8eb0bbc0c1e

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