Connpy is a powerful Connection Manager and Network Automation Platform for Linux, Mac, and Docker. It provides a unified interface for SSH, SFTP, Mosh, Telnet, kubectl, Docker pods, and AWS SSM .
The v6 release introduces a comprehensive AI Copilot and AI Playbook Engine , transforming your terminal into an interactive network assistant that understands your device outputs, configures parameters safely, and runs simulations.
1a. Terminal Copilot (Ctrl+Space)
Invoke the context-aware AI Copilot directly inside any active terminal session by pressing Ctrl + Space .
Context Modes : Cycles through LINES (sends raw scroll buffer), SINGLE (captures exactly one command + output block), and RANGE (logical group of recent commands) using Ctrl+Up/Down .
Slash Commands ( / ) : Control the AI persona, safety settings, and mission mode: /mission [objective] : Start an autonomous multi-step investigation mission with human approval. /cancel : Abort active mission. /architect / /engineer : Swaps the agent between high-level strategist and technical executor. /trust / /untrust : Configures auto-run behavior for suggested non-destructive commands. /os [system] : Manually overrides target OS parsing rules (e.g. /os cisco_ios ). /prompt [regex] : Overrides command prompt detection bounds. /clear : Clear context history.
/mission [objective] : Start an autonomous multi-step investigation mission with human approval.
/cancel : Abort active mission.
/architect / /engineer : Swaps the agent between high-level strategist and technical executor.
/trust / /untrust : Configures auto-run behavior for suggested non-destructive commands.
/os [system] : Manually overrides target OS parsing rules (e.g. /os cisco_ios ).
/prompt [regex] : Overrides command prompt detection bounds.
/clear : Clear context history.
1b. AI Chat (conn ai)
Start a standalone persistent session with the AI Copilot. Manage sessions using --list , --resume , --session (to restore a specific history), --delete , or send a quick single-shot question directly from the terminal prompt:
1c. MCP Integration (Client & Server)
Connect to external data sources and tools dynamically, or expose connpy as a native MCP server for external agents (Claude Desktop, Cursor, IDEs):
2-Axis Startup-Frozen Policy Engine & Command Classifier : Separates device execution ( --device-mode readonly|configure|full , --allow-destructive , --max-target-nodes , --allow-folder-targets , --allow-wildcards , --block-jumphosts / --allow-jumphost-targets ) from inventory mutations ( --inventory-mode readonly|approval|readwrite , --allow-inventory-delete , --backup-dir , --backup-keep , --allow-os-retag ), configurable via CLI flags or CONNPY_MCP_* environment variables. Includes an OS-aware deterministic command classifier ( 6wind , cisco , junos , arista , linux ), safe pipe allowlisting, and explain_policy dry-run introspection (legacy --trust / CONNPY_MCP_TRUST is deprecated).
Structured Output Cache, Redaction & Tools : Bounded head+tail inline truncation backed by an ephemeral POSIX-hardened OutputCache ( mcp.output.* config) and automatic secret redaction across responses. Includes search_nodes , validate_playbook , query_output , diff_outputs , clone_node , reload_inventory , and explain_policy .
Kubernetes-Safe Auto-Reload & Audit Logging : Lock-free fingerprinting and Copy-on-Write inventory reload supporting atomic ConfigMap ..data symlink swaps, per-host execution locking, and secret-redacted JSONL audit logging ( --audit-log stderr| ).
Offline Proposal Store & CLI Approval Workflow : In --inventory-mode approval , MCP CRUD calls stage HMAC-SHA256-signed proposals ( --proposal-dir , --proposal-key-file , --proposal-ttl , --max-pending-proposals ) instead of modifying config.yaml . Agents can only inspect proposals ( list_proposals , get_proposal ); operators review and commit them out-of-band with WYSIWYS masked diffs and mandatory backups ( -y / --yes is blocked when CONNPY_MCP_SERVER_ACTIVE=1 ): conn ai --mcp proposals list [ --status pending ] [ --json ] conn ai --mcp proposals show [ --json ] conn ai --mcp proposals approve [ --reason "..." ] [ -y ] [ --json ] conn ai --mcp proposals reject [ --reason "..." ] [ --json ]
1d. Local Interactive Shell (conn shell)
Launch a local interactive shell with AI Copilot support enabled directly on your host machine:
Nested Sessions & Passthrough : Supports running nested conn / connpy connections inside conn shell . Automatically detects foreground conn processes and forwards Ctrl+Space down to the active device connection instead of triggering the local Copilot.
Shell Configuration : Configure default shell command, prompt regex, or OS type via conn config :
2. ⚙️ Automation & Playbooks
2a. Quick Run (conn run)
Run commands in parallel directly on target nodes or folder structures:
2b. YAML Playbook Engine
Execute complex structured automation playbooks defined in YAML configuration files. Supports multi-task execution, variables (using global, per-node, or regex matching definitions), timeouts, and variable parallel execution bounds.
Execute using the playbooks runner:
2c. AI-Assisted Automation
Leverage AI to generate playbook templates ( --generate-ai ), simulate command changes before execution ( --preflight-ai ), or analyze consolidated execution logs post-run ( --analyze ). Use --test "expected text1" "expected text2" to specify assert-style output validations.
To generate an empty template: conn run --generate
2d. Machine-Readable JSON Output & Secret Redaction
Run commands, playbooks, or inventory queries with --json to emit clean structured JSON envelopes to stdout (redirecting console logs to stderr ) with automatic secret redaction enabled by default (opt-out locally via --no-redact ):
3. 📂 Inventory Management
Manage connections using standard commands: add ( conn --add node1 ), edit ( conn --mod node1 ), delete ( conn --del node1 ), show configuration ( conn --show node1 ), or connect ( conn node1 ).
Define credentials and templates globally and reference them inside node fields using the @profile_name placeholder. Manage profiles interactively or via commands:
During the interactive conn --add prompt, you can input @profile_name in the username or password fields to reference it.
3c. Folders, Move, Copy, List
Organize nodes into logical folder hierarchies ( @office , @datacenter@office ). Move items ( conn move [src] [dst] ), copy ( conn copy [src] [dst] ), or list items with custom filters and formatting:
3d. Bulk, Export, Import
Bulk import connections from formatted text files ( conn bulk -f nodes.txt ), or export/import connection folders using YAML configurations ( conn export @folder > backup.yaml / conn import backup.yaml ).
Customize connection settings dynamically using tags. Configure per-node settings like custom OS types ( os ), prompt regex rules ( prompt ), and page length triggers ( screen_length_command ).
3f. Credential Fallback Chain, compose: & Auth Budgets
Configure automatic backup credentials ( fallback ) on nodes or @profile templates so both interactive ( conn ) and unattended ( conn run / MCP) sessions switch seamlessly when primary TACACS+/AAA authentication fails (opt-out via tags.allow_fallback: false ).
Fallback Formats : Accepts @profile , explicit JSON list/dict entries ( [{"user": "backup", "password": "..."}] ), or compose: expressions. Nodes referencing multiple profiles inherit fallback with priority from user / password @profile references.
Password Composition ( compose: ) : Concatenate secrets and literals explicitly using compose:@prof1+@prof2+"suffix" (use @@ to escape leading literal @ ).
Anti-Lockout Guardrails ( conn config ) : Enforce strict attempt bounds via --max-auth-prompts , --max-total-auth-attempts , --max-hop-host-attempts , --max-global-user-attempts , and --disable-fallback-on-insecure-hostkey .
4. 🔌 Protocols & Connection Features
4a. SSH / SFTP / Mosh / Telnet / kubectl / Docker / AWS SSM
Connect to various architectures using native protocols:
SSH / Telnet : Standard CLI protocols.
Mosh : Mobile Shell with roaming and local echo support.
SFTP : Transfer files securely ( conn --sftp node ).
Docker : Connect directly to local container names (host set to container name/ID).
Kubernetes (kubectl) : Connect to pods (namespace customizable via options).
AWS SSM : Connect to EC2 instances using Instance IDs as hosts.
Support for single or chained intermediate gateway nodes (SSH, Mosh, SSM, kubectl, or docker jumphosts) to tunnel traffic safely into target environments.
4c. Debug Mode, Keepalive, Logging
Track connection steps ( conn --debug node ), set idle keepalive intervals ( conn config --keepalive ), or define dynamic output log files using variables like ${unique} , ${host} , ${port} , ${user} , ${protocol} , or ${date 'format'} .
4d. Adaptive Multi-Hop Timeouts
Differentiate --connect-timeout and --auth-timeout stages ( conn run / conn config ), automatically computing topological per-hop latency budgets for chained SSM and Jumphost tunnels with bounded progress extensions on slow handshakes.
5. 🖥️ Remote Capture (conn capture - Core Plugin)
Perform remote packet capture ( tcpdump ) on hosts over secure SSH or Mosh reverse tunnels and stream packets live into your local Wireshark GUI:
Requirements : Local installation of Wireshark or tshark is required for live piping ( -w ).
Advanced flags : Specify network namespaces ( --ns ), custom filters ( -f ), or configure the Wireshark local path ( --set-wireshark-path ).
6. 🛡️ Context Filtering
Prevent accidental command execution in production by setting active regex contexts. This hides non-matching inventory items and restricts execution scope:
Manage Contexts : List defined filters ( conn context --ls ), show context details ( conn context production -s ), or delete contexts ( conn context production -r ).
Extend connpy features and hook into core execution events (pre/post hooks) by writing Python scripts. Add, update, delete, or list plugins locally, or execute them on remote instances:
8. ⚙️ gRPC Client-Server Architecture
8a. Server (start/stop/restart/debug)
Execute tasks on a centralized remote host. Start gRPC server ( conn api -s 50051 ), stop ( conn api -x ), restart ( conn api -r ), or debug in the foreground ( conn api -d ).
Shift the local CLI to communicate with a remote server instance:
8c. User Management & API Tokens
Manage server-side user credentials and Personal Access Tokens (PAT) for automated setups:
Use --path to specify custom configuration folders in server Mode B. Pass API tokens via CONNPY_TOKEN environment variable.
Configure identity providers (e.g. Authelia, Keycloak) for SSO gRPC authentication using the interactive wizard:
Authenticate client sessions ( conn login [username] ), check connection status ( conn login --status ), or close sessions ( conn logout ).
9. ⚡ Installation & Configuration
9b. Shell Completion + FZF
Install autocompletions and fuzzy- wrappers into your shell profile:
9c. conn config options
View configuration details ( conn config ) or customize variables like case sensitivity ( --allow-uppercase ), FZF list picker ( --fzf true ), configurations directory ( --configfolder ), or persistent AI API keys and models ( --engineer-model ).
Customize CLI panel styles and colors by pointing to built-in presets or external YAML styles:
10. 🔒 Privacy, Security & Synchronization (conn sync)
Encrypts inventory and profiles locally via RSA/OAEP. Backup and sync configurations to Google Drive manually ( conn sync --once , --list , --restore ) or schedule auto-sync. Segregate restores ( --nodes / --config ) or sync remote nodes with --sync-remote .
Embed connection and automation routines programmatically in Python:
Supports additional programmatic features like node.test() , node.interact() , configfile.encrypt() , connapp embeds, and ClassHook / MethodHook plugin hooks.
12. 🐳 Docker Deployment
Run connpy containerized and silent:
Add alias conn='docker compose run --rm connpy-app' to your shell for a transparent container experience.
PolyForm Noncommercial 1.0.0
Release files for connpy 6.5.0b3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation .
Source distribution (sdist)
Built distribution (wheel)
Total release size: 1.0 MB
Release files / connpy-6.5.0b3.tar.gz
Release files / connpy-6.5.0b3-py3-none-any.whl
Security for connpy 6.5.0b3
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.
None of the files in this release were uploaded with provenance metadata.
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.
Release history Release notifications | RSS feed
Nov 26, 2026 2 release files No provenance
Nov 26, 2026 2 release files No provenance
Nov 17, 2026 2 release files No provenance
Nov 9, 2026 2 release files No provenance
Nov 9, 2026 2 release files No provenance
Oct 28, 2026 2 release files No provenance
Oct 22, 2026 2 release files No provenance
Aug 17, 2026 2 release files No provenance
Aug 13, 2026 2 release files No provenance
Aug 13, 2026 2 release files No provenance
Aug 12, 2026 2 release files No provenance
Jul 27, 2026 2 release files No provenance
Jul 7, 2026 2 release files No provenance
Jun 4, 2026 2 release files No provenance
Jun 3, 2026 2 release files No provenance
Jun 1, 2026 2 release files No provenance
May 29, 2026 2 release files No provenance
May 28, 2026 2 release files No provenance
May 27, 2026 2 release files No provenance
May 18, 2026 2 release files No provenance
May 18, 2026 2 release files No provenance
May 18, 2026 2 release files No provenance
May 13, 2026 2 release files No provenance
May 5, 2026 2 release files No provenance
May 2, 2026 2 release files No provenance
May 1, 2026 2 release files No provenance
Apr 30, 2026 2 release files No provenance
Apr 30, 2026 2 release files No provenance
Apr 27, 2026 2 release files No provenance
Apr 24, 2026 2 release files No provenance
Apr 20, 2026 2 release files No provenance
Apr 18, 2026 2 release files No provenance
Apr 18, 2026 2 release files No provenance
Apr 17, 2026 2 release files No provenance
Apr 17, 2026 2 release files No provenance
Apr 6, 2026 2 release files No provenance
Apr 4, 2026 2 release files No provenance
Apr 4, 2026 2 release files No provenance
Apr 3, 2026 2 release files No provenance
Apr 3, 2026 2 release files No provenance
Aug 13, 2025 2 release files No provenance
Aug 4, 2025 2 release files No provenance
Jul 12, 2025 2 release files No provenance
May 9, 2025 2 release files No provenance
Jan 30, 2025 2 release files No provenance
Jul 21, 2024 2 release files No provenance
Jul 15, 2024 2 release files No provenance
Jul 5, 2024 2 release files No provenance
Jul 2, 2024 2 release files No provenance
Jun 17, 2024 2 release files No provenance
Jun 10, 2024 2 release files No provenance
May 24, 2024 2 release files No provenance
May 24, 2024 2 release files No provenance
May 3, 2024 2 release files No provenance
Apr 22, 2024 2 release files No provenance
Apr 17, 2024 2 release files No provenance
Apr 17, 2024 2 release files No provenance
Apr 17, 2024 2 release files No provenance
Dec 21, 2023 2 release files No provenance
Dec 19, 2023 2 release files No provenance
Dec 15, 2023 2 release files No provenance
Dec 14, 2023 2 release files No provenance
Dec 14, 2023 2 release files No provenance
Dec 6, 2023 2 release files No provenance
Dec 6, 2023 2 release files No provenance
Dec 4, 2023 2 release files No provenance
Dec 1, 2023 2 release files No provenance
Dec 1, 2023 2 release files No provenance
Dec 1, 2023 2 release files No provenance
Nov 3, 2023 2 release files No provenance
Nov 3, 2023 2 release files No provenance
Oct 27, 2023 2 release files No provenance
Oct 26, 2023 2 release files No provenance
Oct 5, 2023 2 release files No provenance
Sep 21, 2023 2 release files No provenance
Sep 13, 2023 2 release files No provenance
Sep 13, 2023 2 release files No provenance
Sep 12, 2023 2 release files No provenance
Jul 31, 2023 2 release files No provenance
Jul 11, 2023 2 release files No provenance
May 24, 2023 2 release files No provenance
May 23, 2023 2 release files No provenance
May 22, 2023 2 release files No provenance
May 18, 2023 2 release files No provenance
May 12, 2023 2 release files No provenance
May 12, 2023 2 release files No provenance
May 10, 2023 2 release files No provenance
May 5, 2023 2 release files No provenance
May 5, 2023 2 release files No provenance
Apr 18, 2023 2 release files No provenance
Apr 16, 2023 2 release files No provenance
Apr 14, 2023 2 release files No provenance
Apr 14, 2023 2 release files No provenance
Apr 14, 2023 2 release files No provenance
Apr 14, 2023 2 release files No provenance
Apr 14, 2023 2 release files No provenance
Apr 14, 2023 2 release files No provenance
Mar 21, 2023 2 release files No provenance
Jan 5, 2023 2 release files No provenance
Aug 18, 2022 2 release files No provenance
Jul 8, 2022 2 release files No provenance
Jun 10, 2022 2 release files No provenance
May 25, 2022 2 release files No provenance
May 19, 2022 2 release files No provenance
May 19, 2022 2 release files No provenance
May 11, 2022 2 release files No provenance
Apr 19, 2022 2 release files No provenance
Apr 6, 2022 2 release files No provenance
Apr 5, 2022 3 release files No provenance
Apr 5, 2022 2 release files No provenance
Apr 4, 2022 2 release files No provenance
Apr 4, 2022 2 release files No provenance
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
