devsh - Cloud VMs for Development
Note:
devshcan be installed via npm for production use, or built from local source (packages/devsh) when developing or testing the CLI itself.
| Install | Purpose | Command |
|---|---|---|
| npm | Production CLI | npm install -g devsh |
| source | Development build | make install-devsh-dev |
Pre-flight Check
Before using devsh commands, verify installation:
which devsh || ~/.local/bin/devsh --version
# If not found, build and install from source:
make install-devsh-dev
Quick Start
devsh auth login # Authenticate (opens browser)
devsh start ./my-project # Create VM, sync directory
devsh start -p pve-lxc . # Create VM with PVE LXC provider
devsh code <id> # Open VS Code in browser
devsh ssh <id> # SSH into VM
devsh exec <id> "npm run dev" # Run commands
devsh pause <id> # Pause VM
devsh resume <id> # Resume VM
devsh delete <id> # Delete VM
devsh ls # List all VMs
Provider Selection
# Explicit provider
devsh start -p morph . # Use Morph
devsh start -p pve-lxc . # Use PVE LXC (self-hosted)
# Auto-detect from environment
export PVE_API_URL=https://pve.example.com
export PVE_API_TOKEN=root@pam!token=secret
devsh start . # Auto-selects pve-lxc when PVE env vars are set
Commands
Authentication
devsh auth login- Login via browserdevsh auth logout- Clear credentialsdevsh auth status- Show authentication statusdevsh auth whoami- Show current userdevsh login- Shorthand forauth logindevsh logout- Shorthand forauth logoutdevsh whoami- Shorthand forauth whoami
VM Lifecycle
devsh start [path]- Create VM, optionally sync directorydevsh start -p <provider>- Specify provider (morph,pve-lxc)devsh pause <id>- Pause VMdevsh resume <id>- Resume VMdevsh delete <id>- Delete VMdevsh ls- List VMsdevsh status <id>- Show VM status and URLs
Access VM
devsh code <id>- Open VS Code in browserdevsh vnc <id>- Open VNC desktopdevsh ssh <id>- SSH into VM
Work with VM
devsh exec <id> "<cmd>"- Run commanddevsh sync <id> <path>- Sync files to VMdevsh sync <id> <path> --pull- Pull files from VM
Task Management
Tasks are the same as in the web app dashboard. CLI and web sync through Convex.
devsh task list- List active tasksdevsh task list --archived- List archived tasksdevsh task create --repo owner/repo --agent claude-code "prompt"- Create taskdevsh task create --cloud-workspace ...- Create as cloud workspace (appears in Workspaces section)devsh task show <task-id>- Get task details and runsdevsh task stop <task-id>- Stop/archive taskdevsh task memory <task-run-id>- View agent memory for a task run
Notes:
devsh task createuses a positional prompt argument.--promptis not a valid flag.- For automation, prefer
--jsonand poll withdevsh task show <task-id>ordevsh task listafter creation.
Task Workflow: Branches and Pull Requests
Important: Each task run automatically creates a new branch. Changes are NOT made to your existing branch.
Branch Behavior
- Each task creates a new branch:
{prefix}{task-slug}-{random-id} - The branch prefix defaults to
dev/and is user-configurable in web UI Settings > Git - Example:
devsh task create "Fix login bug"creates branchdev/fix-login-bug-x8k3a - Changes are committed and pushed to this new branch automatically
Auto-PR (Disabled by Default)
When all agents complete, the system:
- Crown evaluation: Compares agent outputs and selects the best diff (winner)
- Push: Pushes the winning branch to the remote repository
- PR creation: Only if "Auto-PR" is enabled in Settings > General
To enable Auto-PR:
- Open web UI (cmux.app or your deployment)
- Go to Settings > General
- Enable "Auto-create pull request with the best diff"
To manually create a PR after task completion:
# View the task to find the winning branch
devsh task show <task-id>
# Create PR manually with gh CLI
gh pr create --head dev/your-branch-name --title "Your PR title"
Single-Agent vs Multi-Agent Tasks
- Single agent: Auto-crowned immediately when completed
- Multi-agent (Crown): Evaluates all diffs, crowns the best solution, then pushes
Agent Memory
View agent memory snapshots synced from sandboxes when agents complete.
devsh task memory <task-id> # View memory (uses latest run)
devsh task memory <task-run-id> # View specific run's memory
devsh task memory <task-id> -t knowledge # Filter by type
devsh task memory <task-id> -t daily # Daily logs only
devsh task memory <task-id> --json # JSON output
Accepts either task ID (p17...) or task run ID (ns7...).
Memory types: knowledge, daily, tasks, mailbox
Team Management
devsh team list- List your teamsdevsh team switch <team-slug>- Switch to a different team
Agent Management
devsh agent list- List available coding agents
GitHub Projects (v2)
Import markdown plans into GitHub Projects as draft issues. Note: Only organization projects work - user-owned projects don't work with GitHub Apps.
devsh project import <file> --project-id <id> --installation-id <id>- Import plan as draft issuesdevsh project import <file> --project-id <id> --dry-run- Preview without importing
# Get project ID
gh project list --owner <org> --format json | jq '.projects[].id'
# Import plan (H2 sections become draft issues)
devsh project import ./plan.md --project-id PVT_xxx --installation-id 12345
Browser Automation
devsh computer snapshot <id>- Get accessibility treedevsh computer open <id> <url>- Navigate browserdevsh computer click <id> @e1- Click elementdevsh computer screenshot <id>- Take screenshot
Building from Source
# From repo root
make install-devsh-dev
# Or manually
cd packages/devsh
make build-dev
cp bin/devsh ~/.local/bin/
Environment Variables
| Variable | Description |
|---|---|
PVE_API_URL | Proxmox VE API URL |
PVE_API_TOKEN | Proxmox VE API token |
PVE_PUBLIC_DOMAIN | Public domain for Cloudflare Tunnel (optional) |
PVE_NODE | Proxmox node name (optional, auto-detected) |
PVE_VERIFY_TLS | Set to 1 to verify PVE TLS certs (optional) |
MORPH_API_KEY | Morph Cloud API key |
DEVSH_DEV=1 | Use development backend defaults |
Create Symlinks for Other Agents
mkdir -p .claude/skills
ln -s ../../.agents/skills/devsh .claude/skills/devsh