Skip to content

feat: add devbox code command for IDE Remote SSH#2

Merged
ethannortharc merged 1 commit intomainfrom
feat/devbox-code
Mar 10, 2026
Merged

feat: add devbox code command for IDE Remote SSH#2
ethannortharc merged 1 commit intomainfrom
feat/devbox-code

Conversation

@ethannortharc
Copy link
Copy Markdown
Owner

Summary

  • Adds devbox code command to open VS Code, Cursor, Windsurf (or any Remote SSH editor) directly into a sandbox VM
  • Automatically configures ~/.ssh/config with managed markers for clean updates
  • Supports both Lima (macOS) and Incus (Linux) runtimes

Usage

devbox code              # VS Code into current sandbox
devbox code myapp        # Named sandbox
devbox code --editor cursor   # Use Cursor
devbox code --path /workspace/src  # Open specific path

How it works

  • Lima: Extracts SSH config via limactl show-ssh --format config, writes to ~/.ssh/config
  • Incus: Gets VM IP from incus list --format json, generates SSH config entry
  • Both launch editor with --remote=ssh-remote+devbox-<name>/workspace

Test plan

  • devbox code opens VS Code into a running Lima sandbox (macOS)
  • devbox code --editor cursor works with Cursor
  • devbox code myapp resolves named sandbox correctly
  • SSH config is written with # devbox-start:/end: markers
  • Running devbox code twice updates (not duplicates) the SSH config block
  • Error message shown when sandbox not found or editor not installed

🤖 Generated with Claude Code

…te SSH

Supports VS Code, Cursor, Windsurf, and any editor with Remote SSH support.
Configures ~/.ssh/config automatically for both Lima (macOS) and Incus (Linux).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ethannortharc ethannortharc merged commit 667f9a2 into main Mar 10, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant