codeforge-dev 1.5.7 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/.devcontainer/.env +2 -1
  2. package/.devcontainer/CHANGELOG.md +55 -9
  3. package/.devcontainer/CLAUDE.md +65 -15
  4. package/.devcontainer/README.md +67 -6
  5. package/.devcontainer/config/keybindings.json +5 -0
  6. package/.devcontainer/config/main-system-prompt.md +63 -2
  7. package/.devcontainer/config/settings.json +25 -6
  8. package/.devcontainer/devcontainer.json +23 -7
  9. package/.devcontainer/features/README.md +21 -7
  10. package/.devcontainer/features/ccburn/README.md +60 -0
  11. package/.devcontainer/features/ccburn/devcontainer-feature.json +38 -0
  12. package/.devcontainer/features/ccburn/install.sh +174 -0
  13. package/.devcontainer/features/ccstatusline/README.md +22 -21
  14. package/.devcontainer/features/ccstatusline/devcontainer-feature.json +1 -1
  15. package/.devcontainer/features/ccstatusline/install.sh +48 -16
  16. package/.devcontainer/features/claude-code/config/settings.json +60 -24
  17. package/.devcontainer/features/mcp-qdrant/devcontainer-feature.json +1 -1
  18. package/.devcontainer/features/mcp-reasoner/devcontainer-feature.json +1 -1
  19. package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/scripts/__pycache__/format-on-stop.cpython-314.pyc +0 -0
  20. package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/scripts/format-on-stop.py +21 -6
  21. package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/scripts/__pycache__/lint-file.cpython-314.pyc +0 -0
  22. package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/scripts/lint-file.py +7 -10
  23. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/REVIEW-RUBRIC.md +440 -0
  24. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/architect.md +190 -0
  25. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/bash-exec.md +173 -0
  26. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/claude-guide.md +155 -0
  27. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/dependency-analyst.md +248 -0
  28. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/doc-writer.md +233 -0
  29. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/explorer.md +235 -0
  30. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/generalist.md +125 -0
  31. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/git-archaeologist.md +242 -0
  32. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/migrator.md +195 -0
  33. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/perf-profiler.md +265 -0
  34. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/refactorer.md +209 -0
  35. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/researcher.md +195 -0
  36. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/security-auditor.md +289 -0
  37. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/spec-writer.md +284 -0
  38. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/statusline-config.md +188 -0
  39. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/test-writer.md +245 -0
  40. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/hooks/hooks.json +12 -0
  41. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/guard-readonly-bash.cpython-314.pyc +0 -0
  42. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/redirect-builtin-agents.cpython-314.pyc +0 -0
  43. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/skill-suggester.cpython-314.pyc +0 -0
  44. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/syntax-validator.cpython-314.pyc +0 -0
  45. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/verify-no-regression.cpython-314.pyc +0 -0
  46. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/verify-tests-pass.cpython-314.pyc +0 -0
  47. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/guard-readonly-bash.py +611 -0
  48. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/redirect-builtin-agents.py +83 -0
  49. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/skill-suggester.py +85 -2
  50. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/syntax-validator.py +9 -4
  51. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/verify-no-regression.py +221 -0
  52. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/verify-tests-pass.py +176 -0
  53. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/claude-agent-sdk/SKILL.md +599 -0
  54. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/claude-agent-sdk/references/sdk-typescript-reference.md +954 -0
  55. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/git-forensics/SKILL.md +276 -0
  56. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/git-forensics/references/advanced-commands.md +332 -0
  57. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/git-forensics/references/investigation-playbooks.md +319 -0
  58. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/performance-profiling/SKILL.md +341 -0
  59. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/performance-profiling/references/interpreting-results.md +235 -0
  60. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/performance-profiling/references/tool-commands.md +395 -0
  61. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/refactoring-patterns/SKILL.md +344 -0
  62. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/refactoring-patterns/references/safe-transformations.md +247 -0
  63. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/refactoring-patterns/references/smell-catalog.md +332 -0
  64. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/security-checklist/SKILL.md +277 -0
  65. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/security-checklist/references/owasp-patterns.md +269 -0
  66. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/security-checklist/references/secrets-patterns.md +253 -0
  67. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/specification-writing/SKILL.md +288 -0
  68. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/specification-writing/references/criteria-patterns.md +245 -0
  69. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/specification-writing/references/ears-templates.md +239 -0
  70. package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/__pycache__/guard-protected.cpython-314.pyc +0 -0
  71. package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected.py +40 -39
  72. package/.devcontainer/scripts/setup-aliases.sh +10 -20
  73. package/.devcontainer/scripts/setup-config.sh +2 -0
  74. package/.devcontainer/scripts/setup-plugins.sh +38 -46
  75. package/.devcontainer/scripts/setup-projects.sh +175 -0
  76. package/.devcontainer/scripts/setup-symlink-claude.sh +36 -0
  77. package/.devcontainer/scripts/setup-update-claude.sh +11 -8
  78. package/.devcontainer/scripts/setup.sh +4 -2
  79. package/package.json +1 -1
  80. package/.devcontainer/scripts/setup-irie-claude.sh +0 -32
