danielmiessler / danielmiessler/LifeOS
Project-scoped installs (--config-root/CLAUDE_CONFIG_DIR) silently fall back to ~/.claude in ~60 files
- Dominant language
- TypeScript
- Stars
- 19k
- Forks
- 2.5k
- Avg merge
- 8d 17h
- Merged PRs (30d)
- 1
Description
The install Tools accept `--config-root`/`--config-dir` (or `CLAUDE_CONFIG_DIR`/`LIFEOS_DIR` env vars) to install LifeOS somewhere other than the global `~/.claude` — useful if you want it scoped to one project instead of leaking into every Claude Code session.
But past the install step, ~60 files across `install/LIFEOS`, `install/hooks`, and `install/skills` hardcode `homedir() + '.claude'` (or `$HOME/.claude` in shell) directly, bypassing those flags entirely. In practice:
- Hooks fire with commands pointing at files that were never placed there (`No such file or directory`) — `hooks.json` ships commands hardcoded to `$HOME/.claude/...`, and `InstallHooks.ts` merges them verbatim into `settings.json` without rewriting the prefix to the actual `--config-root`.
- `install/hooks/lib/paths.ts`'s `getClaudeDir()` — the central resolver several core hooks depend on (`PromptProcessing`, `EventLogger`, `LoadContext`, `AgentInvocation`) — only honors `CLAUDE_PLUGIN_ROOT`, not `CLAUDE_CONFIG_DIR`, so it silently falls back to the real home dir.
- Dozens of memory/knowledge/Pulse tools construct their working paths as `pathResolve(homedir(), ".claude/...")` with no env-var check at all.
Net effect: a project-scoped install (`--config-root /.claude`) works during setup, then silently reads/writes the real global `~/.claude` once you actually use it.
Found and fixed while doing a real project-scoped install. PR incoming with the fix (60 files, all additive — env var checked first, falls through to the exact original default, zero behavior change for a normal global install).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with install/hooks/lib/paths.ts, hooks.json, and InstallHooks.ts, then audit the path construction in install/LIFEOS, install/hooks, and install/skills. Verify that project-scoped installs honor CLAUDE_CONFIG_DIR or LIFEOS_DIR while normal installs preserve the existing ~/.claude behavior, including hook command paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell, typescript
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100