Skip to main content

NetBox Toolkit Plugin

The NetBox Toolkit plugin allows you to run command execution directly from NetBox device pages or via the API. Features command variables, command history, encrypted credential storage with token authentication for API, and comprehensive logging options.

⚠️ EARLY DEVELOPMENT WARNING ⚠️ This plugin is in very early development and not recommended for production use. There will be bugs and possible incomplete functionality. Use at your own risk! If you do, give some feedback in Discussions

📋 Feature Overview

  • 🔧 Command Creation: Define platform-specific commands (show/config types) with variables
  • ⚡ Command Execution: Run commands from device pages via "Toolkit" tab or REST API
  • 📄 Raw Output: View complete, unfiltered command responses
  • 🔍 Parsed Output: Automatic JSON parsing using textFSM templates
  • 📊 Command Logs: Complete execution history with timestamps
  • 🔐 Secure Credentials: Encrypted storage with credential tokens via API, or on-the-fly entry in the GUI (no storage required)
  • 📊 Statistics Dashboard: Execution analytics, success rates, and performance metrics
  • 🚀 Bulk Operations: Execute multiple commands across multiple devices via API
  • 🐛 Debug Logging: Optional detailed logging for troubleshooting

Built with:

  • Scrapli: Primary network device connection library (SSH/Telnet/NETCONF)
  • Scrapli Community: Extended platform support for network devices
  • Netmiko: Fallback SSH client for enhanced device compatibility
  • TextFSM: Structured data parsing for command outputs

Security Architecture:

  • Credential Token System: Secure API execution using credential tokens (no password transmission)
  • Fernet Encryption: AES-128 CBC + HMAC-SHA256 for credential encryption
  • Argon2id: Secure key derivation and token hashing with pepper-based authentication
  • Encrypted Storage: Device credentials encrypted with unique keys per set
  • User Isolation: Credential tokens bound to specific users
  • No Credential Transmission: Passwords never sent in API calls
  • Secure Audit Trail: Operations logged with sanitized data (credentials excluded from change logs)

🛠️ Developed With:

VS Code Dev Containers GitHub Copilot Roo Code

📚 Essential Guides

🚀 Getting Started

🔌 API Integration

📋 Configuration Examples

👨‍💻 Development

Demo

Demo from older plugin version

Plugin Demo

Quick Start

Installation:

# 1. Install the plugin
pip install netbox-toolkit-plugin

# 2. Add to NetBox configuration.py
PLUGINS = ['netbox_toolkit_plugin']

# 3. Configure security pepper (REQUIRED)
python3 -c "import secrets; print(secrets.token_urlsafe(48))"  # Generate pepper

PLUGINS_CONFIG = {
    'netbox_toolkit_plugin': {
        'security': {
            'pepper': 'your-generated-pepper-here',
        },
    },
}

# 4. Run migrations and restart
python3 manage.py migrate netbox_toolkit_plugin
python3 manage.py collectstatic --no-input
sudo systemctl restart netbox netbox-rq

Initial Setup (Required):

  1. Set up permissions - Grant users access to execute commands
  2. Create commands - Define platform-specific commands (e.g., "show version")

Note: Using credential token allows for secure command execution via API without transmitting passwords! 🔒

  1. Add credentials (Optional for GUI) - Create credential sets or enter on-the-fly per command (GUI) / Create credential set and copy token (API)

Using the GUI:

  1. Navigate to any device page → "Toolkit" tab
  2. Select a command, enter variables (if any), choose credentials (or enter on-the-fly), and execute
  3. View results with raw or parsed output

Using the API:

Execute commands programmatically:

curl -X POST "https://netbox.example.com/api/plugins/toolkit/commands/17/execute/" \
  -H "Authorization: Token <your-netbox-api-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "device_id": 1,
    "credential_token": "<your-credential-token>"
  }'

📖 Full installation guide: Plugin Installation

Contributing

🚀 Want to Contribute? Get started quickly with the Dev Container setup or use the Contributor Guide for a complete overview of the codebase.

Completed Features:

  • ✅ API returns both parsed and raw command output
  • ✅ Command variables with NetBox attribute integration (interfaces, VLANs, IPs)
  • ✅ Statistics dashboard with execution analytics
  • ✅ On-the-fly credential entry (no storage required)
  • ✅ Argon2id security with pepper-based authentication
  • ✅ Search functionality across commands and logs
  • ✅ Platform normalization for connector selection
  • ✅ CSV export for parsed command outputs

Future Features:

  • ⬜ Diff/Comparison Tools - Compare command outputs over time or between devices
  • ⬜ Enhanced Variable Types - Support for more NetBox objects (sites, tenants, device roles, cables, etc.)

Metadata

Release files for netbox-toolkit-plugin 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netbox-toolkit-plugin 0.1.6
File Size Uploaded Provenance Actions
netbox_toolkit_plugin-0.1.6.tar.gz 115.5 kB With provenance Details for netbox_toolkit_plugin-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for netbox-toolkit-plugin 0.1.6
File Interpreter ABI Platform Actions
netbox_toolkit_plugin-0.1.6-py3-none-any.whl Python 3 none any Details for netbox_toolkit_plugin-0.1.6-py3-none-any.whl

Total release size: 267.4 kB

Release files / netbox_toolkit_plugin-0.1.6.tar.gz

Download URL netbox_toolkit_plugin-0.1.6.tar.gz
Size 115.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e73c1f2f63d103711215964a5dd4178261c8181ef38f8d422e2318318c86d467
BLAKE2b-256 checksum
How to use checksums
5c39641b552d664cb940bc215fc9a7c22ab010141a26a29674d28d2ea02d97f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2025.

Transparency log

Release files / netbox_toolkit_plugin-0.1.6-py3-none-any.whl

Download URL netbox_toolkit_plugin-0.1.6-py3-none-any.whl
Size 151.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4935fc963ea33edca37de7cd0a493b3671fa73006d9638151b10978603b10515
BLAKE2b-256 checksum
How to use checksums
3d98993671b502665b23b0ce1f804290b190c6a36a3cf48e456bb0f185ef6f7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2025.

Transparency log

Security for netbox-toolkit-plugin 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for netbox_toolkit_plugin-0.1.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page