Repository navigation
feat: dct-init - one command to set up any project folder (Windows + Mac/Linux) - #105
Merged
Merged
Conversation
…Mac/Linux) After the first install a user sets up a new project folder by typing `dct-init` in it, on every machine (Terje, 2026-09-25). Every dct-* command is installed by DCT's own install script. - host-tools/dct-init.sh, dct-init.ps1 + dct-init.cmd: the per-folder logic moved out of install.sh / install.ps1. Checks Rancher Desktop (installed / visible / running), VS Code and Intel Macs before writing anything; refuses system folders, the drive root and the home folder; never overwrites an existing backup. Exit codes 0/1/2/3 with ERRnnn lines, as agreed with client-provisioning (urb-agents #1505). - install.sh / install.ps1 are now bootstraps: install the commands for the user (Windows: %LOCALAPPDATA%\devcontainer-toolbox\bin on the user PATH), then run dct-init once. install.ps1 stops with ERR006 when an organisation enforces AllSigned/Restricted instead of working around it. - Host Commands workflow: new dct-init jobs on windows-latest (install via install.ps1, dct-init by name from a new shell, exit codes through the .cmd shim) and Linux. - DCT_INSTALL_SOURCE / DCT_INSTALL_REF test hooks. - PLAN-dct-init-command (active): Phase 1 waits on Terje's execution policy test (urb-agents #1539); Phase 2 built. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Found on Terje's PC (urb-agents #1541): `dct-init -TargetDir C:\Windows\System32` with Rancher Desktop stopped said 'Rancher Desktop is not running' (exit 1), so a wrong folder cost the user two round trips. The folder checks are local and about the command the user just typed, so they now come first (bash and PowerShell). Nothing is written before either check passes. Regression checks added to both CI jobs. Plan: Phase 1 done (the real install ran unsigned on the managed PC, no ERR006). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Getting Started: new section 'Setting Up Another Project: dct-init' (what it checks, where it is installed, -TargetDir, exit codes for scripts); Step 1 says the installer installs dct-init first; the migration steps and the dct-exec section updated. - Quick Start (index.md, README): 'Next time: just type dct-init'. - project-devcontainer-toolbox.md lists dct-init with the host commands. - PLAN-dct-init-command: Phase 2 done, Phase 3 in progress. - Version 1.9.0 (MINOR: new feature). Terje chose to merge code and docs together. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.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.
Draft: do not merge before Terje's execution-policy result (urb-agents #1539). Today's
irm | iexisn't subject to PowerShell's execution policy. The new installer runs a.ps1file, which is. On a PC where the organisation enforcesAllSigned, it deliberately stops withERR006("ask IT"). If that's the case on the managed PCs, merging would break the Quick Start there.What it does
dct-initsets up a project folder:devcontainer.jsonand.vscode/extensions.jsonSystem32was where Terje's first test landed). It never overwrites an existing backup.0done,1prerequisite missing,2download/network,3folder problem, each with anERRnnnline. This is the contract agreed with client-provisioning (urb-agents #1505).install.sh/install.ps1become bootstraps. They install thedct-*commands for the user (no admin), then rundct-initonce. The Quick Start command is unchanged.%LOCALAPPDATA%\devcontainer-toolbox\bin, added to the user PATH.~/.local/bin, next todct-exec.Verification so far
docker/code: every case returns the right exit code, anddct-initworks by name in a new folder.install.ps1viaInvoke-Expressionlike the Quick Start: the session survives every case, and the user's$ErrorActionPreferenceis untouched.PSAvoidUsingWriteHost), actionlint. The.ps1files are plain ASCII, because Windows PowerShell 5.1 reads BOM-less files as ANSI.Host Commandsjobs onwindows-latest/ Linux in this PRDCT_INSTALL_REF)🤖 Generated with Claude Code