@@ -0,0 +1,60 @@
1
+ # ccburn - Visual Token Burn Rate Tracker
2
+
3
+ Real-time burn-up charts and pace tracking for Claude Code usage limits.
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ # Full TUI dashboard (auto-detects active limit)
9
+ ccburn
10
+
11
+ # 5-hour rolling session limit
12
+ ccburn session
13
+
14
+ # 7-day weekly limit
15
+ ccburn weekly
16
+
17
+ # Single-line output for status bars
18
+ ccburn --compact --once
19
+
20
+ # JSON output for scripting
21
+ ccburn --json --once
22
+ ```
23
+
24
+ ## Features
25
+
26
+ - **Burn-up charts** — Live-updating terminal graphics showing usage over time
27
+ - **Pace indicators** — 🧊 Cool (behind pace) | 🔥 On pace | 🚨 Too hot (ahead)
28
+ - **Burn rate** — %/hour via linear regression, with trend classification
29
+ - **Predictions** — Time-to-100% estimates and projection lines
30
+ - **Multiple limits** — Session (5h), Weekly (7d), Weekly Sonnet, Monthly
31
+ - **SQLite history** — 7-day retention at `~/.ccburn/history.db`
32
+ - **Compact mode** — Single-line output for embedding in statuslines
33
+
34
+ ## Display Modes
35
+
36
+ | Mode | Flag | Description |
37
+ |------|------|-------------|
38
+ | Full TUI | (default) | Interactive dashboard with charts and gauges |
39
+ | Compact | `--compact` | Single line: `Session: 🧊 45% (2h14m) \| Weekly: 🔥 12%` |
40
+ | JSON | `--json` | Structured output with all metrics |
41
+ | Once | `--once` | Single snapshot, no live updates |
42
+
43
+ ## Statusline Integration
44
+
45
+ This feature installs a wrapper at `/usr/local/bin/ccburn-statusline` for use with
46
+ ccstatusline's `custom-command` widget. The wrapper handles:
47
+
48
+ - Missing OAuth credentials (shows "awaiting auth")
49
+ - First-run npx caching (shows "unavailable" if download fails)
50
+ - API errors (graceful fallback messages)
51
+
52
+ ## Requirements
53
+
54
+ - Node.js (via devcontainer node feature)
55
+ - Claude Code OAuth credentials at `~/.claude/.credentials.json`
56
+
57
+ ## Documentation
58
+
59
+ - [GitHub Repository](https://github.com/JuanjoFuchs/ccburn)
60
+ - [ccburn Specification](https://github.com/JuanjoFuchs/ccburn/blob/main/docs/ccburn-spec.md)
@@ -0,0 +1,38 @@
1
+ {
2
+ "id": "ccburn",
3
+ "version": "1.0.0",
4
+ "name": "ccburn - Visual Token Burn Rate Tracker",
5
+ "description": "Installs ccburn CLI for real-time burn-up charts and pace tracking of Claude Code usage limits",
6
+ "maintainer": "AnExiledDev",
7
+ "documentationURL": "https://github.com/JuanjoFuchs/ccburn",
8
+ "options": {
9
+ "version": {
10
+ "type": "string",
11
+ "description": "ccburn version to use (e.g., 'latest', '0.4.2')",
12
+ "default": "latest"
13
+ },
14
+ "shells": {
15
+ "type": "string",
16
+ "description": "Which shells to configure (bash, zsh, or both)",
17
+ "default": "both",
18
+ "enum": [
19
+ "bash",
20
+ "zsh",
21
+ "both"
22
+ ],
23
+ "proposals": [
24
+ "bash",
25
+ "zsh",
26
+ "both"
27
+ ]
28
+ },
29
+ "username": {
30
+ "type": "string",
31
+ "description": "Container user to install for",
32
+ "default": "automatic"
33
+ }
34
+ },
35
+ "installsAfter": [
36
+ "ghcr.io/devcontainers/features/node:1"
37
+ ]
38
+ }
@@ -0,0 +1,174 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+
4
+ # === SETUP ===
5
+ cleanup() {
6
+ :
7
+ }
8
+ trap cleanup EXIT
9
+
10
+ # === IMPORT OPTIONS ===
11
+ # NOTE: DevContainer converts camelCase options to UPPERCASE without underscores
12
+ CCBURN_VERSION="${VERSION:-latest}"
13
+ SHELLS="${SHELLS:-both}"
14
+ USERNAME="${USERNAME:-automatic}"
15
+
16
+ echo "[ccburn] Starting ccburn installation..."
17
+
18
+ # === SOURCE NVM ===
19
+ if [ -f /usr/local/share/nvm/nvm.sh ]; then
20
+ source /usr/local/share/nvm/nvm.sh
21
+ fi
22
+
23
+ # === VALIDATE DEPENDENCIES ===
24
+ if ! command -v npx &>/dev/null; then
25
+ echo "[ccburn] ERROR: npx is not available"
26
+ echo " Ensure node feature is installed first"
27
+ echo " NVM path: /usr/local/share/nvm/nvm.sh"
28
+ exit 1
29
+ fi
30
+
31
+ # === VALIDATE INPUT ===
32
+ if [[ ! "${SHELLS}" =~ ^(bash|zsh|both)$ ]]; then
33
+ echo "[ccburn] ERROR: shells must be 'bash', 'zsh', or 'both'"
34
+ echo " Provided: ${SHELLS}"
35
+ exit 1
36
+ fi
37
+
38
+ if [[ ! "${CCBURN_VERSION}" =~ ^[a-zA-Z0-9.-]+$ ]]; then
39
+ echo "[ccburn] ERROR: version contains invalid characters"
40
+ echo " Provided: ${CCBURN_VERSION}"
41
+ exit 1
42
+ fi
43
+
44
+ # === DETECT USER ===
45
+ if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
46
+ USERNAME=""
47
+ for CURRENT_USER in vscode node codespace; do
48
+ if id -u "${CURRENT_USER}" >/dev/null 2>&1; then
49
+ USERNAME=${CURRENT_USER}
50
+ break
51
+ fi
52
+ done
53
+ [ -z "${USERNAME}" ] && USERNAME=root
54
+ elif [ "${USERNAME}" = "none" ] || ! id -u "${USERNAME}" >/dev/null 2>&1; then
55
+ USERNAME=root
56
+ fi
57
+
58
+ echo "[ccburn] Installing for user: ${USERNAME}"
59
+
60
+ # === GET USER HOME ===
61
+ USER_HOME=$(eval echo "~${USERNAME}")
62
+ if [ ! -d "${USER_HOME}" ]; then
63
+ echo "[ccburn] ERROR: Home directory not found for user ${USERNAME}"
64
+ exit 1
65
+ fi
66
+
67
+ # === INSTALL (CREATE ALIASES) ===
68
+ ALIAS_CMD="alias ccburn=\"npx -y ccburn@${CCBURN_VERSION}\""
69
+
70
+ configure_shell() {
71
+ local shell_rc="$1"
72
+ local shell_name="$2"
73
+
74
+ if [ ! -f "${shell_rc}" ]; then
75
+ echo "[ccburn] Creating ${shell_name} config file: ${shell_rc}"
76
+ sudo -u "${USERNAME}" touch "${shell_rc}"
77
+ fi
78
+
79
+ if grep -q "alias ccburn=" "${shell_rc}"; then
80
+ echo "[ccburn] ${shell_name} alias already configured. Skipping..."
81
+ else
82
+ echo "[ccburn] Adding ccburn alias to ${shell_name}"
83
+ echo "${ALIAS_CMD}" >> "${shell_rc}"
84
+ if ! chown "${USERNAME}:${USERNAME}" "${shell_rc}" 2>/dev/null; then
85
+ echo "[ccburn] WARNING: Could not set ownership on ${shell_rc}"
86
+ echo " Fix: sudo chown ${USERNAME}:${USERNAME} ${shell_rc}"
87
+ fi
88
+ fi
89
+ }
90
+
91
+ if [ "${SHELLS}" = "bash" ] || [ "${SHELLS}" = "both" ]; then
92
+ configure_shell "${USER_HOME}/.bashrc" "bash"
93
+ fi
94
+
95
+ if [ "${SHELLS}" = "zsh" ] || [ "${SHELLS}" = "both" ]; then
96
+ configure_shell "${USER_HOME}/.zshrc" "zsh"
97
+ fi
98
+
99
+ # === INSTALL STATUSLINE WRAPPER ===
100
+ # Creates a wrapper script for embedding ccburn compact output in ccstatusline
101
+ # Handles missing credentials, npx availability, and first-run caching gracefully
102
+ echo "[ccburn] Creating statusline wrapper script..."
103
+
104
+ cat > /usr/local/bin/ccburn-statusline <<'WRAPPER_EOF'
105
+ #!/bin/bash
106
+ # ccburn-statusline: Compact output wrapper for ccstatusline custom-command widget
107
+ # Handles missing credentials, first-run npx cache, and errors gracefully
108
+ # Always outputs something useful — never errors in the statusline
109
+
110
+ # Source NVM if available (npx may not be on PATH without it)
111
+ if [ -f /usr/local/share/nvm/nvm.sh ]; then
112
+ source /usr/local/share/nvm/nvm.sh 2>/dev/null
113
+ fi
114
+
115
+ if ! command -v npx &>/dev/null; then
116
+ echo "ccburn: npx unavailable"
117
+ exit 0
118
+ fi
119
+
120
+ # Check if credentials exist (ccburn needs OAuth token)
121
+ CRED_FILE="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/.credentials.json"
122
+ if [ ! -f "$CRED_FILE" ]; then
123
+ echo "ccburn: awaiting auth"
124
+ exit 0
125
+ fi
126
+
127
+ # Run ccburn compact (suppress stderr, capture output)
128
+ OUTPUT=$(npx -y ccburn --compact --once 2>/dev/null)
129
+ if [ $? -eq 0 ] && [ -n "$OUTPUT" ]; then
130
+ echo "$OUTPUT"
131
+ else
132
+ echo "ccburn: unavailable"
133
+ fi
134
+ WRAPPER_EOF
135
+
136
+ chmod +x /usr/local/bin/ccburn-statusline
137
+ echo "[ccburn] ✓ Statusline wrapper installed at /usr/local/bin/ccburn-statusline"
138
+
139
+ # === VERIFICATION ===
140
+ echo "[ccburn] Verifying npx can access ccburn..."
141
+ if sudo -u "${USERNAME}" bash -c "npx -y ccburn@${CCBURN_VERSION} --version" &>/dev/null; then
142
+ echo "[ccburn] ✓ ccburn is accessible"
143
+ else
144
+ echo "[ccburn] WARNING: Could not verify ccburn installation"
145
+ echo " This may be due to network connectivity"
146
+ echo " The alias will still work once ccburn is available"
147
+ fi
148
+
149
+ # === SUMMARY ===
150
+ echo ""
151
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
152
+ echo " ccburn Installation Complete"
153
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
154
+ echo ""
155
+ echo "Configuration:"
156
+ echo " • User: ${USERNAME}"
157
+ echo " • Version: ${CCBURN_VERSION}"
158
+ echo " • Shells: ${SHELLS}"
159
+ echo ""
160
+ echo "Usage:"
161
+ echo " ccburn # Full TUI dashboard (auto-detect limit)"
162
+ echo " ccburn session # 5-hour rolling session limit"
163
+ echo " ccburn weekly # 7-day limit (all models)"
164
+ echo " ccburn weekly-sonnet # 7-day Sonnet-only limit"
165
+ echo " ccburn --compact # Single-line for status bars"
166
+ echo " ccburn --json # JSON output for scripting"
167
+ echo " ccburn --help # Full options"
168
+ echo ""
169
+ echo "Statusline Integration:"
170
+ echo " • Wrapper: /usr/local/bin/ccburn-statusline"
171
+ echo " • Used by ccstatusline custom-command widget"
172
+ echo " • Shows: Session 🧊/🔥/🚨 % | Weekly % | Sonnet %"
173
+ echo ""
174
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
@@ -24,26 +24,22 @@ A DevContainer Feature that installs and configures [ccstatusline](https://githu
24
24
 
25
25
  ## Display Format
26
26
 
27
- ### Line 1: Core Metrics
28
- ```
29
- Model: Opus 4.1 ▶ Ctx: 58.5k ▶ main ▶ (+19, -2) ▶ v1.0.86
30
- ```
27
+ ### 6-Line Powerline Layout
31
28
 
32
- - **Model** (maroon bg, white text, bold): Current AI model
33
- - **Context** (gold bg, black text, bold): Context window size
34
- - **Git Branch** (blue bg, white text): Active branch
35
- - **Git Changes** (pink bg, white text): Lines added/removed
36
- - **Version** (light pink bg, white text): Claude Code version
37
-
38
- ### Line 2: Location & Cost
39
29
  ```
