Skip to content

Commit bd688a5

Browse files
committed
Add Claude Code Router + Codex CLI features, extract dashboard, restructure docs
Container: - Add claude-code-router feature for LLM provider routing (DeepSeek, Gemini, OpenRouter) - Add codex-cli feature for OpenAI Codex terminal agent - Add defaults/ directory with factory config templates - Update ccusage feature with Codex support - Update auth scripts for new provider API keys Dashboard: - Extract dashboard/ to separate CodeDirective repository - Add dashboard/ to .gitignore (deprecated in monorepo) Documentation: - Restructure docs: getting-started → start-here, features/customization → use/customize - Move plugins/ under extend/ section - Add new reference pages: agents, skills, cli-tools, environment-variables - Consolidate architecture and troubleshooting in reference/ Housekeeping: - Gitignore temp directories and screenshots
1 parent 489f08c commit bd688a5

File tree

226 files changed

+4435
-30701
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+4435
-30701
lines changed

.gitignore

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ coverage/
2020
*.swp
2121
*.swo
2222
*~
23+
TEMP/
24+
temp/
25+
tmp/
26+
27+
# Screenshots
28+
*.png
2329

2430
# IDE
2531
.vscode/
@@ -60,10 +66,8 @@ cli/.pytest_cache/
6066
cli/.ruff_cache/
6167
.codeforge/data/
6268

63-
# Dashboard-specific
64-
dashboard/.svelte-kit/
65-
dashboard/build/
66-
dashboard/mockups/
69+
# Dashboard (deprecated — migrating to CodeDirective, a separate repo)
70+
dashboard/
6771

6872
# Docs-specific
6973
docs/.astro/

CLAUDE.md

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CodeForge Monorepo
22

3-
This repository contains four packages. Each package manages its own dependencies independently.
3+
This repository contains three packages. Each package manages its own dependencies independently.
44

55
## Packages
66

@@ -9,7 +9,11 @@ This repository contains four packages. Each package manages its own dependencie
99
| `container/` | Node.js | npm |
1010
| `cli/` | Bun | bun |
1111
| `docs/` | Node.js | npm |
12-
| `dashboard/` | Bun | npm (frontend) / bun (server) |
12+
13+
> **Dashboard → CodeDirective**: The `dashboard/` package is deprecated and being
14+
> extracted to its own repository as **CodeDirective** — an independent app. It is
15+
> gitignored and will be removed from this repo. Do not add dashboard dependencies
16+
> or make cross-package changes involving dashboard code.
1317
1418
## Development Rules
1519

@@ -27,8 +31,6 @@ Each package has its own `CLAUDE.md` with package-specific development rules:
2731
- [`container/CLAUDE.md`](container/CLAUDE.md) — changelog, documentation, and configuration rules for the devcontainer package
2832
- `cli/` — Bun/TypeScript CLI; run `bun test` for tests
2933
- `docs/` — Astro/Starlight site; run `npm run build` to verify
30-
- [`dashboard/CLAUDE.md`](dashboard/CLAUDE.md) | [`dashboard/README.md`](dashboard/README.md) — Svelte 5 SPA + Bun backend for session analytics
31-
3234
### Cross-Package Changes
3335

