# Bash Script Installer for Zsh The "Bash Script Installer" simplifies the setup of Zsh. ## Zsh ### Ubuntu ```zsh bash -c "$(curl -fsSL https://tinyurl.com/y6fhb594)" ``` ### WSL ```zsh bash -c "$(curl -fsSL https://tinyurl.com/ycyct6wp)" ``` ### MacOS ```zsh bash -c "$(curl -fsSL https://tinyurl.com/yptybtpa)" ``` ### Configuration ```zsh bash -c "$(curl -fsSL https://tinyurl.com/y8vf753j)" ``` ### Shell framework and prompt The installers use Oh My Zsh for framework features and plugins, with the OMZ theme disabled: ```zsh ZSH_THEME="" source "$ZSH/oh-my-zsh.sh" eval "$(starship init zsh)" ``` Starship owns the prompt and loads after Oh My Zsh. The managed Starship config is installed at `~/.config/starship.toml`. A Nerd Font is required for the Powerline symbols. ## AI commits The managed `aicommit` function can use Claude, Codex, Copilot, or OpenCode to create a commit from staged changes: ```zsh aicommit opencode ``` The installers place the required OpenCode agent at `~/.config/opencode/agents/ai-commit.md`. The agent may inspect Git status, the cached diff, and recent history, and may execute `git commit`; all unrelated tools and shell commands are denied. The shared commit instructions must exist at `~/.config/ai-commit-prompt.txt`. ## Plan-build workflow The local `plan_build` function is a thin cached launcher for the canonical public [plan-build gist](https://opengist.resetrix.work/weehong/plan-build). When curl is available, each invocation stages `plan_build.zsh`, `SKILL.md`, and `ARCHITECT.md`, requires all three to be non-empty, and syntax-checks the executable. It then moves the complete bundle into a unique immutable release directory and atomically switches one `current` symlink. Refresh activation is serialized with a kernel-backed Zsh file lock so concurrent callers cannot mix releases and crashes cannot leave a stale lock. If refresh fails, the launcher preserves and uses the last complete, validated release and repairs its skill links. Zsh is always required; curl is required only when no valid cached release exists. ```zsh plan_build plan_build --prompt plan_build --writing-plan plan_build --prompt --brainstorm plan_build --yolo --writing-plan plan_build --architect plan_build --architect --new plan_build --architect --yolo ``` The canonical executable defines the current command behavior and options. Each invocation binds the executable and both skills to its selected immutable release. The launcher also points the installed Claude Code skill paths through the active `current` release: - `SKILL.md` → `~/.claude/skills/plan-build/SKILL.md` - `ARCHITECT.md` → `~/.claude/skills/plan-build-architect/SKILL.md` The launcher defaults to `https://opengist.resetrix.work/weehong/plan-build/raw/HEAD` and `${XDG_CACHE_HOME:-$HOME/.cache}/plan-build`. Override these with `PLAN_BUILD_BASE_URL` and `PLAN_BUILD_CACHE_DIR`. Installed skill paths remain fixed at `~/.claude/skills`; cached invocations receive immutable release paths through environment variables. The downloaded script is remote executable code: syntax validation catches malformed Zsh but is not a security sandbox, so only point `PLAN_BUILD_BASE_URL` at a source you trust. Remote code is executed in a child Zsh process and is never sourced into the caller shell. Invoking `plan_build` once installs or repairs both skill links. To install standalone files without the cached launcher, follow the installation instructions in the canonical gist instead.