feat: add Claude Code bootstrap (dotfiles install --claude)#3
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Idempotent installer that bootstraps Claude Code binary, marketplaces, plugins, rules, hooks, settings, vault, and QMD. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…add qmd Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Guard zsh-only files (.alias, .fnm, .fzf, .thefuck, .pnpm) behind ZSH_VERSION check in .profile — fixes ~15 errors when Claude Code's bash tool sources the profile - Guard typeset -U in .path (zsh-only) - Parameterize cs alias with $HOME - Add VAULT_DIR export to .env Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
16 new tests covering install script, manifests, rules, hooks, settings template, CLI wiring, and security (no hardcoded paths). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
P1 (Critical): - require_claude_* now return 1 after warn so try_or_track catches failures - Use grep -Fq for fixed-string matching (prevents substring false positives) - Remove duplicate plugins (code-review, security-guidance from claude-code-plugins) - Standardize settings.template.json on $HOME (no mixed ~ paths) P2 (Important): - Remove duplicate bot banner from install_claude.sh (CLI already prints it) - Remove double-logging from settings hook (hook script handles its own log) - Use envsubst for $HOME expansion (safe against metacharacters), sed fallback - Alphabetize --claude in install help menu - Add gnu-tools.md to test_claude_bootstrap rules array - Move install log from /tmp to ~/.cache/dotfiles/ (private, user-owned) P3 (Nice-to-have): - Combine copy_rules/copy_hooks into single copy_claude_files function - Simplify setup_vault with brace expansion - Use trap RETURN for tmpfile cleanup in install_claude_binary - Add claude/ directory entry to architecture.md - Guard cs alias against missing recall skill venv - Add log rotation (>1MB truncation) to index-sessions.sh Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Implementation plan with 12 tasks and research appendix - Design document with architecture decisions - Solution doc capturing all 16 review findings and prevention strategies Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Obsidian and gettext (envsubst) to Brewfile - Expand vault structure with Daily/ and Polaris/ directories - Add top-of-mind.md starter template for Polaris concept - Setup QMD collections (notes + sessions) with context descriptions - Run QMD embed for vector search on first install - Add QMD MCP server to settings template for Claude Code integration - Enhance vault-lookback rule with three search modes and tips - Add 3 new tests (vault templates, QMD MCP config) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e.json MCP servers belong in ~/.claude.json (via 'claude mcp add'), not in settings.json. The settings template now only contains env, hooks, and preferences. QMD MCP is registered via 'claude mcp add --transport stdio' during bootstrap. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…er-project) Co-Authored-By: Claude Opus 4.6 <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.
Summary
dotfiles install --claudecommand that idempotently bootstraps Claude Code: native binary, 17 marketplaces, 54 plugins, rules, hooks, settings, QMD, and Obsidian vault integrationWhat's New
scripts/install_claude.shscripts/requirers.shrequire_claude_marketplace/require_claude_pluginhelpersbin/dotfiles--claudesubcommand, wired into--allclaude/marketplaces.list,claude/plugins.listclaude/settings.template.json$HOMEexpansion, hooks configclaude/rules/*.mdclaude/hooks/index-sessions.shsystem/.alias,.env,.path,runcom/.profilebin/dotfiles-testtest_claude_bootstrap()docs/plans/,docs/solutions/,docs/agents/Key Design Decisions
@anthropic-ai/claude-codefromnpm.list, uses official installerbash "$ROOT_DIR/scripts/install_claude.sh"(notsource) to prevent variable leakageclaude plugin marketplace list --jsonandclaude plugin list --jsononce before iterating (performance)jq -s '.[0] * .[1]'preserves user customizations while adding template defaults$HOMEexpansion usesenvsubst(metacharacter-safe) with sed fallbackCode Review Findings (Fixed)
4 parallel review agents found 16 issues, all addressed in commit
29206b9:require_claude_*(addedreturn 1), loosegrepmatching (use-Fq), duplicate plugins, mixed$HOME/~Full details:
docs/solutions/logic-errors/claude-bootstrap-review-batch-fixes.mdTesting
Post-Deploy Monitoring & Validation
No additional operational monitoring required: this is a local dotfiles bootstrap command with no server-side components.