Skip to content

Commit 6fe72f4

Browse files
authored
Pre-release cleanup: version sync, changelog reorg, docs, config quick wins (#41)
- Bump package.json to 2.0.0 (was still 1.14.2) - Fold all unreleased changelog content into v2.0.0 with area-first headings - Document --reset flag in README.md and installation guide - Streamline CLAUDE.md from 205 to 77 lines (remove discoverable reference material) - Add SETUP_TERMINAL, SETUP_POSTSTART, PROJECT_EXCLUDE_DIRS, OFFICIAL_PLUGINS to .env.example - Make project exclusion dirs and official plugins list configurable via .env Co-authored-by: AnExiledDev <AnExiledDev@users.noreply.github.com>
1 parent 5df63d7 commit 6fe72f4

File tree

8 files changed

+181
-424
lines changed

8 files changed

+181
-424
lines changed

.devcontainer/.env.example

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,20 @@ SETUP_PLUGINS=true
2222
SETUP_UPDATE_CLAUDE=true
2323

2424
# Setup: auto-detect projects for VS Code Project Manager extension
25+
# Setup: configure VS Code Shift+Enter keybinding for Claude Code terminal
26+
SETUP_TERMINAL=true
27+
28+
# Setup: run post-start hooks from /usr/local/devcontainer-poststart.d/
29+
SETUP_POSTSTART=true
30+
2531
SETUP_PROJECTS=true
2632

2733
# Plugin blacklist: comma-separated plugin names to skip during installation
2834
# Example: PLUGIN_BLACKLIST="ticket-workflow,auto-linter"
2935
PLUGIN_BLACKLIST=""
36+
37+
# Project detection: directories to exclude from auto-detection (space-separated)
38+
# PROJECT_EXCLUDE_DIRS=".claude .gh .tmp .devcontainer .config node_modules .git"
39+
40+
# Official plugins: space-separated list installed from Anthropic/third-party marketplaces
41+
# OFFICIAL_PLUGINS="frontend-design@claude-plugins-official svelte@sveltejs/mcp"

.devcontainer/CHANGELOG.md

Lines changed: 151 additions & 283 deletions
Large diffs are not rendered by default.

.devcontainer/CLAUDE.md

Lines changed: 3 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,6 @@
22

33
CodeForge devcontainer for AI-assisted development with Claude Code.
44

5-
## Directory Structure
6-
7-
```
8-
.devcontainer/
9-
├── devcontainer.json # Container definition
10-
├── .env # Setup flags (SETUP_CONFIG, SETUP_ALIASES, etc.)
11-
├── features/ # Custom devcontainer features
12-
├── plugins/devs-marketplace/ # Local plugin marketplace
13-
└── scripts/ # Setup scripts (run via postStartCommand)
14-
15-
.codeforge/
16-
├── file-manifest.json # Declarative config file deployment
17-
├── config/ # Source files deployed on start via file-manifest
18-
│ ├── settings.json # Model, permissions, plugins, env vars
19-
│ ├── keybindings.json # Keyboard shortcuts
20-
│ ├── main-system-prompt.md
21-
│ ├── orchestrator-system-prompt.md
22-
│ ├── writing-system-prompt.md
23-
│ ├── ccstatusline-settings.json # Status bar widget layout
24-
│ └── rules/ # Deployed to .claude/rules/
25-
├── scripts/ # Terminal connection scripts
26-
│ ├── connect-external-terminal.sh
27-
│ └── connect-external-terminal.ps1
28-
└── .codeforge-preserve # Lists additional files to preserve during updates
29-
```
30-
315
## Key Configuration
326

337
| File | Purpose |
@@ -42,50 +16,21 @@ CodeForge devcontainer for AI-assisted development with Claude Code.
4216

4317
Config files deploy via `.codeforge/file-manifest.json` on every container start. Most deploy to `~/.claude/`; ccstatusline config deploys to `~/.config/ccstatusline/`. Each entry supports `overwrite`: `"if-changed"` (default, sha256), `"always"`, or `"never"`. Supported variables: `${CLAUDE_CONFIG_DIR}`, `${WORKSPACE_ROOT}`, `${HOME}`.
4418

45-
## Worktrees
46-
47-
Git worktrees allow checking out multiple branches simultaneously, each in its own directory.
48-
49-
**Native (recommended for Claude Code sessions):**
50-
- **In-session:** `EnterWorktree` tool — creates worktree at `<repo>/.claude/worktrees/<name>/`, branch `worktree-<name>`, auto-cleaned if no changes
51-
- **New session:** `claude --worktree <name>` — starts Claude in its own worktree; combine with `--tmux` for background work
52-
53-
**Manual (legacy convention):**
54-
```bash
55-
mkdir -p /workspaces/projects/.worktrees
56-
git worktree add /workspaces/projects/.worktrees/<branch-name> -b <branch>
57-
```
58-
59-
**Environment files:** Place a `.worktreeinclude` file at the project root listing `.gitignore`-excluded files to copy into new worktrees (e.g., `.env`). Uses `.gitignore` pattern syntax; only files matching both `.worktreeinclude` and `.gitignore` are copied.
60-
61-
**Management:**
62-
63-
| Command | Purpose |
64-
|---------|---------|
65-
| `git worktree list` | Show all active worktrees |
66-
| `git worktree remove <path>` | Remove a worktree (destructive — confirm first) |
67-
| `git worktree prune` | Clean up stale references (destructive — confirm first) |
68-
69-
**Path conventions:**
70-
- **Native:** `<repo>/.claude/worktrees/<name>/` — used by `--worktree` flag and `EnterWorktree`
71-
- **Legacy:** `.worktrees/` as sibling to the main repo — used for manual `git worktree add` and Project Manager integration
72-
7319
## Commands
7420

7521
| Command | Purpose |
7622
|---------|---------|
7723
| `cc` / `claude` | Run Claude Code with auto-configuration |
7824
| `codeforge config apply` | Deploy config files to `~/.claude/` (same as container start) |
79-
| `codeforge` | CLI for CodeForge management commands |
8025
| `ccraw` | Vanilla Claude Code (bypasses config) |
8126
| `ccw` | Claude Code with writing system prompt |
8227
| `cc-orc` | Claude Code in orchestrator mode (delegation-first) |
83-
| ~~`ccms`~~ | _(commented out — replacement pending)_ |
28+
| `ccms` | Session history search _(disabled — requires Rust toolchain; uncomment in devcontainer.json to enable)_ |
8429
| `ccusage` / `ccburn` | Token usage analysis / burn rate |
8530
| `agent-browser` | Headless Chromium (Playwright-based) |
8631
| `check-setup` | Verify CodeForge setup health |
8732
| `claude-dashboard` | Session analytics dashboard (port 7847) |
88-
| `dbr` | Dynamic port forwarding (devcontainer-bridge) |
33+
| `dbr` | Dynamic port forwarding ([devcontainer-bridge](https://github.com/bradleybeddoes/devcontainer-bridge)) |
8934
| `cc-tools` | List all installed tools with versions |
9035

9136
## Plugins
@@ -115,19 +60,6 @@ Rules in `.codeforge/config/rules/` deploy to `.claude/rules/` on every containe
11560

11661
**Adding rules:** Create `.md` in `.codeforge/config/rules/`, add a manifest entry in `.codeforge/file-manifest.json`.
11762

118-
## Environment
119-
120-
| Variable | Value |
121-
|----------|-------|
122-
| `CLAUDE_CONFIG_DIR` | `/home/vscode/.claude` |
123-
| `CLAUDE_AUTH_TOKEN` | Long-lived token from `claude setup-token` (optional, via `.secrets` or Codespaces secrets) |
124-
| `ANTHROPIC_MODEL` | `claude-opus-4-6` |
125-
| `WORKSPACE_ROOT` | `/workspaces` |
126-
| `TERM` | `${localEnv:TERM:xterm-256color}` (via `remoteEnv` — forwards host TERM, falls back to 256-color) |
127-
| `COLORTERM` | `truecolor` (via `remoteEnv` — enables 24-bit color support) |
128-
129-
All experimental feature flags are in `settings.json` under `env`. Setup steps controlled by boolean flags in `.env`.
130-
13163
## Authentication & Persistence
13264

13365
The `~/.claude/` directory is backed by a Docker named volume (`codeforge-claude-config-${devcontainerId}`), persisting config, credentials, and session data across container rebuilds. Each devcontainer instance gets an isolated volume.
@@ -142,63 +74,4 @@ The `~/.claude/` directory is backed by a Docker named volume (`codeforge-claude
14274
4. **Add features**: Add to `"features"` in `devcontainer.json`
14375
5. **Disable features**: Set `"version": "none"` in the feature's config
14476
6. **Disable setup steps**: Set flags to `false` in `.env`
145-
7. **Customize status bar**: Edit `.codeforge/config/ccstatusline-settings.json` (see below)
146-
147-
## Status Bar Widgets
148-
149-
The status bar is configured in `.codeforge/config/ccstatusline-settings.json` (deploys to `~/.config/ccstatusline/settings.json`). Each widget is a JSON object in a line array.
150-
151-
### Widget Properties
152-
153-
| Property | Purpose |
154-
|----------|---------|
155-
| `id` | Unique identifier (UUID or descriptive string) |
156-
| `type` | Widget type (see below) |
157-
| `backgroundColor` | Background color: `bgBlue`, `bgMagenta`, `bgYellow`, `bgGreen`, `bgRed`, etc. |
158-
| `color` | Text color: `brightWhite`, `black`, `cyan`, `yellow`, etc. |
159-
| `rawValue` | `true` to strip type-specific prefixes (e.g., removes "Model:" from model widget) |
160-
| `bold` | `true` for bold text |
161-
| `merge` | `"no-padding"` fuses this widget to the next (no separator/space between them) |
162-
| `customText` | Static text content (only for `custom-text` type) |
163-
164-
### Token Widgets
165-
166-
Each token metric uses a distinct background color for at-a-glance identification:
167-
168-
| Type | Color | Label |
169-
|------|-------|-------|
170-
| `tokens-input` | Blue (`bgBlue`) | **In** |
171-
| `tokens-output` | Magenta (`bgMagenta`) | **Ou** |
172-
| `tokens-cached` | Yellow (`bgYellow`) | **Ca** |
173-
| `tokens-total` | Green (`bgGreen`) | **Tt** |
174-
175-
Labels are `custom-text` widgets with `merge: "no-padding"` so they fuse visually to their data widget:
176-
177-
```json
178-
{ "id": "lbl-tokens-input", "type": "custom-text", "customText": "In",
179-
"backgroundColor": "bgBlue", "color": "brightWhite", "bold": true, "merge": "no-padding" },
180-
{ "id": "5", "type": "tokens-input",
181-
"backgroundColor": "bgBlue", "color": "brightWhite", "rawValue": true }
182-
```
183-
184-
### Other Widget Types
185-
186-
`model`, `context-length`, `context-percentage-usable`, `git-branch`, `git-changes`, `git-worktree`, `session-clock`, `session-cost`, `block-timer`, `version`, `custom-command`
187-
188-
## Features
189-
190-
Custom features in `./features/` follow the [devcontainer feature spec](https://containers.dev/implementors/features/). Every local feature supports `"version": "none"` to skip installation. Claude Code is installed as a native binary via `./features/claude-code-native` (uses Anthropic's official installer at `https://claude.ai/install.sh`).
191-
192-
## Port Forwarding
193-
194-
Three mechanisms handle port access depending on your client:
195-
196-
| Mechanism | Client | Discovery |
197-
|-----------|--------|-----------|
198-
| VS Code auto-detect | VS Code only | Dynamic — all ports auto-forwarded with notification |
199-
| devcontainer-bridge (`dbr`) | Any terminal client | Dynamic — polls `/proc/net/tcp` |
200-
| SSH tunneling | Any SSH client | Manual — `ssh -L localPort:localhost:remotePort` |
201-
202-
VS Code auto-detects all ports opened inside the container (configured via `portsAttributes` in `devcontainer.json`). Outside VS Code, `dbr` provides dynamic port discovery via a reverse connection model (container→host). The container daemon auto-starts and is inert without the host daemon (`dbr host-daemon`). Both mechanisms coexist. See [devcontainer-bridge](https://github.com/bradleybeddoes/devcontainer-bridge).
203-
204-
For full setup instructions, see the [Port Forwarding reference](https://codeforge.core-directive.com/reference/port-forwarding/) in the docs.
77+
7. **Customize status bar**: Edit `.codeforge/config/ccstatusline-settings.json`

.devcontainer/scripts/setup-plugins.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ fi
2222
echo "[setup-plugins] Installing plugins..."
2323

2424
# --- Official Anthropic Plugins ---
25-
OFFICIAL_PLUGINS=(
26-
"frontend-design@claude-plugins-official"
27-
"svelte@sveltejs/mcp"
28-
)
25+
DEFAULT_OFFICIAL_PLUGINS="frontend-design@claude-plugins-official svelte@sveltejs/mcp"
26+
IFS=' ' read -ra OFFICIAL_PLUGINS <<< "${OFFICIAL_PLUGINS:-$DEFAULT_OFFICIAL_PLUGINS}"
2927

3028
for plugin in "${OFFICIAL_PLUGINS[@]}"; do
3129
echo "[setup-plugins] Installing $plugin..."

.devcontainer/scripts/setup-projects.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ PID_FILE="/tmp/project-watcher.pid"
1414
LOG_PREFIX="[setup-projects]"
1515

1616
# Directories to exclude from project detection (hidden/config dirs)
17-
EXCLUDED_DIRS=".claude .gh .tmp .devcontainer .config node_modules .git"
17+
EXCLUDED_DIRS="${PROJECT_EXCLUDE_DIRS:-.claude .gh .tmp .devcontainer .config node_modules .git}"
1818

1919
# --- Helpers ---
2020

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ This copies the `.devcontainer/` directory to your project. Then open in VS Code
3030
### Options
3131

3232
```bash
33-
npx codeforge-dev --force # Overwrite existing .devcontainer directory
33+
npx codeforge-dev --force # Smart update (preserves your customizations)
3434
npx codeforge-dev -f # Short form
35+
npx codeforge-dev --reset # Fresh install (wipes .devcontainer, keeps .codeforge)
3536
```
3637

3738
### Alternative Install Methods

docs/src/content/docs/getting-started/installation.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@ npx codeforge-dev
1818
This creates a `.devcontainer/` directory containing the full CodeForge configuration — all plugins, features, agents, skills, system prompts, and settings. Your existing project files are not modified.
1919

2020
:::tip[Already have a .devcontainer?]
21-
If your project already has a `.devcontainer/` directory, the installer will warn you and exit. Use the `--force` flag to perform a smart sync that preserves your user configuration:
21+
If your project already has a `.devcontainer/` directory, the installer will warn you and exit. Two flags handle this:
22+
2223
```bash
23-
npx codeforge-dev --force
24+
npx codeforge-dev --force # Smart update (preserves your customizations)
25+
npx codeforge-dev --reset # Fresh install (wipes .devcontainer, keeps .codeforge)
2426
```
25-
The `--force` flag uses an intelligent sync — it preserves files you've customized (writing `.default` copies of new defaults in `.codeforge/` for review) rather than blindly overwriting everything.
27+
28+
**`--force`** uses an intelligent sync — it preserves files you've customized (writing `.default` copies of new defaults in `.codeforge/` for review) rather than blindly overwriting everything. Use this for routine updates.
29+
30+
**`--reset`** deletes `.devcontainer/` entirely and copies clean defaults from the package. Your `.codeforge/` user configuration is always preserved. Use this when `.devcontainer/` is corrupted or you want a clean slate.
2631
:::
2732

2833
### Alternative Installation Methods
@@ -33,7 +38,7 @@ npm install -g codeforge-dev
3338
codeforge-dev
3439

3540
# Pin a specific version
36-
npx codeforge-dev@1.14.0
41+
npx codeforge-dev@2.0.0
3742
```
3843

3944
### What the Installer Creates

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codeforge-dev",
3-
"version": "1.14.2",
3+
"version": "2.0.0",
44
"description": "Complete development container that sets up Claude Code with modular devcontainer features, modern dev tools, and persistent configurations. Drop it into any project and get a production-ready AI development environment in minutes.",
55
"main": "setup.js",
66
"bin": {

0 commit comments

Comments
 (0)