Skip to main content

Prerequisites

scripts/install.bash requires git, ln, readlink, awk, and nix-build on PATH. The project’s devenv.nix provides everything needed; entering the dev shell satisfies the requirements automatically.
direnv allow

Run the installer

bash scripts/install.bash --dry-run
After applying, open a new shell so the updated PATH (which adds the nix-built runtime under ~/.local/state/jstack/runtime/bin) is picked up:
exec zsh

What it does

The installer is idempotent — re-running on a clean tree reports zero actions.
PhaseAction
preflightVerify the repo layout and required tools
seed CLAUDE.mdOptional: copy live ~/.claude/CLAUDE.md into the repo (--seed-from-live)
link filesSymlink settings.json and CLAUDE.md into ~/.claude/
link directoriesSymlink skills/, agents/, commands/, hooks/ into ~/.claude/
migrate pluginsSymlink plugins/ into ~/.claude/plugins, backing up any existing tree
build runtimenix-build runtime/default.nix and link the result under ~/.local/state/jstack/runtime
shell rcAppend a marker block to ~/.zshrc (or ~/.bashrc) that prepends the runtime to PATH

Backups

Anything the installer would overwrite is moved aside first. Backups land at:
~/.claude/.jstack-backups/<timestamp>/
A RESTORE.md is dropped alongside the backup describing how to recover.

First-run prerequisites

If ~/.claude/settings.json or ~/.claude/CLAUDE.md is currently a symlink into the nix store (managed by an existing home-manager module), install.bash will replace it but the home-manager module will recreate the symlink on the next home-manager switch. Disable the module first:
1

Remove the home-manager module

Delete programs.jstack.enable = true; (or equivalent) from your home-manager configuration.
2

Switch home-manager

Run home-manager switch to drop the previous symlinks.
3

Run the installer

Run bash scripts/install.bash.

Flags

FlagMeaning
--dry-runPrint actions, change nothing
--verbose / -vPrint every action including skips
--seed-from-liveSeed CLAUDE.md from ~/.claude/CLAUDE.md if the repo file is empty and the live one is a nix-store symlink
-h / --helpShow inline help

Environment overrides

VariableDefaultUse
CLAUDE_HOME~/.claudeOverride the install target (useful for testing)
XDG_STATE_HOME~/.local/stateOverride where the runtime symlink is written
Last modified on April 8, 2026