40
- cwd: .../workspaces/projectCost: $0.39
30
+ Line 1: Context Length Context % ▶ Model
31
+ Line 2: Tokens In ▶ Tokens Out ▶ Tokens Cached
32
+ Line 3: Git Branch ▶ Git Changes ▶ Git Worktree
33
+ Line 4: Session Clock ▶ Session Cost ▶ Block Timer
34
+ Line 5: Tokens Total ▶ Version ▶ cc --resume {sessionId}
35
+ Line 6: Session: 🧊 45% (2h14m) | Weekly: 🔥 12% | Sonnet: 🧊 3%
41
36
  ```
42
37
 
43
- - **Working Directory** (gold bg, black text): Current directory path
44
- - **Session Cost** (gold bg, black text, bold): Total session cost in USD
38
+ - **Lines 1-4**: Core session metrics, token tracking, git status, and cost
39
+ - **Line 5**: Totals + copyable session resume command for `cc --resume`
40
+ - **Line 6**: Live burn rate from [ccburn](https://github.com/JuanjoFuchs/ccburn) with pace indicators
45
41
 
46
- All widgets connected with powerline arrows for a seamless, professional appearance.
42
+ All widgets connected with powerline arrows (monokai theme).
47
43
 
48
44
  ## What This Feature Installs
49
45
 
@@ -74,10 +70,11 @@ The feature will validate these are present and exit with an error if missing.
74
70
 
75
71
  ## Features
76
72
 
77
- - ✅ **Powerline Mode**: Seamless arrow separators between widgets
78
- - ✅ **Compact Layout**: 2 clean lines with essential metrics
79
- - ✅ **7 Key Widgets**: Model, context, git status, version, directory, cost
80
- - ✅ **Vibrant Colors**: High-contrast truecolor (24-bit hex) optimized for dark terminals
73
+ - ✅ **Powerline Mode**: Seamless arrow separators between widgets (monokai theme)
74
+ - ✅ **6-Line Layout**: 16 widgets covering context, tokens, git, cost, session ID, and burn rate
75
+ - ✅ **Session Resume**: Copyable `cc --resume {sessionId}` command via custom-command widget
76
+ - ✅ **Burn Rate Tracking**: Live ccburn compact output showing pace indicators (🧊/🔥/🚨)
77
+ - ✅ **ANSI Colors**: High-contrast colors optimized for dark terminals
81
78
  - ✅ **Automatic Integration**: Auto-configures `.claude/settings.json`
82
79
  - ✅ **Idempotent**: Safe to run multiple times
83
80
  - ✅ **Multi-user**: Automatically detects container user
@@ -151,7 +148,7 @@ Widgets are configured in the `lines` array:
151
148
  - `session-clock` - Session elapsed time
152
149
  - `session-cost` - Total session cost (USD)
153
150
  - `block-timer` - Block execution time
154
- - `output-style` - Current output style
151
+ - `claude-session-id` - Session ID (raw or with label)
155
152
 
156
153
  **Context Tracking:**
157
154
  - `context-length` - Context window size
@@ -169,11 +166,15 @@ Widgets are configured in the `lines` array:
169
166
  - `git-changes` - Lines added/removed
170
167
  - `git-worktree` - Git worktree info
171
168
 
169
+ **External Metrics (custom-command):**
170
+ - `custom-command` → `/usr/local/bin/ccstatusline-session-resume` - Copyable resume command
171
+ - `custom-command` → `/usr/local/bin/ccburn-statusline` - Burn rate with pace indicators
172
+
172
173
  **Other:**
173
174
  - `cwd` - Current working directory
174
175
  - `version` - Claude Code version
175
176
  - `custom-text` - Static text
176
- - `custom-command` - Command output
177
+ - `custom-command` - Arbitrary command output (receives Claude Code JSON via stdin)
177
178
 
178
179
  ### Color Scheme
179
180
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "ccstatusline",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "name": "ccstatusline",
5
5
  "description": "Compact powerline status line for Claude Code with essential metrics",
6
6
  "maintainer": "AnExiledDev",
@@ -3,7 +3,7 @@ set -euo pipefail
3
3
 
4
4
  # Cleanup on exit
5
5
  cleanup() {
6
- rm -f /tmp/ccstatusline-*.json 2>/dev/null || true
6
+ rm -f "${TMPDIR:-/tmp}"/ccstatusline-*.json 2>/dev/null || true
7
7
  }
8
8
  trap cleanup EXIT
9
9
 
@@ -62,29 +62,39 @@ fi
62
62
  echo "[ccstatusline] Generating powerline configuration..."
63
63
 
64
64
  # Generate powerline configuration using jq (ANSI colors - same as module)
65
+ # 6-line layout with session resume command and ccburn burn rate tracking
65
66
  CONFIG_JSON=$(jq -n '{
66
67
  version: 3,
67
68
  lines: [
68
69
  [
69
70
  {id: "1", type: "context-length", color: "cyan"},
70
- {id: "3", type: "git-branch", color: "brightBlack"},
71
+ {id: "db519d5a-80a7-4b44-8a9c-2c7d8c0a7176", type: "context-percentage-usable", backgroundColor: "bgRed"},
72
+ {id: "d904cca6-ade8-41c1-a4f5-ddea30607a5e", type: "model", backgroundColor: "bgMagenta"}
73
+ ],
74
+ [
71
75
  {id: "5", type: "tokens-input", color: "magenta"},
72
- {id: "7", type: "session-clock", color: "yellow"},
73
- {id: "1eafc42e-f222-4090-a463-46de6ba81849", type: "output-style", backgroundColor: "bgBrightBlack"}
76
+ {id: "ac094d46-3673-4d41-84e3-dc8c5bcf639f", type: "tokens-output", backgroundColor: "bgMagenta"},
77
+ {id: "2ad12147-05fd-45fb-8336-53ba2e7df56c", type: "tokens-cached", backgroundColor: "bgBrightRed"}
74
78
  ],
75
79
  [
76
- {id: "db519d5a-80a7-4b44-8a9c-2c7d8c0a7176", type: "context-percentage-usable", backgroundColor: "bgRed"},
80
+ {id: "3", type: "git-branch", color: "brightBlack"},
77
81
  {id: "a529e50e-b9f3-4150-a812-937ab81545e8", type: "git-changes", backgroundColor: "bgBrightBlue"},
78
- {id: "ac094d46-3673-4d41-84e3-dc8c5bcf639f", type: "tokens-output", backgroundColor: "bgMagenta"},
79
- {id: "90aae111-3d3f-4bb0-8336-230f322cc2e8", type: "block-timer", backgroundColor: "bgYellow"},
80
- {id: "d904cca6-ade8-41c1-a4f5-ddea30607a5e", type: "model", backgroundColor: "bgMagenta"}
82
+ {id: "a9eaae3f-7f91-459c-833a-fbc9f01a09ae", type: "git-worktree", backgroundColor: "bgBrightBlue"}
81
83
  ],
82
84
  [
83
- {id: "9bacbdb4-2e01-45de-a0c0-ee6ec30fa3c2", type: "tokens-total", backgroundColor: "bgGreen"},
84
- {id: "a9eaae3f-7f91-459c-833a-fbc9f01a09ae", type: "git-worktree", backgroundColor: "bgBrightBlue"},
85
- {id: "2ad12147-05fd-45fb-8336-53ba2e7df56c", type: "tokens-cached", backgroundColor: "bgBrightRed"},
85
+ {id: "7", type: "session-clock", color: "yellow"},
86
86
  {id: "a4fe7f75-2f6c-49c7-88f6-ac7381142c2c", type: "session-cost", backgroundColor: "bgBrightWhite"},
87
+ {id: "90aae111-3d3f-4bb0-8336-230f322cc2e8", type: "block-timer", backgroundColor: "bgYellow"}
88
+ ],
89
+ [
90
+ {id: "9bacbdb4-2e01-45de-a0c0-ee6ec30fa3c2", type: "tokens-total", backgroundColor: "bgGreen"},
87
91
  {id: "2cdff909-8297-44a1-83f9-ad4bf024391e", type: "version", backgroundColor: "bgRed"}
92
+ ],
93
+ [
94
+ {id: "cc-resume-session", type: "custom-command", commandPath: "/usr/local/bin/ccstatusline-session-resume", timeout: 500, preserveColors: false, maxWidth: 50, color: "cyan", backgroundColor: "bgBrightBlack"}
95
+ ],
96
+ [
97
+ {id: "ccburn-compact", type: "custom-command", commandPath: "/usr/local/bin/ccburn-statusline", timeout: 8000, preserveColors: true, maxWidth: 80, color: "green", backgroundColor: "bgBlack"}
88
98
  ]
89
99
  ],
90
100
  flexMode: "full-minus-40",
@@ -95,7 +105,7 @@ CONFIG_JSON=$(jq -n '{
95
105
  powerline: {
96
106
  enabled: true,
97
107
  separators: ["\ue0b0"],
98
- separatorInvertBackground: [true],
108
+ separatorInvertBackground: [false],
99
109
  startCaps: ["\ue0b6"],
100
110
  endCaps: ["\ue0b4"],
101
111
  autoAlign: false,
@@ -146,6 +156,24 @@ echo "${CONFIG_JSON}" | jq . > "${TEMPLATE_FILE}"
146
156
  chmod 644 "${TEMPLATE_FILE}"
147
157
  echo "[ccstatusline] ✓ Template saved to ${TEMPLATE_FILE}"
148
158
 
159
+ # Create session resume helper script for custom-command widget
160
+ # Reads Claude Code JSON from stdin, outputs the session ID
161
+ echo "[ccstatusline] Creating session resume helper..."
162
+ cat > /usr/local/bin/ccstatusline-session-resume <<'SESSION_EOF'
163
+ #!/bin/bash
164
+ # Reads Claude Code JSON from stdin, outputs just the session ID
165
+ # Used by ccstatusline custom-command widget on line 6
166
+ SESSION_ID=$(jq -r '.session_id // empty' 2>/dev/null)
167
+ if [ -n "$SESSION_ID" ]; then
168
+ echo "$SESSION_ID"
169
+ else
170
+ echo "..."
171
+ fi
172
+ SESSION_EOF
173
+
174
+ chmod +x /usr/local/bin/ccstatusline-session-resume
175
+ echo "[ccstatusline] ✓ Session resume helper installed at /usr/local/bin/ccstatusline-session-resume"
176
+
149
177
  # Create wrapper script to protect configuration
150
178
  echo "[ccstatusline] Creating wrapper script..."
151
179
  cat > /usr/local/bin/ccstatusline-wrapper <<'WRAPPER_EOF'
@@ -267,13 +295,17 @@ echo ""
267
295
  echo "Configuration:"
268
296
  echo " • Config file: ${CONFIG_FILE}"
269
297
  echo " • User: ${USERNAME}"
270
- echo " • Theme: Powerline (3 lines, 13 widgets, ANSI colors)"
298
+ echo " • Theme: Powerline (7 lines, 16 widgets, ANSI colors)"
271
299
  echo " • Protected by: /usr/local/bin/ccstatusline-wrapper"
272
300
  echo ""
273
301
  echo "Display:"
274
- echo " Line 1: Context | Git Branch | Tokens In | Clock | Output Style"
275
- echo " Line 2: Context % | Git Changes | Tokens Out | Block Timer | Model"
276
- echo " Line 3: Tokens Total | Git Worktree | Cached | Cost | Version"
302
+ echo " Line 1: Context Length | Context % | Model"
303
+ echo " Line 2: Tokens In | Tokens Out | Tokens Cached"
304
+ echo " Line 3: Git Branch | Git Changes | Git Worktree"
305
+ echo " Line 4: Session Clock | Session Cost | Block Timer"
306
+ echo " Line 5: Tokens Total | Version"
307
+ echo " Line 6: Session ID"
308
+ echo " Line 7: Burn Rate (ccburn compact)"
277
309
  echo ""
278
310
  echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
279
311
  echo " Next Steps"
@@ -1,36 +1,72 @@
1
1
  {
2
- "cleanupPeriodDays": 360,
3
- "includeCoAuthoredBy": false,
4
- "statusLine": {
5
- "type": "command",
6
- "command": "/usr/local/bin/ccstatusline-wrapper"
7
- },
8
- "outputStyle": "",
2
+ "cleanupPeriodDays": 60,
3
+ "autoCompact": true,
4
+ "alwaysThinkingEnabled": true,
9
5
  "forceLoginMethod": "claudeai",
10
6
  "installationMethod": "npm-global",
11
- "enabledMcpjsonServers": [],
12
- "disabledMcpjsonServers": [],
13
- "permissions": {
14
- "defaultMode": "plan",
15
- "additionalDirectories": [],
16
- "allow": ["Read(/workspaces/*)", "WebFetch(domain:*)"],
17
- "ask": [],
18
- "deny": []
19
- },
20
- "hooks": {},
21
7
  "env": {
22
- "ANTHROPIC_MODEL": "claude-opus-4-5-20251101",
23
- "CLAUDE_CODE_SUBAGENT_MODEL": "claude-haiku-4-5-20251001",
24
- "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-5-20251101",
8
+ "ANTHROPIC_MODEL": "claude-opus-4-6",
9
+ "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-6",
25
10
  "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-5-20250929",
26
11
  "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001",
27
12
  "BASH_DEFAULT_TIMEOUT_MS": "240000",
28
13
  "BASH_MAX_TIMEOUT_MS": "600000",
29
- "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "true",
30
14
  "CLAUDE_CODE_MAX_OUTPUT_TOKENS": "64000",
31
15
  "MAX_MCP_OUTPUT_TOKENS": "10000",
32
- "MAX_THINKING_TOKENS": "31999",
16
+ "MAX_THINKING_TOKENS": "63999",
33
17
  "MCP_TIMEOUT": "120000",
34
- "MCP_TOOL_TIMEOUT": "30000"
35
- }
18
+ "MCP_TOOL_TIMEOUT": "30000",
19
+ "CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "95",
20
+ "CLAUDE_CODE_SHELL": "zsh",
21
+ "FORCE_AUTOUPDATE_PLUGINS": "1",
22
+
23
+ "ENABLE_TOOL_SEARCH": "auto:5",
24
+ "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
25
+ "CLAUDE_CODE_EFFORT_LEVEL": "high",
26
+ "CLAUDE_CODE_ENABLE_TASKS": "true",
27
+ "CLAUDE_CODE_DISABLE_AUTO_MEMORY": "0",
28
+ "ENABLE_CLAUDE_CODE_SM_COMPACT": "1",
29
+ "CLAUDE_CODE_FORCE_GLOBAL_CACHE": "1",
30
+ "CLAUDE_CODE_PLAN_MODE_INTERVIEW_PHASE": "true",
31
+ "CLAUDE_CODE_PLAN_V2_AGENT_COUNT": "3",
32
+ "CLAUDE_CODE_PLAN_MODE_REQUIRED": "true",
33
+
34
+ "CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY": "5",
35
+ "CLAUDE_CODE_MAX_RETRIES": "1",
36
+ "BASH_MAX_OUTPUT_LENGTH": "15000",
37
+ "TASK_MAX_OUTPUT_LENGTH": "64000"
38
+ },
39
+ "teammateMode": "auto",
40
+ "effortLevel": "high",
41
+ "includeCoAuthoredBy": false,
42
+ "permissions": {
43
+ "allow": [
44
+ "Read(/workspaces/*)",
45
+ "WebFetch(domain:*)"
46
+ ],
47
+ "deny": [],
48
+ "ask": [],
49
+ "defaultMode": "plan",
50
+ "additionalDirectories": []
51
+ },
52
+ "model": "opus",
53
+ "enabledMcpjsonServers": [],
54
+ "disabledMcpjsonServers": [],
55
+ "hooks": {},
56
+ "statusLine": {
57
+ "type": "command",
58
+ "command": "/usr/local/bin/ccstatusline-wrapper"
59
+ },
60
+ "enabledPlugins": {
61
+ "frontend-design@claude-code-plugins": true,
62
+ "codeforge-lsp@devs-marketplace": true,
63
+ "ticket-workflow@devs-marketplace": true,
64
+ "notify-hook@devs-marketplace": true,
65
+ "dangerous-command-blocker@devs-marketplace": true,
66
+ "protected-files-guard@devs-marketplace": true,
67
+ "auto-formatter@devs-marketplace": true,
68
+ "auto-linter@devs-marketplace": true,
69
+ "code-directive@devs-marketplace": true
70
+ },
71
+ "autoUpdatesChannel": "latest"
36
72
  }
@@ -52,6 +52,6 @@
52
52
  "installsAfter": [
53
53
  "ghcr.io/devcontainers/features/python:1",
54
54
  "ghcr.io/devcontainers/features/common-utils:2",
55
- "./features/claude-code"
55
+ "ghcr.io/anthropics/devcontainer-features/claude-code:1"
56
56
  ]
57
57
  }
@@ -15,6 +15,6 @@
15
15
  "installsAfter": [
16
16
  "ghcr.io/devcontainers/features/node:1",
17
17
  "ghcr.io/devcontainers/features/common-utils:2",
18
- "./features/claude-code"
18
+ "ghcr.io/anthropics/devcontainer-features/claude-code:1"
19
19
  ]
20
20
  }
@@ -33,8 +33,21 @@ BIOME_EXTS = {
33
33
  ".css",
34
34
  }
35
35
 
36
- BLACK_PATH = "/usr/local/py-utils/bin/black"
37
- GOFMT_PATH = "/usr/local/go/bin/gofmt"
36
+ BLACK_PATH_FALLBACK = "/usr/local/py-utils/bin/black"
37
+ GOFMT_PATH_FALLBACK = "/usr/local/go/bin/gofmt"
38
+
39
+
40
+ def _resolve_tool(name: str, fallback: str) -> str | None:
41
+ """Find tool via PATH first, fall back to hardcoded path."""
42
+ try:
43
+ result = subprocess.run(["which", name], capture_output=True, text=True)
44
+ if result.returncode == 0:
45
+ return result.stdout.strip()
46
+ except Exception:
47
+ pass
48
+ if os.path.exists(fallback):
49
+ return fallback
50
+ return None
38
51
 
39
52
 
40
53
  def find_tool_upward(file_path: str, tool_name: str) -> str | None:
@@ -76,11 +89,12 @@ def find_biome(file_path: str) -> str | None:
76
89
 
77
90
  def format_python(file_path: str) -> None:
78
91
  """Format with Black (quiet mode)."""
79
- if not os.path.exists(BLACK_PATH):
92
+ black = _resolve_tool("black", BLACK_PATH_FALLBACK)
93
+ if not black:
80
94
  return
81
95
  try:
82
96
  subprocess.run(
83
- [BLACK_PATH, "--quiet", file_path],
97
+ [black, "--quiet", file_path],
84
98
  capture_output=True,
85
99
  timeout=10,
86
100
  )
@@ -90,11 +104,12 @@ def format_python(file_path: str) -> None:
90
104
 
91
105
  def format_go(file_path: str) -> None:
92
106
  """Format with gofmt."""
93
- if not os.path.exists(GOFMT_PATH):
107
+ gofmt = _resolve_tool("gofmt", GOFMT_PATH_FALLBACK)
108
+ if not gofmt:
94
109
  return
95
110
  try:
96
111
  subprocess.run(
97
- [GOFMT_PATH, "-w", file_path],
112
+ [gofmt, "-w", file_path],
98
113
  capture_output=True,
99
114
  timeout=10,
100
115
  )