API Reference: CLI Commands
This page details the commands available through the interactive CLI (node scripts/interactive.cjs
).
(Note: This is based on inferred functionality from READMEs and code snippets. Actual commands and parameters might vary slightly. Refer to the CLI source code in /packages/cli/src
for definitive details.)
Main Menu Structure
The CLI presents a menu-driven interface. Key top-level options typically include:
👤 Agent Management
🐝 Swarm Management
💼 Wallet Management
🔗 Cross-Chain Operations
📊 Market Data
⚙️ System Configuration
Agent Management Commands
Accessed via 👤 Agent Management
menu:
Create Agent: Prompts for agent name, type, and JSON configuration.
Backend Call:
agents.create_agent
List Agents: Displays a list of existing agents.
Backend Call:
agents.list_agents
View Agent Status: Shows details and status for a specific agent ID.
Backend Call:
agents.get_agent
(or similar)
Start Agent: Starts a specific agent ID.
Backend Call:
agents.start_agent
Stop Agent: Stops a specific agent ID.
Backend Call:
agents.stop_agent
Delete Agent: Deletes a specific agent ID.
Backend Call:
agents.delete_agent
Swarm Management Commands
Accessed via 🐝 Swarm Management
menu:
Create Swarm: Prompts for swarm name, algorithm, and JSON configuration.
Backend Call:
swarms.create_swarm
List Swarms: Displays a list of existing swarms.
Backend Call:
swarms.list_swarms
View Swarm Status: Shows details and status for a specific swarm ID.
Backend Call:
swarms.get_swarm
(or similar)
Start Swarm: Starts a specific swarm ID.
Backend Call:
swarms.start_swarm
Stop Swarm: Stops a specific swarm ID.
Backend Call:
swarms.stop_swarm
Delete Swarm: Deletes a specific swarm ID.
Backend Call:
swarms.delete_swarm
Add Agent to Swarm: Associates an agent ID with a swarm ID.
Backend Call:
swarms.add_agent
(or similar)
Remove Agent from Swarm: Disassociates an agent ID from a swarm ID.
Backend Call:
swarms.remove_agent
(or similar)
Wallet Management Commands
Accessed via 💼 Wallet Management
menu:
Connect Wallet: Prompts to select wallet type and guides through connection (usually via browser extension).
Disconnect Wallet: Disconnects the currently connected wallet.
View Wallet Balance: Shows the balance of the connected wallet.
Send Transaction: Prompts for recipient, amount, token, and chain, then initiates the transaction (requires confirmation in wallet).
Cross-Chain Operations Commands
Accessed via 🔗 Cross-Chain Operations
menu:
Initiate Cross-Chain Transfer: Guides through selecting source/target chains, token, amount, and recipient address.
Backend Call: Varies depending on the selected bridge (e.g.,
bridges.relay.transfer
,bridges.wormhole.transfer
).
Check Transfer Status: Prompts for a transaction ID to check the status of an ongoing cross-chain transfer.
Backend Call: Varies (e.g.,
bridges.relay.getStatus
,bridges.wormhole.getStatus
).
Market Data Commands
Accessed via 📊 Market Data
menu:
View Price Data: Prompts for a token pair to view current market price (likely fetched via backend integration like Chainlink).
Backend Call:
marketdata.get_price
(or similar).
System Configuration Commands
Accessed via ⚙️ System Configuration
menu:
View System Status: Shows the connection status to the backend and potentially other system health indicators.
Backend Call:
system.get_status
.
View System Metrics: Displays performance metrics from the backend.
Backend Call:
system.get_metrics
.