3436
When a change spans multiple packages, make the changes in a single branch and PR.
@@ -41,21 +43,3 @@ Run tests for each affected package before committing:
4143
- **Container**: `cd container && npm test`
4244
- **CLI**: `cd cli && bun test`
4345
- **Docs**: `cd docs && npm run build`
44-
- **Dashboard**: `cd dashboard && bun test`
45-
46-
### Dashboard vs CLI
47-
48-
The `dashboard/` and `cli/` packages serve different audiences:
49-
50-
- **CLI** (`codeforge` command) — terminal-first, text/JSON output, scriptable,
51-
runs inside or outside the container. Features: session search, task search/list/show,
52-
plan search, plugin management, index/config commands.
53-
- **Dashboard** (Svelte 5 SPA) — visual analytics, charts, expandable detail views,
54-
real-time SSE updates. Features: session browsing with conversation replay,
55-
task/plan/agent/memory views, project analytics, cost tracking.
56-
57-
When adding a new data view:
58-
- If it's browsable/visual (tables, charts, detail drill-down) → dashboard
59-
- If it's scriptable/automatable (piped output, filters, JSON) → CLI
60-
- If it's both → implement in both, but don't import CLI as a dashboard dependency.
61-
Fork patterns instead.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"mcpServers": {},
3+
"providers": {
4+
"anthropic": {
5+
"api_key": "$ANTHROPIC_API_KEY",
6+
"base_url": "https://api.anthropic.com"
7+
},
8+
"deepseek": {
9+
"api_key": "$DEEPSEEK_API_KEY",
10+
"base_url": "https://api.deepseek.com"
11+
},
12+
"gemini": {
13+
"api_key": "$GEMINI_API_KEY",
14+
"base_url": "https://generativelanguage.googleapis.com"
15+
},
16+
"openrouter": {
17+
"api_key": "$OPENROUTER_API_KEY",
18+
"base_url": "https://openrouter.ai/api"
19+
}
20+
},
21+
"router": {
22+
"default": "anthropic/claude-sonnet-4-20250514"
23+
}
24+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Codex CLI Configuration
2+
# This file is deployed to ~/.codex/config.toml on container start.
3+
# See https://github.com/openai/codex for full documentation.
4+
5+
# Credential storage backend: "file" | "keyring" | "auto" | "ephemeral"
6+
# "file" stores credentials in ~/.codex/auth.json (recommended for containers)
7+
cli_auth_credentials_store = "file"
8+
9+
# Sandbox mode: "read-only" | "workspace-write" | "danger-full-access"
10+
# sandbox_mode = "workspace-write"
11+
12+
# Default model
13+
# model = "codex-mini-latest"
14+
15+
# Web search: "disabled" | "cached" | "live"
16+
# web_search = "live"
17+
18+
# Custom model providers (uncomment and configure as needed)
19+
# [model_providers.custom]
20+
# name = "Custom Provider"
21+
# base_url = "https://api.example.com"
22+
# env_key = "CUSTOM_API_KEY"
23+
# wire_api = "responses"

container/.codeforge/config/settings.json

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,23 @@
44
"autoCompact": true,
55
"alwaysThinkingEnabled": true,
66
"env": {
7-
"ANTHROPIC_MODEL": "claude-opus-4-6[1m]",
8-
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-6[1m]",
7+
"ANTHROPIC_MODEL": "claude-opus-4-5",
8+
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-5",
99
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
1010
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001",
1111
"BASH_DEFAULT_TIMEOUT_MS": "120000",
1212
"BASH_MAX_TIMEOUT_MS": "300000",
1313
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": "64000",
1414
"MAX_MCP_OUTPUT_TOKENS": "10000",
1515
"MAX_THINKING_TOKENS": "63999",
16+
"CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING": "1",
1617
"MCP_TIMEOUT": "120000",
1718
"MCP_TOOL_TIMEOUT": "30000",
1819
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "90",
19-
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "500000",
2020
"FORCE_AUTOUPDATE_PLUGINS": "1",
2121

2222
"ENABLE_TOOL_SEARCH": "auto:5",
2323
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
24-
"CLAUDE_CODE_EFFORT_LEVEL": "high",
2524
"CLAUDE_CODE_ENABLE_TASKS": "true",
2625
"CLAUDE_CODE_DISABLE_AUTO_MEMORY": "0",
2726
"ENABLE_CLAUDE_CODE_SM_COMPACT": "1",
@@ -30,6 +29,9 @@
3029
"CLAUDE_CODE_PLAN_V2_AGENT_COUNT": "5",
3130
"CLAUDE_CODE_PLAN_MODE_REQUIRED": "true",
3231
"CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR": "true",
32+
"CLAUDE_AUTO_BACKGROUND_TASKS": "1",
33+
"CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION": "false",
34+
"CLAUDE_CODE_NO_FLICKER": "1",
3335

3436
"CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY": "10",
3537
"CLAUDE_CODE_MAX_RETRIES": "1",
@@ -38,16 +40,55 @@
3840
"DISABLE_AUTOUPDATER": "1"
3941
},
4042
"teammateMode": "auto",
41-
"effortLevel": "high",
43+
"effortLevel": "max",
44+
"showClearContextOnPlanAccept": true,
45+
"showThinkingSummaries": true,
4246
"includeCoAuthoredBy": false,
47+
"spinnerVerbs": {
48+
"mode": "replace",
49+
"verbs": [
50+
"Butchering",
51+
"Mangling",
52+
"Wrecking",
53+
"Botching",
54+
"Misreading",
55+
"Derailing",
56+
"Overcomplicating",
57+
"Hallucinating",
58+
"Breaking",
59+
"Fumbling",
60+
"Sabotaging",
61+
"Shredding",
62+
"Confusing",
63+
"Corrupting",
64+
"Ruining",
65+
"Winging",
66+
"Guessing",
67+
"Misinterpreting",
68+
"Overengineering",
69+
"Improvising Poorly",
70+
"Making It Worse",
71+
"Massacring",
72+
"Mutilating",
73+
"Annihilating",
74+
"Trashing",
75+
"Destroying",
76+
"Misfiring",
77+
"Ignoring",
78+
"Unthinking",
79+
"Wondering",
80+
"Draining",
81+
"Exhausting",
82+
"Petering Out"
83+
]
84+
},
4385
"permissions": {
4486
"allow": ["Read(/workspaces/*)", "WebFetch(domain:*)"],
4587
"deny": [],
4688
"ask": [],
4789
"defaultMode": "plan",
4890
"additionalDirectories": []
4991
},
50-
"model": "opus[1m]",
5192
"enabledMcpjsonServers": [],
5293
"disabledMcpjsonServers": [],
5394
"hooks": {},

