From bc65519b6fb1924dcbfe9a0b746938a4d0b296c5 Mon Sep 17 00:00:00 2001 From: AnExiledDev Date: Fri, 27 Feb 2026 03:24:09 +0000 Subject: [PATCH 1/4] DevContainer performance optimizations: comment out Rust/ccms, fix Bun, clean npm cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Comment out Rust toolchain (~1.23 GB) and ccms (~301 MB) features — replacement tool for ccms pending; Rust can be re-enabled in devcontainer.json - Fix Bun PATH for non-interactive shells via /etc/profile.d/bun.sh in setup.sh - Update Bun feature to install latest version (was pinned to outdated 1.3.9) - Add npm cache cleanup to 6 features (agent-browser, ast-grep, biome, claude-session-dashboard, lsp-servers, tree-sitter) — saves ~96 MB runtime disk - Update 12 docs pages to reflect Rust/ccms as opt-in/disabled - Update CLAUDE.md commands table and CHANGELOG.md Projected savings: ~1.53 GB image, ~127s build time, ~265 MB runtime disk. --- .devcontainer/CHANGELOG.md | 9 +++++++++ .devcontainer/CLAUDE.md | 2 +- .devcontainer/devcontainer.json | 17 +++++++++-------- .devcontainer/features/agent-browser/install.sh | 1 + .devcontainer/features/ast-grep/install.sh | 1 + .devcontainer/features/biome/install.sh | 1 + .../claude-session-dashboard/install.sh | 1 + .devcontainer/features/lsp-servers/install.sh | 2 ++ .devcontainer/features/tree-sitter/install.sh | 2 ++ .devcontainer/scripts/setup.sh | 11 +++++++++++ .../content/docs/customization/configuration.md | 2 +- docs/src/content/docs/customization/rules.md | 2 +- docs/src/content/docs/features/index.md | 2 +- docs/src/content/docs/features/tools.md | 8 ++++++-- .../docs/getting-started/first-session.md | 4 ++-- docs/src/content/docs/getting-started/index.md | 4 ++-- .../docs/getting-started/installation.md | 12 ++++++------ .../docs/getting-started/requirements.md | 2 +- docs/src/content/docs/reference/architecture.md | 4 ++-- docs/src/content/docs/reference/commands.md | 12 ++++++++---- docs/src/content/docs/reference/environment.md | 4 ++-- docs/src/content/docs/reference/index.md | 2 +- 22 files changed, 71 insertions(+), 34 deletions(-) diff --git a/.devcontainer/CHANGELOG.md b/.devcontainer/CHANGELOG.md index cc6e83c..3f6c786 100644 --- a/.devcontainer/CHANGELOG.md +++ b/.devcontainer/CHANGELOG.md @@ -4,6 +4,12 @@ ### Changed +#### Performance +- Commented out Rust toolchain feature — saves ~1.23 GB image size; uncomment in `devcontainer.json` if needed +- Commented out ccms feature pending replacement tool (requires Rust) +- Updated Bun feature to install latest version (was pinned to outdated 1.3.9) +- Added npm cache cleanup to 6 features: agent-browser, ast-grep, biome, claude-session-dashboard, lsp-servers, tree-sitter (saves ~96 MB runtime disk) + #### Port Forwarding - Dynamic port forwarding for all ports in VS Code — previously only port 7847 was statically forwarded; now all ports auto-forward with notification @@ -23,6 +29,9 @@ ### Fixed +#### Bun +- Bun PATH not available in non-interactive shells — added `/etc/profile.d/bun.sh` via postStart hook + #### Session Context Plugin - **Commit reminder** no longer blocks Claude from stopping — switched from `decision: "block"` to advisory `systemMessage` wrapped in `` tags - **Commit reminder** now uses tiered logic: meaningful changes (3+ files, 2+ source files, or test files) get an advisory suggestion; small changes are silent diff --git a/.devcontainer/CLAUDE.md b/.devcontainer/CLAUDE.md index 5685a2e..27fb235 100644 --- a/.devcontainer/CLAUDE.md +++ b/.devcontainer/CLAUDE.md @@ -80,7 +80,7 @@ git worktree add /workspaces/projects/.worktrees/ -b | `ccraw` | Vanilla Claude Code (bypasses config) | | `ccw` | Claude Code with writing system prompt | | `cc-orc` | Claude Code in orchestrator mode (delegation-first) | -| `ccms` | Search session history (project-scoped) | +| ~~`ccms`~~ | _(commented out — replacement pending)_ | | `ccusage` / `ccburn` | Token usage analysis / burn rate | | `agent-browser` | Headless Chromium (Playwright-based) | | `check-setup` | Verify CodeForge setup health | diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 20f40b2..6964f80 100755 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -46,12 +46,11 @@ } }, - // Feature install order: external runtimes first (Node, uv, Rust, Bun), + // Feature install order: external runtimes first (Node, uv, Bun), // then Claude Code native binary (no Node dependency), then custom features. // npm-dependent features (agent-browser, ccusage, ccburn, claude-session-dashboard, // biome, lsp-servers) must come after Node. uv-dependent features (ruff, claude-monitor) must - // come after uv. cargo-dependent features (ccms) must come after Rust. - // notify-hook is second-to-last (lightweight, no dependencies). + // come after uv. notify-hook is second-to-last (lightweight, no dependencies). // dbr (devcontainer-bridge) is last — standalone binary, no dependencies. "overrideFeatureInstallOrder": [ "ghcr.io/devcontainers/features/node", @@ -59,7 +58,6 @@ "ghcr.io/devcontainers/features/docker-outside-of-docker", "ghcr.io/devcontainers-extra/features/uv", "ghcr.io/rails/devcontainer/features/bun", - "ghcr.io/devcontainers/features/rust", "./features/claude-code-native", "./features/tmux", "./features/agent-browser", @@ -67,7 +65,6 @@ "./features/ccusage", "./features/ccburn", "./features/ccstatusline", - "./features/ccms", "./features/claude-session-dashboard", "./features/ast-grep", "./features/tree-sitter", @@ -94,10 +91,13 @@ "moby": false }, "ghcr.io/devcontainers-extra/features/uv:1.0": {}, - "ghcr.io/rails/devcontainer/features/bun:1.0.2": {}, - "ghcr.io/devcontainers/features/rust:1.5.0": { + "ghcr.io/rails/devcontainer/features/bun:1.0.2": { "version": "latest" }, + // Uncomment to add Rust toolchain: + // "ghcr.io/devcontainers/features/rust:1.5.0": { + // "version": "latest" + // }, // Uncomment to add Go runtime (not installed by default): // "ghcr.io/devcontainers/features/go:1": {}, "./features/claude-code-native": {}, @@ -120,7 +120,8 @@ "./features/ccstatusline": { "username": "automatic" }, - "./features/ccms": {}, + // Uncomment to add ccms (requires Rust): + // "./features/ccms": {}, "./features/claude-session-dashboard": { "version": "latest", "port": "7847", diff --git a/.devcontainer/features/agent-browser/install.sh b/.devcontainer/features/agent-browser/install.sh index d34a230..c1358d4 100755 --- a/.devcontainer/features/agent-browser/install.sh +++ b/.devcontainer/features/agent-browser/install.sh @@ -58,6 +58,7 @@ npm install -g "${NPM_PACKAGE}" 2>/dev/null || { echo "[agent-browser] WARNING: Global install failed, trying user install" su - "${USERNAME}" -c "npm install -g ${NPM_PACKAGE}" 2>/dev/null || true } +npm cache clean --force 2>/dev/null || true # Download Chromium and install system dependencies echo "[agent-browser] Installing Chromium and system dependencies..." diff --git a/.devcontainer/features/ast-grep/install.sh b/.devcontainer/features/ast-grep/install.sh index 3def52a..e6e531e 100755 --- a/.devcontainer/features/ast-grep/install.sh +++ b/.devcontainer/features/ast-grep/install.sh @@ -55,5 +55,6 @@ npm install -g "${NPM_PACKAGE}" 2>/dev/null || { echo "[ast-grep] WARNING: Global install failed, trying user install" su - "${USERNAME}" -c "npm install -g ${NPM_PACKAGE}" 2>/dev/null || true } +npm cache clean --force 2>/dev/null || true echo "[ast-grep] Installed: $(ast-grep --version 2>/dev/null || echo 'unknown')" diff --git a/.devcontainer/features/biome/install.sh b/.devcontainer/features/biome/install.sh index 28c4d8f..28f5202 100755 --- a/.devcontainer/features/biome/install.sh +++ b/.devcontainer/features/biome/install.sh @@ -33,6 +33,7 @@ if [ "${VERSION}" = "latest" ]; then else npm install -g "@biomejs/biome@${VERSION}" fi +npm cache clean --force 2>/dev/null || true # Verify installation biome --version diff --git a/.devcontainer/features/claude-session-dashboard/install.sh b/.devcontainer/features/claude-session-dashboard/install.sh index daa3ba1..49abca6 100755 --- a/.devcontainer/features/claude-session-dashboard/install.sh +++ b/.devcontainer/features/claude-session-dashboard/install.sh @@ -76,6 +76,7 @@ echo "[claude-session-dashboard] Installing for user: ${USERNAME}" # === INSTALL VIA NPM === echo "[claude-session-dashboard] Installing claude-session-dashboard@${DASHBOARD_VERSION} globally..." npm install -g "claude-session-dashboard@${DASHBOARD_VERSION}" +npm cache clean --force 2>/dev/null || true # === PERSISTENCE SYMLINK (POSTSTART HOOK) === # Settings/cache live at ~/.claude-dashboard, which is ephemeral (/home/vscode). diff --git a/.devcontainer/features/lsp-servers/install.sh b/.devcontainer/features/lsp-servers/install.sh index c3b171e..3402923 100755 --- a/.devcontainer/features/lsp-servers/install.sh +++ b/.devcontainer/features/lsp-servers/install.sh @@ -84,6 +84,8 @@ install_npm_package "typescript" "typescript" "${TS_VERSION}" # Install TypeScript Language Server install_npm_package "typescript-language-server" "typescript-language-server" "${TSLSP_VERSION}" +npm cache clean --force 2>/dev/null || true + # Install gopls (Go LSP) - uses go install since it's a Go package echo "[lsp-servers] Installing gopls..." if command -v go &>/dev/null; then diff --git a/.devcontainer/features/tree-sitter/install.sh b/.devcontainer/features/tree-sitter/install.sh index d474825..d7bbf01 100755 --- a/.devcontainer/features/tree-sitter/install.sh +++ b/.devcontainer/features/tree-sitter/install.sh @@ -170,6 +170,8 @@ if [ "${NEED_PYTHON}" = "true" ]; then echo "[tree-sitter] Python bindings installed" fi +npm cache clean --force 2>/dev/null || true + # === SUMMARY === echo "" echo "[tree-sitter] Installation complete!" diff --git a/.devcontainer/scripts/setup.sh b/.devcontainer/scripts/setup.sh index 2e64bd9..c35e146 100755 --- a/.devcontainer/scripts/setup.sh +++ b/.devcontainer/scripts/setup.sh @@ -162,6 +162,17 @@ if [ "$SETUP_POSTSTART" = "true" ]; then run_poststart_hooks fi +# Fix Bun PATH — external feature only adds to ~/.bashrc (misses non-interactive shells) +if [ -d "/home/vscode/.bun/bin" ] && [ ! -f /etc/profile.d/bun.sh ]; then + sudo tee /etc/profile.d/bun.sh > /dev/null <<'BUNEOF' +export BUN_INSTALL="/home/vscode/.bun" +if [[ "${PATH}" != *"${BUN_INSTALL}/bin"* ]]; then + export PATH="${BUN_INSTALL}/bin:${PATH}" +fi +BUNEOF + sudo chmod +x /etc/profile.d/bun.sh +fi + echo "" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo " Setup Summary" diff --git a/docs/src/content/docs/customization/configuration.md b/docs/src/content/docs/customization/configuration.md index a4f030f..48c4406 100644 --- a/docs/src/content/docs/customization/configuration.md +++ b/docs/src/content/docs/customization/configuration.md @@ -187,7 +187,7 @@ DevContainer features install runtimes and tools. CodeForge pins external featur "ghcr.io/devcontainers/features/rust:1.5.0": { "version": "latest" }, "ghcr.io/anthropics/devcontainer-features/claude-code:1.0.5": {}, "./features/ruff": { "version": "latest" }, - "./features/ccms": {} + // "./features/ccms": {} // Currently disabled — replacement pending } } ``` diff --git a/docs/src/content/docs/customization/rules.md b/docs/src/content/docs/customization/rules.md index c3a1941..bd80b17 100644 --- a/docs/src/content/docs/customization/rules.md +++ b/docs/src/content/docs/customization/rules.md @@ -50,7 +50,7 @@ Key requirements: ### Session Search (`session-search.md`) -Configures the `ccms` session history search tool. Mandates project-scoped searches to prevent cross-project information leakage, and requires CLI mode (no interactive TUI) for automation compatibility. +Configures the `ccms` session history search tool. Mandates project-scoped searches to prevent cross-project information leakage, and requires CLI mode (no interactive TUI) for automation compatibility. _(Note: `ccms` is currently disabled in the default container build. This rule remains deployed so it takes effect if ccms is re-enabled.)_ Key requirements: - Always pass `--project ` to scope results diff --git a/docs/src/content/docs/features/index.md b/docs/src/content/docs/features/index.md index c80ee18..4ae61ef 100644 --- a/docs/src/content/docs/features/index.md +++ b/docs/src/content/docs/features/index.md @@ -64,7 +64,7 @@ CodeForge pre-installs **22 tools and utilities** covering session management, c Highlights include: - **`cc`** — Launch Claude Code with full CodeForge configuration (plugins, system prompt, agents) -- **`ccms`** — Search your Claude Code session history with boolean queries, role filtering, and time scoping +- **`ccms`** — Search your Claude Code session history with boolean queries, role filtering, and time scoping _(currently disabled — replacement pending)_ - **`ccusage`** / **`ccburn`** — Track your Claude API token usage and burn rate - **`ruff`**, **`biome`**, **`shellcheck`** — Code quality tools for Python, JS/TS, and Shell - **`sg`** (ast-grep), **`tree-sitter`** — Structural code search and syntax tree operations diff --git a/docs/src/content/docs/features/tools.md b/docs/src/content/docs/features/tools.md index a17fedc..8cf13b4 100644 --- a/docs/src/content/docs/features/tools.md +++ b/docs/src/content/docs/features/tools.md @@ -45,6 +45,10 @@ ccw ### ccms — Session History Search +:::caution[Currently Disabled] +The `ccms` feature is currently commented out in `devcontainer.json`. A replacement tool is pending. The documentation below is preserved for reference. +::: + Search through your Claude Code session history (JSONL files) with boolean queries, role filtering, and time scoping. Built in Rust for fast searching across large session archives. ```bash @@ -180,7 +184,7 @@ CodeForge includes modern language runtimes and fast package managers so you can |------|---------|---------|---------| | **Node.js** | via nvm | JavaScript runtime | `node --version` | | **Python** | 3.14 via uv | Python runtime | `python --version` | -| **Rust** | via rustup | Rust toolchain | `cargo --version` | +| **Rust** | via rustup | Rust toolchain _(opt-in — commented out by default)_ | `cargo --version` | | **Bun** | latest | Fast JS runtime and package manager | `bun install` | | **uv** | latest | Fast Python package manager | `uv pip install requests` | | **Go** | via feature | Go toolchain | `go version` | @@ -207,7 +211,7 @@ CodeForge uses `uv` as the default Python package manager. It is significantly f | 1 | `cc` / `claude` | Session | Claude Code with CodeForge config | | 2 | `ccraw` | Session | Vanilla Claude Code | | 3 | `ccw` | Session | Claude Code in writing mode | -| 4 | `ccms` | Session | Session history search | +| 4 | `ccms` | Session | Session history search _(currently disabled)_ | | 5 | `ccusage` | Session | API usage statistics | | 6 | `ccburn` | Session | Token burn analysis | | 7 | `ccstatusline` | Session | Terminal statusline | diff --git a/docs/src/content/docs/getting-started/first-session.md b/docs/src/content/docs/getting-started/first-session.md index c3a3043..21da7fd 100644 --- a/docs/src/content/docs/getting-started/first-session.md +++ b/docs/src/content/docs/getting-started/first-session.md @@ -84,8 +84,8 @@ From the terminal (not inside a Claude session), you can verify what's available # List all installed tools and their versions cc-tools -# Search past session history -ccms "what did we work on" +# Search past session history (ccms is currently disabled — replacement pending) +# ccms "what did we work on" # Check API token usage ccusage diff --git a/docs/src/content/docs/getting-started/index.md b/docs/src/content/docs/getting-started/index.md index 40d3b9e..faa34c6 100644 --- a/docs/src/content/docs/getting-started/index.md +++ b/docs/src/content/docs/getting-started/index.md @@ -56,11 +56,11 @@ See the [Plugins Overview](../plugins/) for the full list and detailed documenta CodeForge installs a comprehensive toolchain so you never have to stop and install something mid-session: -- **Language Runtimes** — Python 3.14, Node.js LTS, Rust, Bun, with Go available as an opt-in +- **Language Runtimes** — Python 3.14, Node.js LTS, Bun, with Rust and Go available as opt-ins - **Package Managers** — uv (Python), npm, Bun, pip/pipx - **Code Intelligence** — tree-sitter, ast-grep, Pyright, TypeScript LSP - **Linters and Formatters** — Ruff, Biome, shfmt, ShellCheck, hadolint, dprint -- **CLI Utilities** — GitHub CLI, Docker, jq, tmux, and CodeForge-specific tools like ccms, ccusage, and ccburn +- **CLI Utilities** — GitHub CLI, Docker, jq, tmux, and CodeForge-specific tools like ccusage and ccburn (ccms currently disabled — replacement pending) See the [Features Overview](../features/) for the complete reference. diff --git a/docs/src/content/docs/getting-started/installation.md b/docs/src/content/docs/getting-started/installation.md index 9320203..c38101b 100644 --- a/docs/src/content/docs/getting-started/installation.md +++ b/docs/src/content/docs/getting-started/installation.md @@ -123,7 +123,7 @@ No local Docker installation required. Port forwarding is handled automatically The first container build takes several minutes (typically 3-8 minutes depending on your internet speed and hardware). Here's what's happening behind the scenes: 1. **Base image pull** — downloads the Python 3.14 DevContainer image from Microsoft's registry -2. **Feature installation** — installs 21 DevContainer features in dependency order: Node.js and uv first (other tools depend on them), then Rust, Bun, Claude Code, and all custom features +2. **Feature installation** — installs DevContainer features in dependency order: Node.js and uv first (other tools depend on them), then Bun, Claude Code, and all custom features 3. **Post-start setup** — deploys configuration files, sets up shell aliases, and configures plugins :::caution[Don't interrupt the first build] @@ -157,8 +157,8 @@ A healthy installation shows all of these as available: | Category | Tools | |----------|-------| | Claude Code | `claude`, `cc`, `ccw`, `ccraw` | -| Session tools | `ccms`, `ccusage`, `ccburn`, `claude-monitor` | -| Languages | `node`, `python`, `rustc`, `bun` | +| Session tools | `ccusage`, `ccburn`, `claude-monitor` (`ccms` currently disabled) | +| Languages | `node`, `python`, `bun` (`rustc` opt-in) | | Code intelligence | `ast-grep`, `tree-sitter`, `pyright`, `typescript-language-server` | | Linters/Formatters | `ruff`, `biome` | | Utilities | `gh`, `docker`, `git`, `jq`, `tmux` | @@ -173,7 +173,7 @@ A few features ship with `"version": "none"` by default (shfmt, dprint, shellche - **Python 3.14** — the container's base image, with `uv` as the package manager - **Node.js LTS** — installed via nvm, with npm included -- **Rust** — latest stable via rustup +- **Rust** — latest stable via rustup _(opt-in — uncomment in `devcontainer.json`)_ - **Bun** — fast JavaScript/TypeScript runtime and package manager - **Go** — available as an opt-in (uncomment in `devcontainer.json`) @@ -182,7 +182,7 @@ A few features ship with `"version": "none"` by default (shfmt, dprint, shellche - **GitHub CLI** (`gh`) — repository management, PR creation, issue tracking - **Docker** (Docker-outside-of-Docker) — container operations from inside the DevContainer - **tmux** — terminal multiplexing for parallel Claude Code sessions -- **ccms** — search your Claude Code session history +- **ccms** — search your Claude Code session history _(currently disabled — replacement pending)_ - **ccusage** / **ccburn** — token usage analysis and burn rate tracking - **ccstatusline** — session status in your terminal prompt - **claude-monitor** — real-time session monitoring @@ -237,7 +237,7 @@ Use `git diff .devcontainer/` after updating to review what changed before commi ### Tools not found after build -**Symptoms:** Commands like `cc` or `ccms` return "command not found." +**Symptoms:** Commands like `cc` return "command not found." (Note: `ccms` is currently disabled by default.) - Run `check-setup` to identify which tools are missing - Check that the post-start script completed successfully (look for errors in the terminal output) diff --git a/docs/src/content/docs/getting-started/requirements.md b/docs/src/content/docs/getting-started/requirements.md index b68623a..63d29ac 100644 --- a/docs/src/content/docs/getting-started/requirements.md +++ b/docs/src/content/docs/getting-started/requirements.md @@ -95,7 +95,7 @@ On macOS and Windows, Docker Desktop runs inside a VM with its own resource limi **During initial setup**, internet access is required to: - Pull the base container image (`mcr.microsoft.com/devcontainers/python:3.14`) -- Install DevContainer features (Node.js, Rust, Bun, uv, and 20+ custom features) +- Install DevContainer features (Node.js, Bun, uv, and 20+ custom features; Rust is opt-in) - Download CLI tools and language servers The first build downloads roughly 2-4 GB depending on what's cached. Subsequent container starts are much faster because Docker caches the built layers. diff --git a/docs/src/content/docs/reference/architecture.md b/docs/src/content/docs/reference/architecture.md index ac114cf..08acb43 100644 --- a/docs/src/content/docs/reference/architecture.md +++ b/docs/src/content/docs/reference/architecture.md @@ -31,7 +31,7 @@ CodeForge operates in three layers. Each layer builds on the one below it: +------------------------------------------------+ ``` -**DevContainer layer** provides the foundation: a Python 3.14 container image with Node.js, Rust, and Bun runtimes (Go available as opt-in), plus CLI tools (ruff, biome, ast-grep, tree-sitter, and others). +**DevContainer layer** provides the foundation: a Python 3.14 container image with Node.js and Bun runtimes (Rust and Go available as opt-in), plus CLI tools (ruff, biome, ast-grep, tree-sitter, and others). **CodeForge layer** adds intelligence: plugins register hooks that validate commands, inject context, and run quality checks. Agents provide specialized personas for different tasks. Skills offer on-demand reference material. Rules enforce hard constraints. System prompts shape behavior. @@ -120,7 +120,7 @@ CodeForge ships 38 skills across the skill-engine, spec-workflow, ticket-workflo +-- devcontainer.json # Container definition (image, features, mounts) +-- .env # Setup flags (SETUP_CONFIG, SETUP_ALIASES, etc.) +-- features/ # DevContainer features (tool installers) -| +-- ccms/ # Session history search (Rust) +| +-- ccms/ # Session history search (commented out — replacement pending) | +-- ccstatusline/ # Terminal status line | +-- ccusage/ # API usage stats | +-- ccburn/ # Token burn rate diff --git a/docs/src/content/docs/reference/commands.md b/docs/src/content/docs/reference/commands.md index 10e35e2..b3e8210 100644 --- a/docs/src/content/docs/reference/commands.md +++ b/docs/src/content/docs/reference/commands.md @@ -35,7 +35,7 @@ Commands for session analysis, usage tracking, and system monitoring. | Command | Description | Example | |---------|-------------|---------| -| `ccms` | Search Claude Code session history. Supports boolean queries, role filtering, time scoping, and project isolation. | `ccms --project "$(pwd)" "auth approach"` | +| `ccms` | Search Claude Code session history. Supports boolean queries, role filtering, time scoping, and project isolation. _(currently disabled — replacement pending)_ | `ccms --project "$(pwd)" "auth approach"` | | `ccusage` | View Claude API usage statistics | `ccusage` | | `ccburn` | Analyze token burn rate and consumption patterns with pace indicators | `ccburn` | | `ccstatusline` | Terminal status line displaying session metrics, git state, token usage, and burn rate | (runs automatically) | @@ -48,6 +48,10 @@ Commands for session analysis, usage tracking, and system monitoring. ### ccms Usage +:::caution[Currently Disabled] +The `ccms` feature is currently commented out in `devcontainer.json`. A replacement tool is pending. The documentation below is preserved for reference. +::: + `ccms` is the most feature-rich analysis command. Key flags: ```bash @@ -195,7 +199,7 @@ These additional commands are available in the container environment: | `jq` | JSON processing and filtering | | `tmux` | Terminal multiplexer for Agent Teams split-pane sessions | | `bun` | Fast JavaScript runtime and package manager | -| `cargo` | Rust package manager (used by ccms) | +| `cargo` | Rust package manager _(opt-in — Rust toolchain is commented out by default)_ | | `uv` | Fast Python package installer | ## Command Sources @@ -206,9 +210,9 @@ Commands come from different sources in the CodeForge setup: |--------|----------|-------------| | Shell aliases | `cc`, `claude`, `ccw`, `ccraw`, `cc-orc`, `check-setup` | `setup-aliases.sh` writes to `.bashrc`/`.zshrc` | | Shell functions | `cc-tools` | `setup-aliases.sh` writes to `.bashrc`/`.zshrc` | -| DevContainer features | `ccms`, `ccusage`, `ccburn`, `ruff`, `biome`, `sg`, `dbr`, etc. | `install.sh` in each feature directory | +| DevContainer features | `ccusage`, `ccburn`, `ruff`, `biome`, `sg`, `dbr`, etc. | `install.sh` in each feature directory | | Slash commands | `/spec-new`, `/ticket:new`, `/ship`, `/pr:review`, `/ps`, etc. | Skill SKILL.md files in plugin directories | -| External features | `gh`, `docker`, `node`, `bun`, `cargo` | Installed via `devcontainer.json` features | +| External features | `gh`, `docker`, `node`, `bun` | Installed via `devcontainer.json` features | :::tip[Listing All Tools] Run `cc-tools` to see every installed tool and its version. This is the quickest way to verify what is available in your container. diff --git a/docs/src/content/docs/reference/environment.md b/docs/src/content/docs/reference/environment.md index 0f82aa2..e76a662 100644 --- a/docs/src/content/docs/reference/environment.md +++ b/docs/src/content/docs/reference/environment.md @@ -82,8 +82,8 @@ Variables that configure individual tools within the container. | Variable | Tool | Description | |----------|------|-------------| -| `CCMS_PROJECT` | ccms | Default project scope for session search | -| `CCMS_FORMAT` | ccms | Default output format (`text`, `json`) | +| `CCMS_PROJECT` | ccms | Default project scope for session search _(only when ccms is enabled)_ | +| `CCMS_FORMAT` | ccms | Default output format (`text`, `json`) _(only when ccms is enabled)_ | | `RUFF_CONFIG` | ruff | Path to ruff configuration file | | `BIOME_CONFIG_PATH` | biome | Path to biome configuration file | diff --git a/docs/src/content/docs/reference/index.md b/docs/src/content/docs/reference/index.md index 3eb1858..009d0fc 100644 --- a/docs/src/content/docs/reference/index.md +++ b/docs/src/content/docs/reference/index.md @@ -25,7 +25,7 @@ This section is a lookup resource for CodeForge internals. Use it when you need | `cc` | Start Claude Code with full CodeForge configuration | | `ccw` | Start Claude Code in writing mode | | `ccraw` | Start vanilla Claude Code (no plugins or custom prompt) | -| `ccms "query"` | Search session history | +| `ccms "query"` | Search session history _(currently disabled — replacement pending)_ | | `check-setup` | Verify your installation is healthy | ### Key Paths From 29007f55fe0b833368aa1b9f5c7a8d811b4deea0 Mon Sep 17 00:00:00 2001 From: AnExiledDev Date: Fri, 27 Feb 2026 03:30:02 +0000 Subject: [PATCH 2/4] Address CodeRabbit review feedback - Use POSIX-compatible case/esac in /etc/profile.d/bun.sh (was bash-only [[]]) - Make changelog Bun entry user-focused (result over mechanism) - Comment out Rust in docs configuration.md example to match devcontainer.json --- .devcontainer/CHANGELOG.md | 2 +- .devcontainer/scripts/setup.sh | 7 ++++--- docs/src/content/docs/customization/configuration.md | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.devcontainer/CHANGELOG.md b/.devcontainer/CHANGELOG.md index 3f6c786..3651301 100644 --- a/.devcontainer/CHANGELOG.md +++ b/.devcontainer/CHANGELOG.md @@ -30,7 +30,7 @@ ### Fixed #### Bun -- Bun PATH not available in non-interactive shells — added `/etc/profile.d/bun.sh` via postStart hook +- Bun PATH not available in non-interactive shells — Bun is now accessible in all shell contexts #### Session Context Plugin - **Commit reminder** no longer blocks Claude from stopping — switched from `decision: "block"` to advisory `systemMessage` wrapped in `` tags diff --git a/.devcontainer/scripts/setup.sh b/.devcontainer/scripts/setup.sh index c35e146..113568a 100755 --- a/.devcontainer/scripts/setup.sh +++ b/.devcontainer/scripts/setup.sh @@ -166,9 +166,10 @@ fi if [ -d "/home/vscode/.bun/bin" ] && [ ! -f /etc/profile.d/bun.sh ]; then sudo tee /etc/profile.d/bun.sh > /dev/null <<'BUNEOF' export BUN_INSTALL="/home/vscode/.bun" -if [[ "${PATH}" != *"${BUN_INSTALL}/bin"* ]]; then - export PATH="${BUN_INSTALL}/bin:${PATH}" -fi +case ":${PATH}:" in + *:"${BUN_INSTALL}/bin":*) ;; + *) export PATH="${BUN_INSTALL}/bin:${PATH}" ;; +esac BUNEOF sudo chmod +x /etc/profile.d/bun.sh fi diff --git a/docs/src/content/docs/customization/configuration.md b/docs/src/content/docs/customization/configuration.md index 48c4406..245cd00 100644 --- a/docs/src/content/docs/customization/configuration.md +++ b/docs/src/content/docs/customization/configuration.md @@ -184,7 +184,7 @@ DevContainer features install runtimes and tools. CodeForge pins external featur { "features": { "ghcr.io/devcontainers/features/node:1.7.1": { "version": "lts" }, - "ghcr.io/devcontainers/features/rust:1.5.0": { "version": "latest" }, + // "ghcr.io/devcontainers/features/rust:1.5.0": { "version": "latest" }, // Opt-in "ghcr.io/anthropics/devcontainer-features/claude-code:1.0.5": {}, "./features/ruff": { "version": "latest" }, // "./features/ccms": {} // Currently disabled — replacement pending From 6c072632b3238bdc9201dc90877b5494ae7af875 Mon Sep 17 00:00:00 2001 From: AnExiledDev Date: Fri, 27 Feb 2026 03:34:23 +0000 Subject: [PATCH 3/4] Use $HOME instead of hardcoded /home/vscode in Bun PATH fix More portable if remoteUser changes. The single-quoted heredoc preserves $HOME for expansion at source-time, which is the standard pattern for /etc/profile.d/ scripts. --- .devcontainer/scripts/setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/scripts/setup.sh b/.devcontainer/scripts/setup.sh index 113568a..5f33050 100755 --- a/.devcontainer/scripts/setup.sh +++ b/.devcontainer/scripts/setup.sh @@ -163,9 +163,9 @@ if [ "$SETUP_POSTSTART" = "true" ]; then fi # Fix Bun PATH — external feature only adds to ~/.bashrc (misses non-interactive shells) -if [ -d "/home/vscode/.bun/bin" ] && [ ! -f /etc/profile.d/bun.sh ]; then +if [ -d "$HOME/.bun/bin" ] && [ ! -f /etc/profile.d/bun.sh ]; then sudo tee /etc/profile.d/bun.sh > /dev/null <<'BUNEOF' -export BUN_INSTALL="/home/vscode/.bun" +export BUN_INSTALL="$HOME/.bun" case ":${PATH}:" in *:"${BUN_INSTALL}/bin":*) ;; *) export PATH="${BUN_INSTALL}/bin:${PATH}" ;; From 1bc3bd6feb97ad0b13b57c6a57d11689597bcd23 Mon Sep 17 00:00:00 2001 From: AnExiledDev Date: Fri, 27 Feb 2026 03:39:22 +0000 Subject: [PATCH 4/4] Fix Bun availability in non-login non-interactive shells MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /etc/profile.d/ is only sourced by login shells — bash -c, container exec, and CI jobs skip it. Add symlinks in /usr/local/bin for bun/bunx to cover all execution contexts. Also make the profile hook content-idempotent so stale content is corrected on upgrade. --- .devcontainer/scripts/setup.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.devcontainer/scripts/setup.sh b/.devcontainer/scripts/setup.sh index 5f33050..3ad7e5b 100755 --- a/.devcontainer/scripts/setup.sh +++ b/.devcontainer/scripts/setup.sh @@ -163,15 +163,24 @@ if [ "$SETUP_POSTSTART" = "true" ]; then fi # Fix Bun PATH — external feature only adds to ~/.bashrc (misses non-interactive shells) -if [ -d "$HOME/.bun/bin" ] && [ ! -f /etc/profile.d/bun.sh ]; then - sudo tee /etc/profile.d/bun.sh > /dev/null <<'BUNEOF' +if [ -d "$HOME/.bun/bin" ]; then + # Symlink bun binaries into /usr/local/bin for non-login, non-interactive shells (bash -c, exec) + for bin in bun bunx; do + if [ -x "$HOME/.bun/bin/$bin" ] && [ ! -e "/usr/local/bin/$bin" ]; then + sudo ln -sf "$HOME/.bun/bin/$bin" "/usr/local/bin/$bin" + fi + done + # Profile script sets BUN_INSTALL for login/interactive shells (content-idempotent) + if [ ! -f /etc/profile.d/bun.sh ] || ! grep -q 'BUN_INSTALL="\$HOME/.bun"' /etc/profile.d/bun.sh; then + sudo tee /etc/profile.d/bun.sh > /dev/null <<'BUNEOF' export BUN_INSTALL="$HOME/.bun" case ":${PATH}:" in *:"${BUN_INSTALL}/bin":*) ;; *) export PATH="${BUN_INSTALL}/bin:${PATH}" ;; esac BUNEOF - sudo chmod +x /etc/profile.d/bun.sh + sudo chmod 0644 /etc/profile.d/bun.sh + fi fi echo ""