Skip to content

feat!: rename to InDevContainer (idc) and add idc copilot#10

Merged
rosstaco merged 4 commits into
mainfrom
feat/rename
May 28, 2026
Merged

feat!: rename to InDevContainer (idc) and add idc copilot#10
rosstaco merged 4 commits into
mainfrom
feat/rename

Conversation

@rosstaco
Copy link
Copy Markdown
Owner

@rosstaco rosstaco commented May 28, 2026

The project has outgrown the dcode name. 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 to idc, restructures the CLI as proper subcommands, and adds idc copilot.

The Release-As: 1.0.0 trailer on commit 1 tells release-please to cut v1.0.0 for this rebrand rather than its default 0.6.0 bump (since bump-minor-pre-major: true).

What changes

New CLI surface

Old New
dcode <path> idc code <path>
dcode shell <path> idc shell <path>
dcode doctor idc doctor
dcode update idc update
(none) idc copilot [<path>] [args...]new
dcode (bare) idc prints help (was: opened cwd in VS Code)
  • No top-level positional any more, so the old _looks_like_subcommand workaround is gone.
  • -i/--insiders moved from the top-level parser onto the subcommands that actually use it (code, shell).
  • idc copilot accepts flags transparently — idc copilot --yolo --resume Just 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 becomes idc = "indevcontainer.cli:main"; URLs point at rosstaco/InDevContainer.
  • release-please-config.json: package-name = "indevcontainer".
  • User-facing stderr prefix: dcode:idc: everywhere.
  • update.py: now uv tool upgrade indevcontainer; install URL & uv-tool-list regex updated.
  • version_check.py: GitHub API URLs updated; User-Agentidc-doctor.

idc copilot implementation

  • Shares container resolution with idc shell via a new prepare_container_exec() helper in shell.py returning a ContainerExec dataclass (container_id, exec_user, workdir, ssh_sock, workspace_folder, devcontainer_cfg, main_repo, rel_path).
  • Probes command -v copilot inside 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; _split_copilot_args() cleanly separates path from forwarded args.

Docs

  • README.md rewritten under the new brand with a "Renamed from dcode" callout, idc copilot section, updated examples throughout.
  • .github/copilot-instructions.md documents the new architecture (subcommand layout, prepare_container_exec helper, idc: prefix convention, binary/package split).

Breaking changes ⚠️

  • The dcode tool is no longer published. Users must:
    uv tool uninstall dcode
    uv tool install git+https://github.com/rosstaco/InDevContainer
  • dcode .idc code . (and similarly for shell, doctor, update).
  • Bare dcode opened the cwd in VS Code; bare idc prints help.
  • Python import path: from dcode.X import Yfrom indevcontainer.X import Y (only matters for embedders / scripts that import internals).
  • No dcode compatibility shim is shipped — the rename is a hard cut.

Migration (for repo maintainers)

After merging, the recommended sequence is:

  1. Merge this PR into main.
  2. Rename the GitHub repo: Settings → General → Repository name → InDevContainer. GitHub permanently redirects all the old URLs.
  3. Update local remote:
    git remote set-url origin https://github.com/rosstaco/InDevContainer.git
  4. Merge the release-please PR that appears next. Release-please will cut v1.0.0 thanks to the Release-As: 1.0.0 trailer, 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 install URL, version-check API calls, and the GitHub Release page).

⚠️ Never recreate a repo at rosstaco/dcode afterwards — that would break the redirect for any user still referencing the old name.

Verification

  • uv run ruff check — clean
  • uv run pytest347 passed (was 318; +29 new tests for the restructured CLI, copilot dispatch, _copilot_installed probe, _split_copilot_args)
  • ✅ Smoke: idc --help, bare idc, idc {code,shell,copilot,doctor,update} --help, python -m indevcontainer --help all render correctly
  • idc copilot --yolo --resume (outside a devcontainer) reaches run_copilot and exits with the expected idc: no devcontainer.json found …; run \idc doctor` to diagnose`

Commits

SHA Message
c60ed14 feat!: rename project to InDevContainer; CLI binary becomes idc (carries Release-As: 1.0.0)
78d6ed8 feat!: restructure CLI as subcommands and add idc copilot
cdb2d3a docs: 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.

rosstaco and others added 4 commits May 27, 2026 23:38
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>
@rosstaco rosstaco changed the title test feat!: rename to InDevContainer (idc) and add idc copilot May 28, 2026
@rosstaco rosstaco merged commit 2f3bfc4 into main May 28, 2026
3 checks passed
@rosstaco rosstaco deleted the feat/rename branch May 28, 2026 08:27
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