You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-19Lines changed: 35 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,12 +9,12 @@ Published to GHCR under the `sourecode/devcontainer-features` namespace.
9
9
10
10
| Feature | OCI reference | Summary |
11
11
|---|---|---|
12
-
|`claude-code`|`ghcr.io/sourecode/devcontainer-features/claude-code:1`| Installs the Claude Code CLI via the official native installer (no Node.js required). **Temporary** — will be retired once [anthropics/devcontainer-features#37](https://github.com/anthropics/devcontainer-features/pull/37) is merged. |
13
-
|`rtk`|`ghcr.io/sourecode/devcontainer-features/rtk:1`| Installs [rtk](https://github.com/rtk-ai/rtk), an LLM token-reducing CLI proxy; auto-patches Claude Code if present. |
12
+
|`claude-code`|`ghcr.io/sourecode/devcontainer-features/claude-code:2`| Installs the Claude Code CLI via the official native installer into `/usr/local/bin`, so the binary survives home-directory volume mounts. Requires Node.js — automatically pulls in the `nvm` feature via `dependsOn`. |
13
+
|`rtk`|`ghcr.io/sourecode/devcontainer-features/rtk:2`| Installs [rtk](https://github.com/rtk-ai/rtk), an LLM token-reducing CLI proxy, into `/usr/local/bin`. Auto-patches Claude Code via `postCreateCommand` so the hook is written against the mounted home, not the image. |
14
14
|`context-mode`|`ghcr.io/sourecode/devcontainer-features/context-mode:1`| Installs the [`context-mode`](https://github.com/mksglu/context-mode) Claude Code plugin. |
15
-
|`nvm`|`ghcr.io/sourecode/devcontainer-features/nvm:2`| Installs [nvm](https://github.com/nvm-sh/nvm) system-wide and optionally a Node version (defaults to LTS), with `node`/`npm`/`npx` symlinked into `/usr/local/bin`. No yarn. |
15
+
|`nvm`|`ghcr.io/sourecode/devcontainer-features/nvm:2`| Installs [nvm](https://github.com/nvm-sh/nvm) system-wide at `/usr/local/share/nvm`and optionally a Node version (defaults to LTS), with `node`/`npm`/`npx` symlinked into `/usr/local/bin`. No yarn. |
16
16
17
-
`rtk` and `context-mode` declare `installsAfter` for both `ghcr.io/sourecode/devcontainer-features/claude-code` and `ghcr.io/anthropics/devcontainer-features/claude-code`, so the runtime orders them after whichever claude-code feature is present.
17
+
All binaries land in `/usr/local/bin` (or `/usr/local/share/...`) rather than the user's home, so they survive the shared home-volume pattern described in [`docs/persistence.md`](docs/persistence.md). `rtk` and `context-mode` declare `installsAfter` for both `ghcr.io/sourecode/devcontainer-features/claude-code` and `ghcr.io/anthropics/devcontainer-features/claude-code`, so the runtime orders them after whichever claude-code feature is present.
"description": "TEMPORARY: Installs the latest Claude Code CLI via the official native installer (no Node.js required). Drop this feature in favor of `ghcr.io/anthropics/devcontainer-features/claude-code` once https://github.com/anthropics/devcontainer-features/pull/37 is merged.",
"description": "Installs the latest Claude Code CLI via the official native installer, placing the binary in /usr/local/bin so it survives home-directory volume mounts.",
Copy file name to clipboardExpand all lines: src/nvm/devcontainer-feature.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"id": "nvm",
3
-
"version": "2.0.0",
3
+
"version": "2.1.0",
4
4
"name": "nvm",
5
5
"description": "Installs nvm (Node Version Manager) system-wide at /usr/local/share/nvm and optionally a Node version (defaults to LTS), with node/npm/npx symlinked into /usr/local/bin so every shell and subsequent feature sees them. No yarn.",
echo"rtk feature: expected /usr/local/bin/rtk after install, but it was not found.">&2
39
25
exit 1
40
26
fi
41
27
42
-
if [ "$AUTO_PATCH_CLAUDE"="true" ];then
43
-
ifcommand -v claude >/dev/null 2>&1;then
44
-
run_as_user 'rtk init -g --auto-patch'
45
-
else
46
-
echo"rtk feature: claude CLI not on PATH, skipping auto-patch. Install a claude-code feature (e.g. ghcr.io/sourecode/devcontainer-features/claude-code) to enable it.">&2
47
-
fi
28
+
mkdir -p /usr/local/share/rtk
29
+
cat >/usr/local/share/rtk/post-create.sh <<EOF
30
+
#!/usr/bin/env bash
31
+
# Written by the rtk devcontainer feature at build time.
32
+
# Runs as the remote user via postCreateCommand so it can safely write to
33
+
# the (volume-mounted) home directory.
34
+
set -e
35
+
36
+
if [ "${AUTO_PATCH_CLAUDE}" != "true" ]; then
37
+
exit 0
38
+
fi
39
+
40
+
if ! command -v claude >/dev/null 2>&1; then
41
+
echo "rtk feature: claude CLI not on PATH, skipping auto-patch. Install a claude-code feature (e.g. ghcr.io/sourecode/devcontainer-features/claude-code) to enable it." >&2
0 commit comments