Skip to main content

Commander

Commander is a powerful command-line interface (CLI) scraping tool designed for managing and interacting with multiple network devices simultaneously.

Features

  • ⚡Blazingly Fast: Commander is optimized for speed, allowing you to execute commands swiftly across your network devices.
  • 🧵Multi-threaded: Leverage the efficiency of multi-threading to process commands concurrently, ensuring quick and efficient communication with all devices.
  • 🔒Secure by Design: Prioritizing security, Every connection is made from your local machine. in addition, Commander stores sensitive connection information, such as passwords and IPs locally on your computer, in Keepass, a renowned open-source password manager.

Problem Statement

Networks, especially in large-scale environments, often face challenges in maintaining standardization. The complexity grows, making it challenging for networking and IT teams to enforce uniform configurations across devices. Without proper tools, networks may become scattered and prone to inconsistencies, or administrators may spend hours manually configuring each device.

While tools like Ansible, Puppet, and Chef are excellent for maintaining standardization, they come with a steep learning curve, additional infrastructure management, and setup complexities.

Commander aims to provide a simpler alternative, allowing users to swiftly execute commands across multiple devices without the overhead of a complex infrastructure.

Installation

Install Commander with a simple pip command:

pip install NetworkCommander

compile from source

if you want to compile from source you can do that with poetry.

first you have to make sure poetry is installed

poetry --version

after you did that you can start the build.

poetry install
poetry build

a folder named dist will apper with the .tar.gz and .whl files.

pip install ./dist/path/to/.whl

after that you can fully use commander

Usage

Version Check

Check the version of Commander:

commander version

Initialization

Before using Commander, ensure it's initialized. Run the following command to generate the keepass database and provide the password for it:

commander init

Device Management

List Devices

List all devices under your command, optionally filtered by tags:

commander device list --tag <tag_name>

Add Device

Add a new device to the database, specifying the device's password:

commander device add "router1(cisco_ios) -> root@1.1.1.1"

Alternatively, you can provide a file containing device strings:

commander device add --devices_file path/to/devices_file

If you don't enter any device or a device file the program defaultly will read from devices from stdin.

commander device add

r1(cisco_ios) -> root@localhost:5000
^Z

Remove Device

Remove one or more devices from the database:

commander device remove <device_name_1> <device_name_2> ...

Tag Management

Add Tag

Add a tag to devices for better segmentation:

commander device tag add <tag_name> <device_name_1> <device_name_2> ...

Remove Tag

Remove a tag from devices:

commander device tag remove <tag_name> <device_name_1> <device_name_2> ...

List Tags

List all tags applied to devices:

commander device tag list

Device Connectivity

Ping Devices

this command will try to connect to every device in your database, it will not deploy any commands to the device.

optionally filter by tags.

commander device ping --tag <tag_name>

Command Deployment

in order to deploy a command to the devices in your database need to use the deploy command

commander device deploy "<command_1>" "<command_2>" 

in case you want to deploy the commands to some devices but not all you can use tags.

commander device deploy --tag "router" "<command_1>" "<command_2>" 

if there are any spasific devices you need to deploy to you can use the --device option also

commander device deploy --tag "router" --device "device not tagged with router" "<command_1>" "<command_2>" 

By default, the "deploy" command will deploy with the most basic permission level possible.

In order to escalate the permisions you need to specify the --permision_level flag

commander device deploy  --permision_level "configure_terminal" "<command_1>" "<command_2>" 

Output Folder (Optional)

Save command output to a specified folder:

commander device deploy --output_folder <path/to/output_folder> "<command>"

Conclusion

Commander provides a streamlined solution for scraping network devices, offering speed and simplicity without the complexities of traditional configuration management tools. Empower your networking and IT teams to enforce standardization across your network effortlessly.

Have a great experience with Commander!

Metadata

Release files for NetworkCommander 0.4.7

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

Source distribution (sdist)

Source distribution for NetworkCommander 0.4.7
File Size Uploaded
networkcommander-0.4.7.tar.gz 17.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for NetworkCommander 0.4.7
File Interpreter ABI Platform
networkcommander-0.4.7-py3-none-any.whl Python 3 none any Details

Total release size: 38.5 kB

Release files / networkcommander-0.4.7.tar.gz

Download URL networkcommander-0.4.7.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
53bfb87aa2a67a6751d45cad47c337f8029310597182aeb2360dabab2e468e58
BLAKE2b-256 checksum
How to use checksums
d9922d5813421c0cc827ac17aeb5598386a30d48938c2df646fc3fe7e82e68e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.3 Windows/10

Release files / networkcommander-0.4.7-py3-none-any.whl

Download URL networkcommander-0.4.7-py3-none-any.whl
Size 20.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0d3dc0bec87e71c09683644ab048bb4a6e2c9ceb5ba2895910af770780a83d5
BLAKE2b-256 checksum
How to use checksums
ba52771b62002ac8d91b605b8e2ae9e9003880aa366ce5724c935294aa09600f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.3 Windows/10

Release history Release notifications | RSS feed

This release

0.4.7 This release

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.9

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.0

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.3

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

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