LLM-powered network automation CLI with a Textual TUI
Project description
NetMind
LLM-powered network automation agent -- connect to Cisco IOS routers, talk to an AI that configures them for you.
NetMind uses Claude as the orchestration brain. You describe what you want ("Configure OSPF area 0 between these three routers"), and it discovers the topology, generates the right commands, asks for your approval, applies them, and verifies everything works.
Quick Start
# Clone and enter the project
cd netmind
# Create a virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Set your API key
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY
# Run
python main.py
What It Does
- You add routers via the Device Manager (Ctrl+D) -- IP, username, password.
- You ask NetMind to configure something: "Set up OSPF area 0 on all routers."
- Claude discovers the current state by running show commands over SSH.
- Claude generates the exact IOS config commands needed.
- You review and approve in the approval screen.
- Claude applies the config, then verifies the result (neighbors up, routes learned).
- If something breaks, there's a checkpoint to roll back.
TUI Controls
| Key | Action |
|---|---|
| Ctrl+D | Open Device Manager |
| Ctrl+R | Toggle Read-Only / Interactive |
| Ctrl+L | Clear Chat |
| Ctrl+C | Quit |
| Escape | Back (from sub-screens) |
Architecture
User (TUI)
|
v
ClaudeAgent <----> Claude API (tool calling)
|
v
ToolRegistry ---> DeviceManager ---> DeviceConnection (Netmiko/SSH)
| |
v v
SafetyGuard Cisco IOS Router
ApprovalManager
CheckpointManager
Key principles:
- Claude is the brain -- it decides what commands to run and in what order
- Every config change requires user approval (ApprovalScreen)
- Checkpoints are created before changes for rollback
- Read-only mode is on by default
Project Structure
netmind/
├── main.py # Entry point
├── netmind/
│ ├── ui/ # Textual TUI
│ │ ├── app.py # Main app class
│ │ ├── screens/ # Main, DeviceManager, Approval screens
│ │ └── widgets/ # ChatPanel, DeviceList, StatusBar
│ ├── core/ # Device connectivity & safety
│ │ ├── device_connection.py # Netmiko SSH wrapper
│ │ ├── device_manager.py # Multi-device management
│ │ └── safety.py # Approval flow, checkpoints, guard rails
│ ├── agent/ # Claude integration
│ │ ├── claude_agent.py # Main agent loop
│ │ ├── tool_registry.py # Tool definitions
│ │ ├── conversation.py # Message history management
│ │ ├── system_prompt.py # Claude's persona and rules
│ │ └── tools/ # Tool handler implementations
│ ├── protocols/ # Protocol-specific helpers
│ │ └── ospf.py # OSPF verification
│ ├── models/ # Pydantic data models
│ └── utils/ # Config, logging, parsers
└── tests/
Safety Model
NetMind starts in read-only mode. Claude can run any show command but cannot make changes.
When you switch to interactive mode (Ctrl+R):
- Config commands still require explicit approval
- A config checkpoint is taken before every change
- Dangerous commands (reload, erase, no ip address) are blocked or flagged
- Rollback is available if something goes wrong
Testing
# Run all tests
python -m pytest tests/ -v
# Run parser tests only
python -m pytest tests/test_parsers.py -v
Requirements
- Python 3.10+
- Access to Cisco IOS devices (GNS3, EVE-NG, or real hardware)
- Anthropic API key (Claude Sonnet 4.5)
Current Protocol Support
- OSPF (MVP) -- full configure + verify + troubleshoot
- BGP, EIGRP, VLANs -- planned
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sunset_cli-0.1.1.tar.gz.
File metadata
- Download URL: sunset_cli-0.1.1.tar.gz
- Upload date:
- Size: 118.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d392b1735fddecc845af23c492f63ecd064cf404451bba2a0f322b5e3f952031
|
|
| MD5 |
5e107ffa6eae02126adb4b13b065120f
|
|
| BLAKE2b-256 |
e706aa7a279a0f57e98719822db8453790e0aae5cb6516f37ffefebe9f8ae881
|
Provenance
The following attestation bundles were made for sunset_cli-0.1.1.tar.gz:
Publisher:
publish.yml on adam-shlomo/netmind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sunset_cli-0.1.1.tar.gz -
Subject digest:
d392b1735fddecc845af23c492f63ecd064cf404451bba2a0f322b5e3f952031 - Sigstore transparency entry: 973191696
- Sigstore integration time:
-
Permalink:
adam-shlomo/netmind@0b3aa6aae8a6ce68ac33c565531483d971c1f310 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/adam-shlomo
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0b3aa6aae8a6ce68ac33c565531483d971c1f310 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sunset_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: sunset_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 126.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f9f42b682bdeb79e4999f6f5b9f4d61eb0047675a416e65daf7656d38c3361b
|
|
| MD5 |
e49710690132b82dc1d05d3feebbca93
|
|
| BLAKE2b-256 |
0b3e8fb53c2cfdbd59746b8a284c13ef5af6af057def86f94cdec3117dda41f7
|
Provenance
The following attestation bundles were made for sunset_cli-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on adam-shlomo/netmind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sunset_cli-0.1.1-py3-none-any.whl -
Subject digest:
3f9f42b682bdeb79e4999f6f5b9f4d61eb0047675a416e65daf7656d38c3361b - Sigstore transparency entry: 973191698
- Sigstore integration time:
-
Permalink:
adam-shlomo/netmind@0b3aa6aae8a6ce68ac33c565531483d971c1f310 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/adam-shlomo
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0b3aa6aae8a6ce68ac33c565531483d971c1f310 -
Trigger Event:
push
-
Statement type: