Add portable Claude Code config
Saves ~/.claude/settings.json (user-level prefs + Bash/Read permissions allowlist) so the same Claude Code config can be replicated on other hosts via install.sh. What gets deployed: - .claude/settings.json — theme, verbose, defaultMode, skipAutoPermissionPrompt and the cumulative "approve once" allowlist for common ops (systemctl, iptables, journalctl, git, curl, etc.). Server-specific allow entries (e.g. /home/mastodon/* paths) are dead weight elsewhere but harmless. - .claude/.gitignore — explicit deny-list so a future `git add .claude` doesn't accidentally pull in credentials, session logs, project memories, file-history, telemetry, caches, or settings.local.json. What is NOT tracked (by design): - .credentials.json (auth) - history.jsonl, sessions/, projects/ (chat data, project memories) - settings.local.json (per-machine overrides — by Claude Code convention) - file-history/, plans/, paste-cache/, shell-snapshots/, session-env/, telemetry/, downloads/, cache/, backups/, mcp-needs-auth-cache.json - plugins/ (marketplace install paths are absolute and host-specific) deploy_dir's merge semantics mean: on a host that already has ~/.claude/.credentials.json or ~/.claude/projects/, those stay untouched because the repo doesn't track them. Only the files we explicitly include get installed. Existing settings.json on the target host is moved aside to ~/.drunkendotfiles.bak.<timestamp>/ before being replaced.
This commit is contained in:
@@ -36,7 +36,7 @@ PERSONAL_FILES=(
|
||||
# untouched. This deliberately avoids wholesale-replacing $HOME/.local etc.,
|
||||
# which would sweep away unrelated user data (fonts, app state, ...).
|
||||
PERSONAL_DIRS=(
|
||||
.fonts .irssi .nano .themes .local .mplayer
|
||||
.fonts .irssi .nano .themes .local .mplayer .claude
|
||||
)
|
||||
|
||||
have() { command -v "$1" >/dev/null 2>&1; }
|
||||
|
||||
Reference in New Issue
Block a user