# agents-scaffold — Air-gapped & Windows install How to install without internet access. For the overview see the [README](../README.md). The remote install (`curl | bash`) downloads the template from GitHub, so it cannot work in a closed network — instead, build a **bundle** on a connected machine and carry it in. Running the script from inside the extracted bundle performs no download. ## Prerequisite — Git Bash on Windows The bootstrap script and `.claude/hooks/*.sh` are all bash. On Windows you need **Git for Windows (Git Bash)**. WSL's `bash.exe` is not used — its path model differs. Claude Code on Windows also runs hooks and shell commands through Git Bash. | Requirement | Used for | Installer to carry in | |---|---|---| | Git for Windows | bash, git, sed, awk, tar, sha256sum | [git-scm.com/downloads/win](https://git-scm.com/downloads/win) — 64-bit Standalone Installer | | Python 3 | `observe-lite.sh` / `stop-memory-remind.sh` hooks, `.claude/scripts/knowledge_graph.py` | [python.org/downloads/windows](https://www.python.org/downloads/windows/) — Windows installer (64-bit) | | agents-scaffold bundle | the template itself | built in step 1 below | Stack tools (`bun`, `go`, `cargo`, `ruff`, ...) are used by the pre-commit gate **only when present** — missing tools skip their checks. Bring them in separately from your internal mirror. Git for Windows can be installed with `dotfiles/windows/install-git.cmd` from inside the bundle — put the installer you carried in under `dotfiles\windows\offline\` and run it: it installs silently without admin rights and sets up `~/.bashrc` for Git Bash (signature check and SHA-256 output included; details in the "Windows 폐쇄망" section of [dotfiles/README.md](../dotfiles/README.md), Korean). ## 1. Build the bundle (connected machine) ```bash git clone https://github.com/leeyudok/agents-scaffold.git cd agents-scaffold scripts/make-offline-bundle.sh # for a specific tag: --ref v1.2.0 ``` `dist/` gets three files: `agents-scaffold-offline-.zip`, the matching `.tar.gz`, and `SHA256SUMS`. The bundle holds **committed content only** (`git archive`). Even when built on Windows, `.gitattributes` keeps `*.sh` LF inside the archive. ## 2. Verify integrity after transfer ```bash # Git Bash cd && sha256sum -c SHA256SUMS ``` ```bat rem cmd — compare the printed hash with the value in SHA256SUMS certutil -hashfile agents-scaffold-offline-.zip SHA256 ``` ## 3. Extract Explorer "Extract All", or `tar -xf agents-scaffold-offline-.zip` (the built-in `tar` on Windows 10+ also handles zip). You get a single `agents-scaffold/` folder. ## 4. Install **Git Bash**: ```bash bash agents-scaffold/bin/agents-scaffold.sh /c/work/myproj --stack springboot --yes ``` **cmd / PowerShell** — the launcher finds Git Bash and runs the script for you: ```bat agents-scaffold\bin\agents-scaffold.cmd C:/work/myproj --stack springboot --yes ``` - The launcher looks for `Git\bin\bash.exe` in this order: `AGENTS_SCAFFOLD_BASH` → `CLAUDE_CODE_GIT_BASH_PATH` → `%ProgramFiles%\Git` → `%LOCALAPPDATA%\Programs\Git` → `where git`. For a non-standard location: `set AGENTS_SCAFFOLD_BASH=D:\tools\Git\bin\bash.exe`. - Write the target path with forward slashes (`C:/work/myproj`) to be safe. - Options are the same as the online install → [OPTIONS.en.md](OPTIONS.en.md). - Do not copy `bin/agents-scaffold.sh` out on its own — without `.claude/` and `presets/` next to it, it falls back to the remote install, tries to download and fails. Always run it inside the extracted tree. The install appends a hook LF rule (`.claude/hooks/*.sh text eol=lf`) to the target repo's `.gitattributes`, so teammates checking out with `core.autocrlf=true` do not get CRLF hooks. ## 5. `python3` on Windows The hooks call `python3`. The python.org installer creates `python` and `py`, not `python3`. The `...\WindowsApps\python3.exe` on PATH is a stub that redirects to the Microsoft Store and fails in a closed network. 1. Settings → Apps → Advanced app settings → **App execution aliases**: turn off `python.exe` and `python3.exe` 2. In the Python install folder (e.g. `C:\Program Files\Python312\`), copy `python.exe` to `python3.exe` 3. Check from Git Bash: `python3 -c "import sys; print(sys.version)"` The `.cmd` launcher runs this check for you; on failure it warns and continues the install. ## 6. Skill symlink — it depends on the environment (#61) The installer makes `.claude/skills` a symlink to the source `.agents/skills`. Whether a symlink works on Windows **depends on the PC's policy, and can change with the network environment and over time.** An external-network PC is partly restricted and an internal-network PC is tightly controlled, so whether Developer Mode (or admin rights) and `core.symlinks` — both needed for symlinks — can be turned on differs per PC. When a symlink cannot be created, the installer therefore falls back to a copy, and the pre-commit gate checks that the staged copy matches the source. - PC that allows symlinks: turn on Developer Mode, run `git config --global core.symlinks true`, and `export MSYS=winsymlinks:nativestrict` in Git Bash before installing or cloning. - PC that does not: run with the copy. Edit skills in `.agents/skills` only, copy the same file to the same path under `.claude/skills`, and stage both paths by name (`git add -- .agents/skills/ .claude/skills/` — staging whole directories absorbs unrelated work). - If PCs of both kinds share a repo, install with `AGENTS_SCAFFOLD_NO_SYMLINK=1` from the start so everyone uses the copy. Cloning a repo committed with the symlink on a PC without symlink support turns `.claude/skills` into a plain file holding the path, and Claude Code finds no skills (the gate warns). ## 7. Updating Carry in and extract a new bundle the same way, then run with `--update`. ```bash bash agents-scaffold/bin/agents-scaffold.sh --update /c/work/myproj ``` ## Troubleshooting | Symptom | Cause → fix | |---|---| | `$'\r': command not found` | Hooks checked out with CRLF → check the `.gitattributes` rule, then `git add --renormalize .claude/hooks && rm .claude/hooks/*.sh && git checkout -- .claude/hooks` | | `Error: template download failed` | Script run outside the bundle tree → see the note in step 4 | | `Git Bash not found` | Git for Windows missing or in a non-standard path → set `AGENTS_SCAFFOLD_BASH` | | Hooks silently do nothing | `python3` is the Store stub → step 5 | | Gate warning `.claude/skills is a plain file` | Repo committed with the symlink, cloned on a PC without symlink support → step 6 (switch everyone to the copy) | | Gate block `staged .claude/skills (copy) differs` | Only the copy was edited, or only one side staged or deleted → fix the files the message lists as in step 6 and stage them by name | | Claude Code cannot find Git Bash | Non-standard path → set `CLAUDE_CODE_GIT_BASH_PATH` to the full `bash.exe` path | Installing Claude Code itself in a closed network is out of scope for this document.