-
Notifications
You must be signed in to change notification settings - Fork 2
feat(config): move .claude to home directory with named volume and auth token support #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e67eb23
2d39a30
ed60a16
7219cc9
f43971a
13f9354
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,9 +9,37 @@ | |
|
|
||
| ### Changed | ||
|
|
||
| #### Configuration | ||
| - Moved `.claude` directory from `/workspaces/.claude` to `~/.claude` (home directory) | ||
| - Added Docker named volume for persistence across rebuilds (per-instance isolation via `${devcontainerId}`) | ||
| - `CLAUDE_CONFIG_DIR` now defaults to `~/.claude` | ||
|
|
||
| #### Authentication | ||
| - Added `CLAUDE_AUTH_TOKEN` support in `.secrets` for long-lived tokens from `claude setup-token` | ||
| - Auto-creates `.credentials.json` from token on container start (skips if already exists) | ||
| - Added `CLAUDE_AUTH_TOKEN` to devcontainer.json secrets declaration | ||
|
|
||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #### Security | ||
| - Protected-files-guard now blocks modifications to `.credentials.json` | ||
| - Replaced `eval` tilde expansion with `getent passwd` lookup across all scripts (prevents shell injection via `SUDO_USER`/`USER`) | ||
| - Auth token value is now JSON-escaped before writing to `.credentials.json` | ||
| - Credential directory created with restrictive umask (700) matching credential file permissions (600) | ||
|
Comment on lines
+24
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rephrase Security/Scripts entries to focus on user-facing impact, not implementation mechanics. Lines 19, 21, and 26 expose internal implementation details ( ✍️ Suggested rewording-Replaced `eval` tilde expansion with `getent passwd` lookup across all scripts (prevents shell injection via `SUDO_USER`/`USER`)
+Home directory is now resolved securely in all scripts, preventing potential shell injection when running under `sudo`
-Credential directory created with restrictive umask (700) matching credential file permissions (600)
+Credential directory is created with permissions restricted to the container user only
-`chown` in mcp-qdrant poststart hooks now uses resolved `_USERNAME` instead of hardcoded `vscode` or `$(id -un)`
+mcp-qdrant poststart hooks now correctly assign file ownership for non-default container usersAs per coding guidelines: "Write CHANGELOG entries from the user's perspective — what changed, not how it was implemented." Also applies to: 26-26 🤖 Prompt for AI Agents |
||
|
|
||
| #### Status Bar | ||
| - **ccstatusline line 1** — distinct background colors for each token widget (blue=input, magenta=output, yellow=cached, green=total), bold 2-char labels (In, Ou, Ca, Tt) fused to data widgets, `rawValue: true` on model widget to strip "Model:" prefix, restored spacing between token segments | ||
|
|
||
| #### Scripts | ||
| - Replaced `setup-symlink-claude.sh` with `setup-migrate-claude.sh` (one-time migration) | ||
| - Auto-migrates from `/workspaces/.claude/` if `.credentials.json` present | ||
| - `chown` in mcp-qdrant poststart hooks now uses resolved `_USERNAME` instead of hardcoded `vscode` or `$(id -un)` | ||
| - **Migration script hardened** — switched from `cp -rn` to `cp -a` (archive mode); added marker-based idempotency, critical file verification, ownership fixup, and old-directory rename | ||
| - **`.env` deprecation guard** — `setup.sh` detects stale `CLAUDE_CONFIG_DIR=/workspaces/.claude` in `.env`, overrides to `$HOME/.claude`, and auto-comments the line on disk | ||
|
|
||
| #### Documentation | ||
| - All docs now reference `~/.claude` as default config path | ||
| - Added `CLAUDE_AUTH_TOKEN` setup flow to README, configuration reference, and troubleshooting | ||
| - ccstatusline README verification commands now respect `CLAUDE_CONFIG_DIR` | ||
|
|
||
| ### Fixed | ||
|
|
||
| #### Plugin Marketplace | ||
|
|
@@ -29,6 +57,9 @@ | |
|
|
||
| ### Removed | ||
|
|
||
| #### Scripts | ||
| - `setup-symlink-claude.sh` — no longer needed with native home directory location | ||
|
|
||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #### VS Code Extensions | ||
| - **Todo+** (`fabiospampinato.vscode-todo-plus`) — removed from devcontainer extensions | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New features belong under
### Added, not### Changed.The Docker named volume (line 9) and the entire
#### Authenticationsection (lines 12–15) introduce brand-new capabilities — they are not modifications to existing behavior. Placing them under### Changedmisclassifies them.✍️ Suggested restructure
As per coding guidelines: "Group changelog entries under the appropriate
### Added,### Changed,### Fixed, or### Removedheading."🤖 Prompt for AI Agents