Repository navigation
Conversation
- Add --open cursor|code|none flag to control IDE opening (default: cursor) - Add --yes flag for non-interactive mode (reuse running containers) - Add inject_tailscale_key() that generates ephemeral auth keys via Tailscale OAuth API when TS_CLIENT_ID/TS_CLIENT_SECRET are set locally, then injects TAILSCALE_AUTHKEY into remote docker-compose.local.yaml - Key injection is opt-in: silent no-op when OAuth creds are absent - Add BATS tests for new flags and tailscale key injection Refs: #230
…output - Add --open ssh: waits for container to appear on tailnet (polls up to 60s), then prints connection commands for ssh, Cursor, and VS Code - Extract read_workspace_folder() helper from open_editor() - Add wait_for_tailscale() that discovers the container via local tailscale status --json, matching devcontainer.json name field - Refactor main() to use case/esac for cleaner mode dispatch - Add BATS tests for --open ssh and new function definitions Refs: #231
4 of 5 tasks
Default --open mode is now 'auto' instead of hardcoding 'cursor'. Detection chain: TERM_PROGRAM env var → CLI availability → ssh fallback. Terminal apps (WezTerm, iTerm, tmux) resolve directly to ssh mode. Refs: #231 Co-Authored-By: Claude Opus 4.6 <[email protected]>
The PR title check was false-positiving on legitimate references to .cursor/, .claude/ directories and CLAUDE.md. Add allow_patterns to agent-blocklist.toml that strip path-like occurrences before matching. Co-Authored-By: Claude Opus 4.6 <[email protected]> Refs: #231
## Summary
Adds `--open ssh` mode to `devc-remote.sh` that decouples the script
from any specific IDE. After compose up, it polls the local tailnet for
the container, then prints connection commands for any client.
## What changed
- **`--open ssh`**: waits up to 60s for the container to appear on the
tailnet, then outputs:
```
Connect via:
ssh root@fd5-devc-sdsc
ssh [email protected]
Cursr: cursr --remote ssh-remote+root@fd5-devc-sdsc /workspace/fd5
VS Code: code --remote ssh-remote+root@fd5-devc-sdsc /workspace/fd5
```
- **`read_workspace_folder()`**: extracted from `open_editor()`, reused
by both devcontainer-protocol and SSH modes
- **`wait_for_tailscale()`**: polls `tailscale status --json` locally,
matches container by `devcontainer.json` name field
- **`main()` refactored**: clean `case/esac` dispatch for
cursr/code/ssh/none
## `--open` modes summary
| Mode | Behavior |
|------|----------|
| `cursr` (default) | Open Cursr via devcontainer protocol URI |
| `code` | Open VS Code via devcontainer protocol URI |
| `ssh` | Wait for Tailscale, print connection commands |
| `none` | Infra only, no IDE |
## Test plan
- [x] BATS: `--open ssh` skips editor detection
- [x] BATS: `--open invalid` rejects with updated error message
- [x] BATS: `wait_for_tailscale` and `read_workspace_folder` defined
- [x] All 37 tests pass
- [ ] Manual: test with real Tailscale container on remote host
## Part of
Epic: #232
Closes: #231
Stacked on: #233 (Tailscale key injection)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--open <ide>|noneflag to decouple IDE from infra (--open nonefor headless/scripted use)--yesflag for non-interactive modeinject_tailscale_key()— generates ephemeral Tailscale auth keys via OAuth API and injects into remotedocker-compose.local.yamlTS_CLIENT_ID/TS_CLIENT_SECRETare absentHow it works
Test plan
--open noneskips editor detection--open codefails when code not in PATH--open invalidrejected--yesacceptedinject_tailscale_keyskips when OAuth creds unsetPart of
Epic: #232
Closes: #230
Depends on: #208 (Tailscale SSH in workspace template)
References
docs/designs/tailscale-ssh.md(added in PR feat: add opt-in Tailscale SSH support to devcontainer (#208) #211)