container/.codeforge/file-manifest.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
{
2121
"src": "config/rules/spec-workflow.md",
2222
"dest": "${CLAUDE_CONFIG_DIR}/rules",
23-
"enabled": true,
23+
"enabled": false,
2424
"overwrite": "if-changed"
2525
},
2626
{
@@ -66,5 +66,19 @@
6666
"dest": "${CLAUDE_CONFIG_DIR}",
6767
"enabled": false,
6868
"overwrite": "never"
69+
},
70+
{
71+
"src": "config/codex-config.toml",
72+
"dest": "${HOME}/.codex",
73+
"destFilename": "config.toml",
74+
"enabled": true,
75+
"overwrite": "if-changed"
76+
},
77+
{
78+
"src": "config/claude-code-router.json",
79+
"dest": "${HOME}/.claude-code-router",
80+
"destFilename": "config.json",
81+
"enabled": true,
82+
"overwrite": "if-changed"
6983
}
7084
]

container/.devcontainer/.secrets.example

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,13 @@ NPM_TOKEN=
1313

1414
# Claude long-lived auth token (from 'claude setup-token')
1515
CLAUDE_AUTH_TOKEN=
16+
17+
# OpenAI API key for Codex CLI
18+
OPENAI_API_KEY=
19+
20+
# Claude Code Router — provider API keys (set the ones you use)
21+
# See https://github.com/musistudio/claude-code-router for provider docs
22+
ANTHROPIC_API_KEY=
23+
DEEPSEEK_API_KEY=
24+
GEMINI_API_KEY=
25+
OPENROUTER_API_KEY=

container/.devcontainer/CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# CodeForge Devcontainer Changelog
22

3+
## v2.2.0 — 2026-04-11
4+
5+
### Claude Code Router
6+
7+
- **New feature: `claude-code-router`** — installs claude-code-router proxy daemon for routing Claude Code API calls to alternate LLM providers (DeepSeek, Gemini, OpenRouter, Anthropic). Default-on with autostart. Supports version pinning (`latest`, semver, or `none` to disable).
8+
- **Router configuration** — user-editable `claude-code-router.json` in `.codeforge/config/` deploys to `~/.claude-code-router/config.json` via file manifest. Uses `$ENV_VAR` interpolation for API keys.
9+
- **Provider API keys**`ANTHROPIC_API_KEY`, `DEEPSEEK_API_KEY`, `GEMINI_API_KEY`, `OPENROUTER_API_KEY` support in `.secrets` file and Codespaces secrets.
10+
- **Daemon supervision** — poststart hook with restart-on-failure wrapper; health gate skips autostart if no provider keys configured.
11+
- **Quick redeploy**`ccr-apply` alias redeploys config and restarts daemon in one command.
12+
13+
### Codex CLI
14+
15+
- **New feature: `codex-cli`** — installs OpenAI Codex CLI terminal coding agent via npm. Supports version pinning (`latest`, semver, or `none` to disable). Enabled by default.
16+
- **Codex authentication**`OPENAI_API_KEY` support in `.secrets` file and Codespaces secrets. Auto-creates `~/.codex/auth.json` on container start. Browser-based ChatGPT OAuth also supported interactively.
17+
- **Codex config management** — user-editable `codex-config.toml` in `.codeforge/config/` deploys to `~/.codex/config.toml` via file manifest
18+
- **Codex persistence** — separate Docker named volume (`codeforge-codex-config-${devcontainerId}`) for `~/.codex/`, surviving container rebuilds
19+
- **ccusage Codex support**`ccusage-codex` alias installed alongside `ccusage` for Codex session token and cost tracking via `@ccusage/codex`
20+
- **Tool enumeration**`codex` and `ccusage-codex` added to `cc-tools` and `check-setup` output
21+
22+
### Dashboard
23+
24+
- **Dashboard extracted to separate repository** — the `dashboard/` package is deprecated and being moved to its own repo as **CodeDirective**. Dashboard is now gitignored in the monorepo. The devcontainer feature continues to install from the published npm package.
25+
26+
### Documentation
27+
28+
- **Complete docs restructure** — reorganized documentation site for clearer navigation:
29+
- `getting-started/``start-here/` (installation, first session, migration)
30+
- `features/` + `customization/``use/` + `customize/` (daily usage vs. configuration)
31+
- `plugins/``extend/plugins/` (extension points under a dedicated section)
32+
- New `reference/` section consolidates agents, skills, CLI tools, environment variables, and architecture
33+
- Added new reference pages: `agents.md`, `skills.md`, `cli-tools.md`, `environment-variables.md`, `whats-included.md`
34+
335
## v2.1.1 — 2026-03-27
436

