CLI Reference¶
This page is auto-generated from the actual CLI code so it always reflects the real commands. No manual maintenance needed.
nw¶
Networka (nw)
A powerful multi-vendor CLI tool for automating network devices based on ssh protocol. Built with async/await support and type safety in mind.
QUICK START: nw run sw-acc1 '/system/clock/print' # Execute command nw run office_switches system_info # Run sequence on group
For detailed help on any command: nw
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--version |
boolean | Show version information | False |
-h , --help |
boolean | Show this message and exit. | False |
nw backup¶
Backup operations for network devices
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
-h , --help |
boolean | Show this message and exit. | False |
nw backup comprehensive¶
Perform comprehensive backup including vendor-specific data.
Performs a comprehensive backup for the specified device or group, including vendor-specific configuration and operational data.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--download / --no-download |
boolean | Download created backup/export files after running the sequence | True |
--delete-remote / --keep-remote |
boolean | Delete remote backup/export files after successful download | False |
--config , -c |
path | Configuration file path | /home/runner/.config/networka |
--verbose , -v |
boolean | Enable verbose output | False |
-h , --help |
boolean | Show this message and exit. | False |
nw backup config¶
Backup device configuration.
Performs a configuration backup for the specified device or group.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--download / --no-download |
boolean | Download created backup/export files after running the sequence | True |
--delete-remote / --keep-remote |
boolean | Delete remote backup/export files after successful download | False |
--config , -c |
path | Configuration file path | /home/runner/.config/networka |
--verbose , -v |
boolean | Enable verbose output | False |
-h , --help |
boolean | Show this message and exit. | False |
nw backup vendor-config¶
Create device configuration backup using vendor-specific platform methods.
Creates a text representation of the device configuration using platform-specific implementations rather than command sequences. This provides direct vendor API access for configuration export operations.
MikroTik RouterOS: Uses /export commands Cisco IOS/IOS-XE: Uses show running-config commands
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--download / --no-download |
boolean | Download created configuration backup files after running the sequence | True |
--delete-remote / --keep-remote |
boolean | Delete remote configuration backup files after successful download | False |
--config , -c |
path | Configuration file path | /home/runner/.config/networka |
--verbose , -v |
boolean | Enable verbose output | False |
-h , --help |
boolean | Show this message and exit. | False |
nw backup vendors¶
Show which vendors support backup operations.
Lists all supported vendors and their backup operation capabilities.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
-h , --help |
boolean | Show this message and exit. | False |
nw config¶
Configuration management commands
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
-h , --help |
boolean | Show this message and exit. | False |
nw config init¶
Initialize a network toolkit configuration in OS-appropriate location.
Creates a complete starter configuration with: - .env file with credential templates - config.yml with core settings - devices/ with MikroTik and Cisco examples - groups/ with tag-based and explicit groups - sequences/ with global and vendor-specific sequences - JSON schemas for YAML editor validation (optional) - Shell completions (optional) - Additional predefined sequences from GitHub (optional)
Default locations by OS: - Linux: ~/.config/networka/ - macOS: ~/Library/Application Support/networka/ - Windows: %APPDATA%/networka/
The 'nw' command will automatically find configurations in these locations.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--force , -f |
boolean | Overwrite existing files | False |
--yes , -y |
boolean | Non-interactive: accept defaults | False |
--dry-run |
boolean | Show actions without writing changes | False |
--install-sequences / --no-install-sequences |
boolean | Install additional predefined vendor sequences from GitHub | None |
--git-url |
text | Git URL for sequences when using --sequences-source git | None |
--git-ref |
text | Git branch/tag/ref for sequences | main |
--install-completions / --no-install-completions |
boolean | Install shell completion scripts | None |
--shell |
text | Shell for completions (bash or zsh) | None |
--activate-completions / --no-activate-completions |
boolean | Activate completions by updating shell rc file | None |
--install-schemas / --no-install-schemas |
boolean | Install JSON schemas for YAML editor validation and auto-completion | None |
--verbose , -v |
boolean | Enable verbose logging | False |
-h , --help |
boolean | Show this message and exit. | False |
nw config validate¶
Validate the configuration file and show any issues.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--config , -c |
path | Configuration file path | /home/runner/.config/networka |
--output-mode , -o |
choice (default | light | dark | no-color | raw | json ) |
Output decoration mode: default, light, dark, no-color, raw | None |
--verbose , -v |
boolean | Show detailed validation information | False |
-h , --help |
boolean | Show this message and exit. | False |
nw diff¶
Diff config, a command, or a sequence.
Examples: - nw diff sw-acc1 config -b baseline/export_compact.txt - nw diff sw-acc1 "/system/resource/print" -b baseline/resource.txt - nw diff lab_devices system_info -b baseline_dir/ - nw diff sw-acc1,sw-acc2 "/system/resource/print" # device-to-device - nw diff sw-acc1,sw-acc2 config # device-to-device
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--baseline , -b |
path | Baseline file (for config/command) or directory (for sequence). | None |
--ignore |
text | Regex to ignore lines; repeat for multiple patterns. | None |
--save-current |
path | Optional path to save the current fetched state (file or directory). | None |
--config , -c |
path | Configuration file path | /home/runner/.config/networka |
--output-mode , -o |
choice (default | light | dark | no-color | raw | json ) |
Output decoration mode: default, light, dark, no-color, raw | None |
--verbose , -v |
boolean | Enable verbose logging | False |
--store-results , -s |
boolean | Store diff outputs to files | False |
--results-dir |
text | Override results directory | None |
-h , --help |
boolean | Show this message and exit. | False |
nw download¶
Download a file from a device or all devices in a group.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--delete-remote / --keep-remote |
boolean | Delete remote file after successful download | False |
--verify / --no-verify |
boolean | Verify download by comparing file sizes | True |
--config , -c |
path | Configuration file path | /home/runner/.config/networka |
--verbose , -v |
boolean | Enable verbose output | False |
-h , --help |
boolean | Show this message and exit. | False |
nw firmware¶
Firmware management operations
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
-h , --help |
boolean | Show this message and exit. | False |
nw firmware bios¶
Upgrade BIOS on network devices.
Upgrades device BIOS/RouterBOOT using platform-specific implementations.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--precheck-sequence |
text | Pre-check sequence name | pre_maintenance |
--skip-precheck |
boolean | Skip pre-check sequence | False |
--config , -c |
path | Configuration file path | /home/runner/.config/networka |
--verbose , -v |
boolean | Enable verbose output | False |
-h , --help |
boolean | Show this message and exit. | False |
nw firmware downgrade¶
Downgrade firmware on network devices.
Uploads and installs firmware downgrade on the specified device or group.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--precheck-sequence |
text | Pre-check sequence name | pre_maintenance |
--skip-precheck |
boolean | Skip pre-check sequence | False |
--config , -c |
path | Configuration file path | /home/runner/.config/networka |
--verbose , -v |
boolean | Enable verbose output | False |
-h , --help |
boolean | Show this message and exit. | False |
nw firmware upgrade¶
Upgrade firmware on network devices.
Uploads and installs firmware upgrade on the specified device or group.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--precheck-sequence |
text | Pre-check sequence name | pre_maintenance |
--skip-precheck |
boolean | Skip pre-check sequence | False |
--config , -c |
path | Configuration file path | /home/runner/.config/networka |
--verbose , -v |
boolean | Enable verbose output | False |
-h , --help |
boolean | Show this message and exit. | False |
nw firmware vendors¶
Show which vendors support firmware operations.
Lists all supported vendors and their firmware operation capabilities.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
-h , --help |
boolean | Show this message and exit. | False |
nw info¶
Show comprehensive information for devices, groups, or sequences.
Supports comma-separated device names, group names, and sequence names.
Examples: - nw info sw-acc1 # Show device info - nw info sw-acc1,sw-acc2 # Show multiple devices - nw info access_switches # Show group info - nw info system_info # Show sequence info (all vendors) - nw info system_info --vendor cisco_iosxe # Show vendor-specific commands - nw info sw-acc1,access_switches,health_check # Mixed types
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--config , -c |
path | Configuration directory or file path | /home/runner/.config/networka |
--vendor |
text | Show vendor-specific commands for sequences (e.g., cisco_iosxe, mikrotik_routeros) | None |
--output-mode , -o |
choice (default | light | dark | no-color | raw | json ) |
Output decoration mode: default, light, dark, no-color, raw | None |
--verbose , -v |
boolean | Enable verbose logging | False |
--interactive-auth , -i |
boolean | Prompt for username and password interactively | False |
-h , --help |
boolean | Show this message and exit. | False |
nw list¶
List network devices, groups, sequences, and platform information
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
-h , --help |
boolean | Show this message and exit. | False |
nw list devices¶
List all configured network devices.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--config , -c |
path | Configuration file path | /home/runner/.config/networka |
--output-mode , -o |
choice (default | light | dark | no-color | raw | json ) |
Output decoration mode: default, light, dark, no-color, raw | None |
--verbose , -v |
boolean | Enable verbose logging | False |
-h , --help |
boolean | Show this message and exit. | False |
nw list groups¶
List all configured device groups and their members.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--config , -c |
path | Configuration file path | /home/runner/.config/networka |
--output-mode , -o |
choice (default | light | dark | no-color | raw | json ) |
Output decoration mode: default, light, dark, no-color, raw | None |
--verbose , -v |
boolean | Show detailed information | False |
-h , --help |
boolean | Show this message and exit. | False |
nw list sequences¶
List all available command sequences, optionally filtered by vendor or category.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--config , -c |
path | Configuration file path | /home/runner/.config/networka |
--vendor , -v |
text | Filter by vendor platform | None |
--category |
text | Filter by sequence category | None |
--output-mode , -o |
choice (default | light | dark | no-color | raw | json ) |
Output decoration mode: default, light, dark, no-color, raw | None |
--verbose |
boolean | Show detailed information | False |
-h , --help |
boolean | Show this message and exit. | False |
nw list supported-types¶
Show supported device types and platform information.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--verbose , -v |
boolean | Show detailed information | False |
-h , --help |
boolean | Show this message and exit. | False |
nw run¶
Execute a single command or a sequence on a device or a group.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--config , -c |
path | Configuration directory or file path | /home/runner/.config/networka |
--verbose , -v |
boolean | Enable verbose logging | False |
--store-results , -s |
boolean | Store command results to files | False |
--results-dir |
text | Override results directory | None |
--output-mode , -o |
choice (default | light | dark | no-color | raw | json ) |
Output decoration mode: default, light, dark, no-color, raw | None |
--interactive-auth , -i |
boolean | Prompt for username and password interactively | False |
--platform , -p |
text | Device type when using IP addresses (e.g., mikrotik_routeros). Note: This specifies the network driver type, not hardware platform. | None |
--port |
integer | SSH port when using IP addresses (default: 22) | None |
--transport , -t |
text | Transport type to use for connections (currently only scrapli is supported). Defaults to configuration or scrapli. | None |
-h , --help |
boolean | Show this message and exit. | False |
nw schema¶
JSON schema management commands
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
-h , --help |
boolean | Show this message and exit. | False |
nw schema info¶
Display JSON schema status.
Shows the status of JSON schema files used for YAML validation in editors like VS Code. These schemas provide auto-completion and error checking for network toolkit configuration files.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--verbose , -v |
boolean | N/A | False |
-h , --help |
boolean | Show this message and exit. | False |
nw schema update¶
Update JSON schemas for YAML editor validation.
Regenerates the JSON schema files used by VS Code and other YAML editors to provide validation and auto-completion for configuration files.
Creates/updates: - schemas/network-config.schema.json (full config) - schemas/device-config.schema.json (device collections) - schemas/groups-config.schema.json (group collections) - .vscode/settings.json (VS Code YAML validation)
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--verbose , -v |
boolean | N/A | False |
-h , --help |
boolean | Show this message and exit. | False |
nw ssh¶
Open tmux with SSH panes for a device or group.
Synchronized typing is ENABLED by default - keystrokes go to all panes. Use --no-sync to disable at startup.
Quick controls: - Ctrl+b, z: Zoom/unzoom focused pane (exits/enters sync mode) - Ctrl+b + Arrow keys: Navigate panes - Click any pane to focus it - Ctrl+b, d: Detach session
When sync is on, all panes show red borders.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--config , -c |
path | Path to config dir or YAML | config |
--auth |
choice (key-first | key | password | interactive ) |
Authentication mode: key-first (default), key, password, interactive | AuthMode.KEY_FIRST |
--user |
text | Override username for SSH | None |
--password |
text | Override password for SSH | None |
--layout |
text | tmux layout to use: tiled, even-horizontal, even-vertical, main-horizontal, main-vertical | tiled |
--session-name |
text | Custom session name | None |
--window-name |
text | Custom window name | None |
--sync / --no-sync |
boolean | Enable synchronized typing (default: on) | True |
--use-sshpass |
boolean | Use sshpass (same as --auth password) | False |
--attach / --no-attach |
boolean | Attach after creating | True |
--verbose , -v |
boolean | Enable debug logging | False |
--platform , -p |
text | Device type when using IP addresses (e.g., mikrotik_routeros). Note: This specifies the network driver type, not hardware platform. | None |
--port |
integer | SSH port when using IP addresses (default: 22) | None |
--transport , -t |
text | Transport type for connections (currently only scrapli is supported). Defaults to configuration or scrapli. | None |
-h , --help |
boolean | Show this message and exit. | False |
nw upload¶
Upload a file to a device or to all devices in a group.
Usage:
Options:
Name | Type | Description | Default |
---|---|---|---|
--remote-name , -r |
text | Remote filename (default: same as local) | None |
--verify / --no-verify |
boolean | Verify upload by checking file exists | True |
--checksum-verify / --no-checksum-verify |
boolean | Verify file integrity using checksums (uses config default if not specified) | False |
--max-concurrent , -j |
integer | Maximum concurrent uploads when target is a group | 5 |
--config , -c |
path | Configuration file path | /home/runner/.config/networka |
--verbose , -v |
boolean | Enable verbose output | False |
-h , --help |
boolean | Show this message and exit. | False |
:::