CLI Tools Reference
Calmo Local Bridge allows you to execute CLI commands on your local machine directly from Calmo conversations. This guide covers the available tools, common use cases, and best practices.Available Tools
When connected via Local Bridge, Calmo has access to these command execution capabilities:Execute Commands
Run any shell command on your local machine
Process Management
Start, monitor, and terminate long-running processes
File Operations
Read and interact with local files and directories
Interactive Input
Send input to running processes
Command Execution
How It Works
- You ask Calmo to run a command (e.g., “check the pods in the staging namespace”)
- Calmo formulates the appropriate command (
kubectl get pods -n staging) - The command appears in your bridge’s Pending Commands
- You approve or deny the command
- Results stream back to Calmo in real-time
Basic Examples
Infrastructure OperationsCommon Use Cases
Kubernetes Troubleshooting
When investigating pod issues, Calmo can help by running diagnostic commands:1
Check Pod Status
CrashLoopBackOff or Error state.2
Describe Problem Pods
3
View Container Logs
4
Apply Fix (if needed)
Development Environment Setup
Infrastructure as Code
Log Analysis
Risk Levels
Commands are classified by risk level to help you make informed approval decisions:Low Risk (Green)
Safe read operations that don’t modify state:| Command Pattern | Description |
|---|---|
kubectl get * | List Kubernetes resources |
kubectl describe * | Describe resource details |
kubectl logs * | View container logs |
git status | Check repository status |
ls, cat, pwd | File system reads |
docker ps | List containers |
Medium Risk (Yellow)
Write operations that modify state but are generally reversible:| Command Pattern | Description |
|---|---|
kubectl delete pod * | Delete pods (will recreate) |
kubectl scale * | Scale deployments |
git commit | Create commits |
npm install | Modify dependencies |
docker stop * | Stop containers |
High Risk (Red)
Operations that can cause significant impact:| Command Pattern | Description |
|---|---|
kubectl delete deployment * | Delete deployments |
kubectl delete pvc * | Delete persistent storage |
terraform destroy | Destroy infrastructure |
rm -rf * | Recursive delete |
kubectl apply * | Apply configuration changes |
Working Directory
Commands execute in the context of your Local Workspaces. If you’ve added/Users/pankaj/local_code/frontend as a workspace, Calmo can:
- Navigate within that directory
- Execute commands relative to that path
- Access files and configuration within the workspace
Long-Running Processes
The bridge supports long-running processes like development servers:- Calmo can start processes that continue running
- Output streams back in real-time
- You can ask Calmo to terminate processes when done
- Process state persists until explicitly stopped
Interactive Commands
For commands requiring input:Environment & Shell
Commands run in your user’s shell environment:- macOS/Linux: Uses your default shell (bash, zsh)
- Windows: Uses cmd.exe or PowerShell
- Environment variables from your shell profile are available
- PATH and other configurations are inherited
Command Output
Command output is:- Streamed in real-time to the Calmo conversation
- Logged in the bridge’s Activity Log
- Stored in command history with execution status
Best Practices
1. Use Specific Commands
Instead of broad operations, use targeted commands:2. Preview Before Applying
For infrastructure changes:3. Scope Operations
Limit scope to reduce risk:4. Use Dry-Run When Available
Troubleshooting
Command Not Found
If commands fail with “command not found”:- Ensure the tool is installed on your local machine
- Check if it’s in your PATH
- Try using the full path to the executable
Permission Denied
If commands fail with permission errors:- Commands run with your user permissions
- Some operations may require sudo (use with caution)
- Check file/directory permissions
Timeout Issues
For commands that take too long:- Some commands have built-in timeouts
- Long-running processes should be started appropriately
- Check network connectivity for remote operations
For assistance with CLI tools, contact our support team at [email protected].