feat!: rename to InDevContainer (idc) and add idc copilot#10
Merged
Conversation
…nd VS Code CLI bridge
The project has outgrown the 'dcode' name. It now builds containers,
shells in, and (next commit) execs the GitHub Copilot CLI inside them.
Rebrand to InDevContainer with the binary 'idc'.
Mechanics in this commit:
- git mv src/dcode -> src/indevcontainer (history preserved)
- pyproject.toml: name -> indevcontainer; [project.scripts] entry
becomes 'idc = indevcontainer.cli:main'; project URLs point at
rosstaco/InDevContainer; hatch version-file path follows the move
- release-please-config.json: package-name -> indevcontainer
- .gitignore: version-file path follows the move
- All Python imports rewritten from 'dcode.X' to 'indevcontainer.X'
- All user-facing 'dcode:' stderr prefixes rewritten to 'idc:'
- All in-message command refs rewritten ('dcode <path>' -> 'idc code
<path>', 'dcode shell' -> 'idc shell', etc.)
- update.py: 'uv tool upgrade dcode' -> 'uv tool upgrade
indevcontainer'; regex _DCODE_LINE -> _IDC_LINE matching
'^indevcontainer\s+v'; install URL updated
- version_check.py: GitHub API URLs updated; User-Agent header
becomes 'idc-doctor'
- doctor.py: doctor section label, install-method text, and all
user-facing messages updated to the new branding
- Tests: all 'from dcode.X' and 'patch("dcode.X.Y", ...)' references
rewritten; test fixtures for 'uv tool list' output updated
BREAKING CHANGE: The 'dcode' tool is no longer published. Users
must uninstall the old package and install the new one:
uv tool uninstall dcode
uv tool install git+https://github.com/rosstaco/InDevContainer
The Python package import path also changes from 'dcode' to
'indevcontainer'. No 'dcode' shim is shipped.
Release-As: 1.0.0
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the legacy "dcode <path>" form (where the path was a top-level positional) with a clean subcommand layout. This kills the _looks_like_subcommand workaround that was needed to disambiguate "dcode ./somepath" from subcommand names. New CLI surface: idc # prints help, exits 0 idc code [-i] <path> # was: dcode <path> idc shell <path> [--shell EXE] [-i] idc copilot [<path>] [args...] # NEW idc doctor [<path>] idc update [--check] The -i/--insiders flag moves from the top-level parser onto the subcommands that actually consume it (code, shell). idc copilot details: - Shares container resolution with `idc shell` via a new `prepare_container_exec()` helper in shell.py (returns a `ContainerExec` dataclass with container_id, exec_user, workdir, ssh_sock, workspace_folder, devcontainer_cfg, main_repo, rel_path). - Probes `command -v copilot` in the container before exec'ing so a missing copilot binary fails fast with a clear install hint (e.g. `npm install -g @github/copilot`) instead of an opaque 127. - Bypasses argparse so flags forward transparently: `idc copilot --yolo --resume` → `copilot --yolo --resume` (no `--` separator needed). The first non-flag arg (if any) is the project path. A literal `--` is still honored as an explicit separator for the rare case where the first forwarded token would otherwise be parsed as a path. Renamed `run_dcode` → `run_code` in core.py for consistency with the new subcommand name; `run_shell` is unchanged. Tests: - tests/test_cli.py rewritten end-to-end for the new subcommand structure (TestNoSubcommand, TestCodeDispatch, TestShellDispatch, TestCopilotDispatch, TestUpdateDispatch, TestDoctorDispatch, TestSplitCopilotArgs). - New tests/test_copilot.py covers _copilot_installed probe + the run_copilot happy path, missing-copilot error, extra-args forwarding, and exec-failure paths. BREAKING CHANGE: `dcode .` no longer works; users must run `idc code .`. `dcode shell`, `dcode doctor`, and `dcode update` become `idc shell`, `idc doctor`, and `idc update`. The bare `dcode` (no args) used to open the current directory in VS Code; bare `idc` now prints help. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
README: - New title and tagline reflecting the broader scope (code, shell, copilot in one CLI). - "Renamed from `dcode`" callout near the top with the `uv tool uninstall dcode` migration step. - Install command points at the new repo URL. - All command examples updated to the new `idc <subcommand>` form. - New section for `idc copilot` with the transparent-forwarding syntax (`idc copilot --yolo --resume` works directly). - Quick-start shows the most common new flows. - Worktree, WSL, and auto-build sections updated for the new binary/branding. .github/copilot-instructions.md: - New heading and architecture section describing the subcommand layout, the shared `prepare_container_exec()` helper, and the bypass-argparse behavior of `idc copilot`. - Notes the binary/package split: `idc` (binary) vs `indevcontainer` (Python package / pyproject name). - `idc:` stderr-prefix convention documented. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
The project has outgrown the
dcodename. It now builds containers, shells in, and (new!) execs the GitHub Copilot CLI inside them. This PR rebrands the project to InDevContainer, renames the CLI binary toidc, restructures the CLI as proper subcommands, and addsidc copilot.The
Release-As: 1.0.0trailer on commit 1 tells release-please to cut v1.0.0 for this rebrand rather than its default 0.6.0 bump (sincebump-minor-pre-major: true).What changes
New CLI surface
dcode <path>idc code <path>dcode shell <path>idc shell <path>dcode doctoridc doctordcode updateidc updateidc copilot [<path>] [args...]— newdcode(bare)idcprints help (was: opened cwd in VS Code)_looks_like_subcommandworkaround is gone.-i/--insidersmoved from the top-level parser onto the subcommands that actually use it (code,shell).idc copilotaccepts flags transparently —idc copilot --yolo --resumeJust Works (no--separator required). The first non-flag arg becomes the project path; everything else forwards verbatim. A literal--is still honored as an explicit escape hatch.Package / distribution
src/dcode/→src/indevcontainer/(git rename, history preserved at 76–100% similarity per file).pyproject.toml:name = "indevcontainer";[project.scripts]entry becomesidc = "indevcontainer.cli:main"; URLs point atrosstaco/InDevContainer.release-please-config.json:package-name = "indevcontainer".dcode:→idc:everywhere.update.py: nowuv tool upgrade indevcontainer; install URL & uv-tool-list regex updated.version_check.py: GitHub API URLs updated;User-Agent→idc-doctor.idc copilotimplementationidc shellvia a newprepare_container_exec()helper inshell.pyreturning aContainerExecdataclass (container_id,exec_user,workdir,ssh_sock,workspace_folder,devcontainer_cfg,main_repo,rel_path).command -v copilotinside the container before exec'ing, so a missing copilot binary fails fast with a clear install hint (e.g.npm install -g @github/copilot) instead of an opaque127._split_copilot_args()cleanly separates path from forwarded args.Docs
README.mdrewritten under the new brand with a "Renamed fromdcode" callout,idc copilotsection, updated examples throughout..github/copilot-instructions.mddocuments the new architecture (subcommand layout,prepare_container_exechelper,idc:prefix convention, binary/package split).Breaking changes⚠️
dcodetool is no longer published. Users must:dcode .→idc code .(and similarly forshell,doctor,update).dcodeopened the cwd in VS Code; bareidcprints help.from dcode.X import Y→from indevcontainer.X import Y(only matters for embedders / scripts that import internals).dcodecompatibility shim is shipped — the rename is a hard cut.Migration (for repo maintainers)
After merging, the recommended sequence is:
main.InDevContainer. GitHub permanently redirects all the old URLs.Release-As: 1.0.0trailer, and the release page will land on the canonical new URL.Doing the rename around this merge keeps everything canonical from v1.0.0 onward (rather than relying on GitHub's redirect for the
uv tool installURL, version-check API calls, and the GitHub Release page).Verification
uv run ruff check— cleanuv run pytest— 347 passed (was 318; +29 new tests for the restructured CLI, copilot dispatch,_copilot_installedprobe,_split_copilot_args)idc --help, bareidc,idc {code,shell,copilot,doctor,update} --help,python -m indevcontainer --helpall render correctlyidc copilot --yolo --resume(outside a devcontainer) reachesrun_copilotand exits with the expectedidc: no devcontainer.json found …; run \idc doctor` to diagnose`Commits
c60ed14feat!: rename project to InDevContainer; CLI binary becomes idc(carriesRelease-As: 1.0.0)78d6ed8feat!: restructure CLI as subcommands and add idc copilotcdb2d3adocs: rewrite README and copilot-instructions for InDevContainer rebrand(The branch also includes
7d724db feat(research): add findings on extending with SSH agent forwarding and VS Code CLI bridge— a research-findings doc that was already on this lineage before the rebrand work began.)🤖 Branch prepared by GitHub Copilot CLI. Commits are unsigned — the ssh-agent was empty when committing; rebase with
--exec 'git commit --amend --no-edit -S'to re-sign before merge if your verification flow requires it.