537
### CLI

container/.devcontainer/CLAUDE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ CodeForge devcontainer for AI-assisted development with Claude Code.
1111
| `.codeforge/config/orchestrator-system-prompt.md` | Orchestrator mode prompt (delegation-first) |
1212
| `.codeforge/config/ccstatusline-settings.json` | Status bar widget layout (deployed to ~/.config/ccstatusline/) |
1313
| `.codeforge/config/disabled-hooks.json` | Disable individual plugin hooks by script name |
14+
| `.codeforge/config/claude-code-router.json` | LLM provider routing config (deployed to ~/.claude-code-router/) |
1415
| `.codeforge/file-manifest.json` | Controls which config files deploy and when |
1516
| `devcontainer.json` | Container definition: image, features, mounts |
1617
| `.env` | Boolean flags controlling setup steps |
@@ -26,8 +27,11 @@ Config files deploy via `.codeforge/file-manifest.json` on every container start
2627
| `ccraw` | Vanilla Claude Code (bypasses config) |
2728
| `ccw` | Claude Code with writing system prompt |
2829
| `cc-orc` | Claude Code in orchestrator mode (delegation-first) |
30+
| `codex` | OpenAI Codex CLI terminal coding agent |
2931
| `ccms` | Session history search _(disabled — requires Rust toolchain; uncomment in devcontainer.json to enable)_ |
3032
| `codeforge proxy` | Launch Claude Code through mitmproxy — inspect API traffic in browser (port 8081) |
33+
| `ccr start` / `ccr stop` | Claude Code Router daemon control |
34+
| `ccr-apply` | Redeploy router config + restart daemon |
3135
| `ccusage` / `ccburn` | Token usage analysis / burn rate |
3236
| `agent-browser` | Headless Chromium (Playwright-based) |
3337
| `check-setup` | Verify CodeForge setup health |
@@ -71,6 +75,10 @@ The `~/.claude/` directory is backed by a Docker named volume (`codeforge-claude
7175

7276
**Token authentication:** Set `CLAUDE_AUTH_TOKEN` in `.devcontainer/.secrets` (or as a Codespaces secret) with a long-lived token from `claude setup-token`. On container start, `setup-auth.sh` auto-creates `~/.claude/.credentials.json` with `600` permissions. If `.credentials.json` already exists, token injection is skipped (idempotent). Tokens must match `sk-ant-*` format.
7377

78+
Codex CLI credentials (`~/.codex/`) are backed by a separate Docker named volume (`codeforge-codex-config-${devcontainerId}`). Set `OPENAI_API_KEY` in `.devcontainer/.secrets` (or as a Codespaces secret) for automatic API key injection, or run `codex` interactively for browser-based ChatGPT OAuth.
79+
80+
**Claude Code Router:** Set provider API keys (`ANTHROPIC_API_KEY`, `DEEPSEEK_API_KEY`, `GEMINI_API_KEY`, `OPENROUTER_API_KEY`) in `.devcontainer/.secrets`. Keys are exported as env vars on container start and read at runtime by the router's `$ENV_VAR` interpolation in `~/.claude-code-router/config.json`. Edit routing rules in `.codeforge/config/claude-code-router.json` and run `ccr-apply` to redeploy.
81+
7482
## Modifying Behavior
7583

7684
1. **Change model**: Edit `.codeforge/config/settings.json``"model"` field

0 commit comments

Comments
 (0)