CLI Reference
Relevant source files
The following files were used as context for generating this wiki page:
The WIREDUP project provides a robust Command Line Interface (CLI) and a specialized Rust-based Terminal (NexTerm) to manage the AI Auto-Wiring system. The Python CLI serves as the primary administrative tool for system initialization, configuration management, and service orchestration, while the Rust Terminal provides an interactive environment for real-time AI command processing and terminal UI (TUI) interaction.
The system is designed with a hybrid architecture where the Rust terminal bridges to the Python auto-wiring engine to provide intelligent command suggestions and status monitoring.
Sources: src/cli.py, rust-terminal/src/main.rs:1-20, README.md:25-35
Python CLI (ai-wire)
The Python CLI is built using the click library and acts as the entry point for configuring the backend auto-wiring services. It is registered via setup.py as the console script ai-wire.
Sources: src/cli.py:16-25, setup.py:31-35
Core Commands
| Command | Description | Key Options/Arguments |
|---|---|---|
init | Initializes the system, creating configuration directories and templates. | --env, --config-dir |
start | Loads configurations and starts the auto-wire engine and registries. | --env |
status | Displays the operational status of the auto-wire engine and registered dependencies. | N/A |
config | Retrieves a specific configuration value by key. | key, --default |
list-components | Lists all registered components, their scopes, and dependencies. | --category |
create-agent | Initializes a new AI agent with provided JSON configuration. | name, --config |
ssh-exec | Executes commands on remote hosts via the SSH Manager. | --host, --username, command |
Sources: src/cli.py:28-210
Initialization Flow
When init is called, the system creates a structured environment including a config/ directory, default JSON configurations, and a .env.example template.
Sources: src/cli.py:28-75
Rust Terminal (NexTerm)
NexTerm is a high-performance terminal written in Rust that integrates directly with the Python auto-wiring core. It supports modern TUI features such as tabs, split panes, and AI-driven command routing.
Sources: rust-terminal/README.md:1-20, rust-terminal/src/main.rs:10-25
Interactive Keybindings
The Rust terminal uses specific key combinations to interact with the auto-wiring backend and manage the UI.
| Keybinding | Action | UI Component |
|---|---|---|
Ctrl+A | Show Auto-wire status | Auto-wire Panel |
Ctrl+S | Show Auto-wire services | Auto-wire Panel |
Ctrl+Space | AI Suggestions | Input Field |
Ctrl+T / Ctrl+W | New Tab / Close Tab | Tab Bar |
Ctrl+F | Open Fuzzy Finder | Modal |
Enter | Execute command | Terminal Output |
Sources: rust-terminal/src/ui/tui.rs:60-75, rust-terminal/src/main.rs:115-160
Terminal Integration Architecture
NexTerm communicates with the Python backend to resolve dependencies and process commands through AI agents.
System Monitoring and Status
The CLI and Terminal both provide visibility into the "Auto-Wire Engine." Status checks monitor:
- Registered Dependencies: Total count of services managed by the engine.
- Initialization Status: Whether a component is fully initialized (✅) or pending (⏳).
- Scope: The lifecycle of the component (e.g., SINGLETON).
Sources: src/cli.py:108-132, rust-terminal/src/ui/tui.rs:160-185
Component Registry Visualization
The list-components command allows developers to inspect the dependency graph managed by the system.
Sources: src/cli.py:148-175
Summary
The WIREDUP CLI system provides a dual-interface approach to AI infrastructure management. The ai-wire Python CLI handles the lifecycle and configuration of the auto-wiring engine, while the nexterm Rust terminal provides an optimized, interactive environment for utilizing those services. Together, they allow for seamless orchestration of AI agents, SSH connections, and MCP protocols directly from the command line.