# netbox-sdk

Modern NetBox toolkit: an async SDK plus a CLI and a TUI for faster automation.

| Field |Value |
| --- | --- |
| Canonical URL | https://emersonfelipesp.com/netbox-sdk |
| GitHub | https://github.com/emersonfelipesp/netbox-sdk |
| Developer guide | https://emersonfelipesp.com/netbox-sdk/developer |
| Roadmap | https://emersonfelipesp.com/netbox-sdk/roadmap |
| Releases | https://emersonfelipesp.com/netbox-sdk/releases |
| Stars | 16 |
| Forks | 0 |
| Latest release | v0.0.10 |

## Overview

netbox-sdk is an SDK-first NetBox toolkit built on a single async runtime, exposing the same surface as a Python client, a Typer-powered CLI and a Textual-powered TUI.

It ships with a mock API for tests, GraphQL support, dynamic CLI commands and several Textual UIs for browsing and debugging your NetBox infrastructure.

## Features

- Standalone async NetBox REST API SDK
- Typer-based command-line interface
- Textual-based terminal UI for interactive browsing
- Async REST client with token authentication
- Dynamic CLI commands with GraphQL support
- Built-in mock API with full CRUD for local testing
- Multiple Textual TUIs for browsing and debugging infra

## Stack

- Python (async)
- Typer (CLI)
- Textual (TUI)
- Pydantic (validation)
- Material for MkDocs (docs)

## Install

Primary command:

```shell
pip install 'netbox-sdk[all]'
```

Pin a specific version: pip install 'netbox-sdk[all]==0.0.8.post1'

### Installer flow

```
┌─────────────────────────────────────────┐
  │        netbox-sdk  installer            │
  │  API-first NetBox CLI + Textual TUI     │
  │  github.com/emersonfelipesp/netbox-sdk  │
  └─────────────────────────────────────────┘
```

- Checking for uv package manager

- Updating uv: uv is up to date  (uv 0.5.20)

- Installing netbox-sdk from official PyPI

  - package: netbox-sdk

- Downloading and installing netbox-sdk: netbox-sdk installed

  - binary: ~/.local/bin/nbx

- Installing Playwright Chromium

  - required for 'nbx init'  (browser-based token retrieval)

- Downloading Chromium browser (this may take a minute): Playwright Chromium ready

```
┌─────────────────────────────────────────┐
  │   ✔  netbox-sdk is installed!       │
  └─────────────────────────────────────────┘
```

- `nbx init` - # authenticate with demo.netbox.dev

- `nbx dcim devices list` - # list devices

- `nbx demo tui` - # launch the interactive TUI

## Links

| Label |URL |
| --- | --- |
| repo | https://github.com/emersonfelipesp/netbox-sdk |
| docs | https://emersonfelipesp.com/netbox-sdk/docs/ |
