Skip to main content

CLI for netbox using pynetbox module

Project description

NetBox Client

Extensible command-line interface for Netbox using pynetbox module.

asciicast

usage: nbcli [-h] <command> ...

Extensible CLI for Netbox

optional arguments:
  -h, --help  show this help message and exit

Commands:
  <command>
    init      Initialize nbcli.
    search    Search Netbox Objects
    show      Show detail view of Netbox Object
    shell     Launch interactive shell
    pynb      Wrapper for pynetbox

General Options:
  -h, --help           show this help message and exit
  -v, --verbose        Show more logging messages
  -q, --quiet          Show fewer logging messages

Notable Features

  • Search Netbox instance from command line
  • Show detail view of objects
  • pynb Command line wrapper for pynetbox
  • Shell with preloaded pynetbox endpoints
    • Run scripts in shell environment.
  • Customizable table/detail views
  • Extensible by adding custom commands

Quickstart

$ pip install nbcli
$ nbcli init
Edit pynetbox 'url' and 'token' entries in user_config.yml:
        ~/.nbcli/user_config.yml

At the very minimum, you need to specify a url and token in the user_config.yml file

pynetbox:
  url: http://localhost:8080
  token: 0123456789abcdef0123456789abcdef01234567

If you need to disable SSL verification, add (or uncomment) the following to your user_config.yml file.

requests:
  verify: false

More configuration options can be found here.

Testing

Instructions for setting up a test environment are here.

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

nbcli-0.6.0.dev1.tar.gz (17.1 kB view hashes)

Uploaded Source

Built Distribution

nbcli-0.6.0.dev1-py3-none-any.whl (35.7 kB view hashes)

Uploaded Python 3

Supported by

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