codeforge-dev 1.4.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 (131) hide show
  1. package/.devcontainer/.env +22 -0
  2. package/.devcontainer/CHANGELOG.md +197 -0
  3. package/.devcontainer/CLAUDE.md +117 -0
  4. package/.devcontainer/README.md +222 -0
  5. package/.devcontainer/config/main-system-prompt.md +502 -0
  6. package/.devcontainer/config/settings.json +47 -0
  7. package/.devcontainer/devcontainer.json +94 -0
  8. package/.devcontainer/features/README.md +113 -0
  9. package/.devcontainer/features/agent-browser/README.md +65 -0
  10. package/.devcontainer/features/agent-browser/devcontainer-feature.json +23 -0
  11. package/.devcontainer/features/agent-browser/install.sh +79 -0
  12. package/.devcontainer/features/ast-grep/README.md +24 -0
  13. package/.devcontainer/features/ast-grep/devcontainer-feature.json +24 -0
  14. package/.devcontainer/features/ast-grep/install.sh +51 -0
  15. package/.devcontainer/features/ccstatusline/README.md +296 -0
  16. package/.devcontainer/features/ccstatusline/devcontainer-feature.json +19 -0
  17. package/.devcontainer/features/ccstatusline/install.sh +290 -0
  18. package/.devcontainer/features/ccusage/README.md +205 -0
  19. package/.devcontainer/features/ccusage/devcontainer-feature.json +38 -0
  20. package/.devcontainer/features/ccusage/install.sh +132 -0
  21. package/.devcontainer/features/claude-code/README.md +498 -0
  22. package/.devcontainer/features/claude-code/config/settings.json +36 -0
  23. package/.devcontainer/features/claude-code/config/system-prompt.md +118 -0
  24. package/.devcontainer/features/claude-code/config/world-building-sp.md +1432 -0
  25. package/.devcontainer/features/claude-code/devcontainer-feature.json +42 -0
  26. package/.devcontainer/features/claude-code/install.sh +466 -0
  27. package/.devcontainer/features/claude-monitor/README.md +74 -0
  28. package/.devcontainer/features/claude-monitor/devcontainer-feature.json +38 -0
  29. package/.devcontainer/features/claude-monitor/install.sh +99 -0
  30. package/.devcontainer/features/lsp-servers/README.md +85 -0
  31. package/.devcontainer/features/lsp-servers/devcontainer-feature.json +40 -0
  32. package/.devcontainer/features/lsp-servers/install.sh +116 -0
  33. package/.devcontainer/features/mcp-qdrant/CHANGES.md +399 -0
  34. package/.devcontainer/features/mcp-qdrant/README.md +474 -0
  35. package/.devcontainer/features/mcp-qdrant/devcontainer-feature.json +57 -0
  36. package/.devcontainer/features/mcp-qdrant/install.sh +295 -0
  37. package/.devcontainer/features/mcp-qdrant/poststart-hook.sh +129 -0
  38. package/.devcontainer/features/mcp-reasoner/README.md +177 -0
  39. package/.devcontainer/features/mcp-reasoner/devcontainer-feature.json +20 -0
  40. package/.devcontainer/features/mcp-reasoner/install.sh +177 -0
  41. package/.devcontainer/features/mcp-reasoner/poststart-hook.sh +67 -0
  42. package/.devcontainer/features/notify-hook/README.md +86 -0
  43. package/.devcontainer/features/notify-hook/devcontainer-feature.json +23 -0
  44. package/.devcontainer/features/notify-hook/install.sh +38 -0
  45. package/.devcontainer/features/splitrail/README.md +140 -0
  46. package/.devcontainer/features/splitrail/devcontainer-feature.json +34 -0
  47. package/.devcontainer/features/splitrail/install.sh +129 -0
  48. package/.devcontainer/features/tree-sitter/README.md +138 -0
  49. package/.devcontainer/features/tree-sitter/devcontainer-feature.json +52 -0
  50. package/.devcontainer/features/tree-sitter/install.sh +173 -0
  51. package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +106 -0
  52. package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/.claude-plugin/plugin.json +7 -0
  53. package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/hooks/hooks.json +17 -0
  54. package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/scripts/format-file.py +101 -0
  55. package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/.claude-plugin/plugin.json +7 -0
  56. package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/hooks/hooks.json +17 -0
  57. package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/scripts/lint-file.py +137 -0
  58. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/.claude-plugin/plugin.json +8 -0
  59. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/claude-code-headless/SKILL.md +387 -0
  60. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/claude-code-headless/references/cli-flags-and-output.md +312 -0
  61. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/claude-code-headless/references/sdk-and-mcp.md +569 -0
  62. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker/SKILL.md +309 -0
  63. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker/references/compose-services.md +438 -0
  64. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker/references/dockerfile-patterns.md +340 -0
  65. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker-py/SKILL.md +412 -0
  66. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker-py/references/container-lifecycle.md +388 -0
  67. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker-py/references/resources-and-security.md +444 -0
  68. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/fastapi/SKILL.md +344 -0
  69. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/fastapi/references/middleware-and-lifespan.md +254 -0
  70. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/fastapi/references/pydantic-models.md +245 -0
  71. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/fastapi/references/routing-and-dependencies.md +255 -0
  72. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/fastapi/references/sse-and-streaming.md +318 -0
  73. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/pydantic-ai/SKILL.md +345 -0
  74. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/pydantic-ai/references/agents-and-tools.md +271 -0
  75. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/pydantic-ai/references/models-and-streaming.md +422 -0
  76. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/skill-building/SKILL.md +220 -0
  77. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/skill-building/references/cross-vendor-principles.md +139 -0
  78. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/skill-building/references/patterns-and-antipatterns.md +376 -0
  79. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/skill-building/references/skill-authoring-patterns.md +356 -0
  80. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/sqlite/SKILL.md +329 -0
  81. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/sqlite/references/advanced-queries.md +314 -0
  82. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/sqlite/references/javascript-patterns.md +323 -0
  83. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/sqlite/references/python-patterns.md +354 -0
  84. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/sqlite/references/schema-and-pragmas.md +326 -0
  85. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/SKILL.md +356 -0
  86. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/ai-sdk-svelte.md +128 -0
  87. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/component-patterns.md +332 -0
  88. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/layercake.md +203 -0
  89. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/migration-guide.md +350 -0
  90. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/runes-and-reactivity.md +328 -0
  91. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/spa-and-routing.md +262 -0
  92. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/svelte-dnd-action.md +181 -0
  93. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/testing/SKILL.md +414 -0
  94. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/testing/references/fastapi-testing.md +411 -0
  95. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/testing/references/svelte-testing.md +538 -0
  96. package/.devcontainer/plugins/devs-marketplace/plugins/codeforge-lsp/.claude-plugin/plugin.json +7 -0
  97. package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/.claude-plugin/plugin.json +7 -0
  98. package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/hooks/hooks.json +17 -0
  99. package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/scripts/block-dangerous.py +110 -0
  100. package/.devcontainer/plugins/devs-marketplace/plugins/notify-hook/.claude-plugin/plugin.json +7 -0
  101. package/.devcontainer/plugins/devs-marketplace/plugins/notify-hook/hooks/hooks.json +17 -0
  102. package/.devcontainer/plugins/devs-marketplace/plugins/planning-reminder/.claude-plugin/plugin.json +7 -0
  103. package/.devcontainer/plugins/devs-marketplace/plugins/planning-reminder/hooks/hooks.json +17 -0
  104. package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/.claude-plugin/plugin.json +7 -0
  105. package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/hooks/hooks.json +17 -0
  106. package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected.py +108 -0
  107. package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/commands/ticket/357/200/272create-pr.md +337 -0
  108. package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/commands/ticket/357/200/272new.md +166 -0
  109. package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/commands/ticket/357/200/272review-commit.md +290 -0
  110. package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/commands/ticket/357/200/272work.md +257 -0
  111. package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/plugin.json +8 -0
  112. package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/system-prompt.md +184 -0
  113. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/.claude-plugin/plugin.json +6 -0
  114. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/config/planning-instructions.md +14 -0
  115. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/functional-conjuring-map.md +989 -0
  116. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/hooks/hooks.json +33 -0
  117. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/__pycache__/post-enhance-task.cpython-314.pyc +0 -0
  118. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/enhance-planning.py +71 -0
  119. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/enhancers/enhance-plan.sh +68 -0
  120. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/enhancers/enhance-task.sh +120 -0
  121. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/post-enhance-plan.py +133 -0
  122. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/post-enhance-task.py +253 -0
  123. package/.devcontainer/scripts/setup-aliases.sh +80 -0
  124. package/.devcontainer/scripts/setup-config.sh +28 -0
  125. package/.devcontainer/scripts/setup-irie-claude.sh +32 -0
  126. package/.devcontainer/scripts/setup-plugins.sh +80 -0
  127. package/.devcontainer/scripts/setup.sh +58 -0
  128. package/LICENSE.txt +674 -0
  129. package/README.md +267 -0
  130. package/package.json +44 -0
  131. package/setup.js +83 -0
@@ -0,0 +1,113 @@
1
+ # CodeForge DevContainer Features
2
+
3
+ This directory contains DevContainer Features for AI coding agent environments. These features follow the [DevContainer Features specification](https://containers.dev/implementors/features/) and can be published to OCI registries for distribution.
4
+
5
+ ## Available Features
6
+
7
+ ### mcp-qdrant
8
+ Vector database integration via Qdrant MCP server. Enables semantic search, embeddings management, and RAG workflows.
9
+
10
+ **Status**: ✅ Complete
11
+ **Documentation**: [mcp-qdrant/README.md](./mcp-qdrant/README.md)
12
+
13
+ ## Feature Structure
14
+
15
+ Each feature follows this structure:
16
+
17
+ ```
18
+ feature-name/
19
+ ├── devcontainer-feature.json # Feature metadata and options
20
+ ├── install.sh # Installation script (executable)
21
+ └── README.md # Feature documentation
22
+ ```
23
+
24
+ ## Development Workflow
25
+
26
+ ### Creating a New Feature
27
+
28
+ 1. **Create directory**: `mkdir features/feature-name`
29
+ 2. **Add metadata**: Create `devcontainer-feature.json`
30
+ 3. **Write installer**: Create `install.sh` (make executable)
31
+ 4. **Document**: Create `README.md`
32
+ 5. **Test locally**: Reference in devcontainer.json
33
+
34
+ ### Local Testing
35
+
36
+ To test a feature locally before publishing:
37
+
38
+ ```json
39
+ {
40
+ "features": {
41
+ "./features/feature-name": {
42
+ "option1": "value1"
43
+ }
44
+ }
45
+ }
46
+ ```
47
+
48
+ ### Publishing Features
49
+
50
+ Features will be published to GitHub Container Registry (GHCR):
51
+
52
+ ```
53
+ ghcr.io/yourorg/codeforge-features/feature-name:1
54
+ ```
55
+
56
+ **Publishing workflow** (future):
57
+ - Push to main branch
58
+ - GitHub Actions builds and publishes
59
+ - Tags create versioned releases
60
+
61
+ ## Feature Guidelines
62
+
63
+ ### Granularity
64
+ - **One feature = One tool/service**
65
+ - Bundle only if tools are always used together
66
+ - See project README for guidance
67
+
68
+ ### Options
69
+ - Use clear, descriptive option names
70
+ - Provide sensible defaults
71
+ - Support environment variable substitution: `"${env:VAR}"`
72
+ - Document all options in README
73
+
74
+ ### Installation
75
+ - Must be idempotent (safe to run multiple times)
76
+ - Check if already installed before installing
77
+ - Use appropriate user (not always root)
78
+ - Clean up on failure
79
+
80
+ ### Configuration
81
+ - Generate necessary config files
82
+ - Provide helper scripts for manual setup
83
+ - Print clear installation summary
84
+ - Show next steps to user
85
+
86
+ ## Migration from Modules
87
+
88
+ CodeForge modules are being converted to DevContainer Features:
89
+
90
+ | Old Module | New Feature | Status |
91
+ |-----------|-------------|---------|
92
+ | mcp_qdrant | mcp-qdrant | ✅ Complete |
93
+ | mcp_browser | mcp-browser | 🔜 Planned |
94
+ | mcp_sourcerer | mcp-sourcerer | 🔜 Planned |
95
+ | mcp_reasoner | mcp-reasoner | 🔜 Planned |
96
+ | mcp_obsidian | mcp-obsidian | 🔜 Planned |
97
+ | mcp_code_runner | mcp-code-runner | 🔜 Planned |
98
+
99
+ ## Resources
100
+
101
+ - [DevContainer Features Specification](https://containers.dev/implementors/features/)
102
+ - [Feature Authoring Guide](https://containers.dev/guide/author-a-feature)
103
+ - [Feature Best Practices](https://containers.dev/guide/feature-authoring-best-practices)
104
+ - [CodeForge Documentation](../../README.md)
105
+
106
+ ## Contributing
107
+
108
+ Features are part of the CodeForge project. See main repository for contribution guidelines.
109
+
110
+ ---
111
+
112
+ **Status**: Active Development
113
+ **Last Updated**: 2025-11-11
@@ -0,0 +1,65 @@
1
+ # agent-browser
2
+
3
+ Headless browser automation CLI for AI agents from [Vercel Labs](https://github.com/vercel-labs/agent-browser).
4
+
5
+ ## Features
6
+
7
+ - Accessibility tree snapshots for AI navigation
8
+ - Screenshots and PDF capture
9
+ - Element interaction (click, fill, select)
10
+ - Cookie and localStorage management
11
+ - Network interception
12
+
13
+ ## Usage
14
+
15
+ ```bash
16
+ # Basic workflow
17
+ agent-browser open https://example.com
18
+ agent-browser snapshot # Get accessibility tree
19
+ agent-browser click @e2 # Click element by reference
20
+ agent-browser fill @e3 "text" # Fill input
21
+ agent-browser screenshot page.png
22
+ agent-browser close
23
+
24
+ # Cookie management (for authenticated sessions)
25
+ agent-browser cookie set "session=abc123; domain=.example.com"
26
+ ```
27
+
28
+ ## Options
29
+
30
+ | Option | Default | Description |
31
+ |--------|---------|-------------|
32
+ | `version` | `latest` | npm package version |
33
+ | `username` | `automatic` | Container user |
34
+
35
+ ## WSL/Devcontainer Usage
36
+
37
+ Two modes work in containerized environments:
38
+
39
+ ### Headless Mode (Default)
40
+
41
+ Uses bundled Chromium in the container—no display needed. Works out of the box:
42
+
43
+ ```bash
44
+ agent-browser open https://example.com
45
+ agent-browser snapshot
46
+ agent-browser close
47
+ ```
48
+
49
+ ### Host Chrome Connection
50
+
51
+ Connect to Chrome running on your host machine via CDP (Chrome DevTools Protocol):
52
+
53
+ 1. Start Chrome on host with remote debugging:
54
+ ```bash
55
+ chrome --remote-debugging-port=9222
56
+ # or on macOS:
57
+ /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
58
+ ```
59
+
60
+ 2. Connect from container:
61
+ ```bash
62
+ agent-browser connect 9222
63
+ ```
64
+
65
+ This is useful when the container's bundled Chromium is insufficient (e.g., specific browser extensions needed).
@@ -0,0 +1,23 @@
1
+ {
2
+ "id": "agent-browser",
3
+ "version": "1.0.0",
4
+ "name": "agent-browser",
5
+ "description": "Headless browser automation CLI for AI agents (Vercel Labs)",
6
+ "documentationURL": "https://github.com/vercel-labs/agent-browser",
7
+ "options": {
8
+ "version": {
9
+ "type": "string",
10
+ "description": "agent-browser npm package version",
11
+ "default": "latest"
12
+ },
13
+ "username": {
14
+ "type": "string",
15
+ "description": "Container user to install for",
16
+ "default": "automatic"
17
+ }
18
+ },
19
+ "installsAfter": [
20
+ "ghcr.io/devcontainers/features/common-utils:2",
21
+ "ghcr.io/devcontainers/features/node:1"
22
+ ]
23
+ }
@@ -0,0 +1,79 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+
4
+ VERSION="${VERSION:-latest}"
5
+ USERNAME="${USERNAME:-automatic}"
6
+
7
+ # Set headless as default for containers (bundled Chromium, no display needed)
8
+ export AGENT_BROWSER_HEADLESS=true
9
+
10
+ echo "[agent-browser] Starting installation..."
11
+ echo "[agent-browser] Version: ${VERSION}"
12
+
13
+ # Source nvm if available
14
+ if [ -f /usr/local/share/nvm/nvm.sh ]; then
15
+ source /usr/local/share/nvm/nvm.sh
16
+ fi
17
+
18
+ # Validate npm is available
19
+ if ! command -v npm &>/dev/null; then
20
+ echo "[agent-browser] ERROR: npm not available"
21
+ echo " Ensure node feature is installed first"
22
+ exit 1
23
+ fi
24
+
25
+ # Detect user
26
+ if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
27
+ if [ -n "${_REMOTE_USER:-}" ]; then
28
+ USERNAME="${_REMOTE_USER}"
29
+ elif getent passwd vscode >/dev/null 2>&1; then
30
+ USERNAME="vscode"
31
+ elif getent passwd node >/dev/null 2>&1; then
32
+ USERNAME="node"
33
+ elif getent passwd codespace >/dev/null 2>&1; then
34
+ USERNAME="codespace"
35
+ else
36
+ USERNAME="root"
37
+ fi
38
+ fi
39
+
40
+ echo "[agent-browser] Installing for user: ${USERNAME}"
41
+
42
+ # Install via npm
43
+ if [ "${VERSION}" = "latest" ]; then
44
+ NPM_PACKAGE="agent-browser"
45
+ else
46
+ NPM_PACKAGE="agent-browser@${VERSION}"
47
+ fi
48
+
49
+ npm install -g "${NPM_PACKAGE}" 2>/dev/null || {
50
+ echo "[agent-browser] WARNING: Global install failed, trying user install"
51
+ su - "${USERNAME}" -c "npm install -g ${NPM_PACKAGE}" 2>/dev/null || true
52
+ }
53
+
54
+ # Download Chromium and install system dependencies
55
+ echo "[agent-browser] Installing Chromium and system dependencies..."
56
+ agent-browser install --with-deps 2>/dev/null || {
57
+ echo "[agent-browser] WARNING: Chromium install with deps failed, trying without --with-deps"
58
+ agent-browser install 2>/dev/null || true
59
+ }
60
+
61
+ # Install Playwright browsers and dependencies
62
+ echo "[agent-browser] Installing Playwright browsers..."
63
+ npx playwright install --with-deps 2>/dev/null || {
64
+ echo "[agent-browser] WARNING: Playwright install with deps failed, trying without --with-deps"
65
+ npx playwright install 2>/dev/null || true
66
+ }
67
+
68
+ echo "[agent-browser] Installed: $(agent-browser --version 2>/dev/null || echo 'unknown')"
69
+ echo "[agent-browser] Installation complete"
70
+ echo ""
71
+ echo "Usage:"
72
+ echo " agent-browser open <url> # Open a page"
73
+ echo " agent-browser snapshot # Get accessibility tree"
74
+ echo " agent-browser screenshot # Capture screenshot"
75
+ echo " agent-browser close # Close browser"
76
+ echo ""
77
+ echo "Host Chrome connection (if container browser insufficient):"
78
+ echo " # Start Chrome on host with: chrome --remote-debugging-port=9222"
79
+ echo " agent-browser connect 9222"
@@ -0,0 +1,24 @@
1
+ # ast-grep (Feature)
2
+
3
+ Installs [ast-grep](https://ast-grep.github.io/) CLI via npm for structural code search, lint, and rewriting using AST matching.
4
+
5
+ ## Usage
6
+
7
+ ```json
8
+ {
9
+ "features": {
10
+ "./features/ast-grep": {}
11
+ }
12
+ }
13
+ ```
14
+
15
+ ## Options
16
+
17
+ | Option | Type | Default | Description |
18
+ |--------|------|---------|-------------|
19
+ | `version` | string | `latest` | @ast-grep/cli npm package version |
20
+ | `username` | string | `automatic` | Container user to install for |
21
+
22
+ ## Dependencies
23
+
24
+ Requires Node.js: `ghcr.io/devcontainers/features/node:1`
@@ -0,0 +1,24 @@
1
+ {
2
+ "id": "ast-grep",
3
+ "version": "1.0.0",
4
+ "name": "ast-grep",
5
+ "description": "Installs ast-grep CLI for structural code search, lint, and rewriting using AST matching",
6
+ "maintainer": "AnExiledDev",
7
+ "documentationURL": "https://ast-grep.github.io/",
8
+ "options": {
9
+ "version": {
10
+ "type": "string",
11
+ "description": "@ast-grep/cli npm package version (e.g., 'latest', '0.31.1')",
12
+ "default": "latest"
13
+ },
14
+ "username": {
15
+ "type": "string",
16
+ "description": "Container user to install for",
17
+ "default": "automatic"
18
+ }
19
+ },
20
+ "installsAfter": [
21
+ "ghcr.io/devcontainers/features/common-utils:2",
22
+ "ghcr.io/devcontainers/features/node:1"
23
+ ]
24
+ }
@@ -0,0 +1,51 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+
4
+ VERSION="${VERSION:-latest}"
5
+ USERNAME="${USERNAME:-automatic}"
6
+
7
+ echo "[ast-grep] Starting installation..."
8
+ echo "[ast-grep] Version: ${VERSION}"
9
+
10
+ # Source nvm if available
11
+ if [ -f /usr/local/share/nvm/nvm.sh ]; then
12
+ source /usr/local/share/nvm/nvm.sh
13
+ fi
14
+
15
+ # Validate npm is available
16
+ if ! command -v npm &>/dev/null; then
17
+ echo "[ast-grep] ERROR: npm not available"
18
+ echo " Ensure node feature is installed first"
19
+ exit 1
20
+ fi
21
+
22
+ # Detect user
23
+ if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
24
+ if [ -n "${_REMOTE_USER:-}" ]; then
25
+ USERNAME="${_REMOTE_USER}"
26
+ elif getent passwd vscode >/dev/null 2>&1; then
27
+ USERNAME="vscode"
28
+ elif getent passwd node >/dev/null 2>&1; then
29
+ USERNAME="node"
30
+ elif getent passwd codespace >/dev/null 2>&1; then
31
+ USERNAME="codespace"
32
+ else
33
+ USERNAME="root"
34
+ fi
35
+ fi
36
+
37
+ echo "[ast-grep] Installing for user: ${USERNAME}"
38
+
39
+ # Install via npm
40
+ if [ "${VERSION}" = "latest" ]; then
41
+ NPM_PACKAGE="@ast-grep/cli"
42
+ else
43
+ NPM_PACKAGE="@ast-grep/cli@${VERSION}"
44
+ fi
45
+
46
+ npm install -g "${NPM_PACKAGE}" 2>/dev/null || {
47
+ echo "[ast-grep] WARNING: Global install failed, trying user install"
48
+ su - "${USERNAME}" -c "npm install -g ${NPM_PACKAGE}" 2>/dev/null || true
49
+ }
50
+
51
+ echo "[ast-grep] Installed: $(ast-grep --version 2>/dev/null || echo 'unknown')"
@@ -0,0 +1,296 @@
1
+ # ccstatusline Feature
2
+
3
+ A DevContainer Feature that installs and configures [ccstatusline](https://github.com/sirmalloc/ccstatusline) - a compact powerline status line for Claude Code with essential metrics.
4
+
5
+ ## Quick Start
6
+
7
+ ```json
8
+ {
9
+ "features": {
10
+ "ghcr.io/devcontainers/features/node:1": {},
11
+ "ghcr.io/devcontainers/features/common-utils:2": {},
12
+ "./features/ccstatusline": {}
13
+ }
14
+ }
15
+ ```
16
+
17
+ **Note:** This feature requires Node.js and common-utils features to be installed first.
18
+
19
+ ## Options
20
+
21
+ | Option | Type | Default | Description |
22
+ |--------|------|---------|-------------|
23
+ | `username` | string | `automatic` | User to install for (auto-detects: vscode, node, codespace, or root) |
24
+
25
+ ## Display Format
26
+
27
+ ### Line 1: Core Metrics
28
+ ```
29
+ Model: Opus 4.1 ▶ Ctx: 58.5k ▶ main ▶ (+19, -2) ▶ v1.0.86
30
+ ```
31
+
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
+ ```
40
+ cwd: .../workspaces/project ▶ Cost: $0.39
41
+ ```
42
+
43
+ - **Working Directory** (gold bg, black text): Current directory path
44
+ - **Session Cost** (gold bg, black text, bold): Total session cost in USD
45
+
46
+ All widgets connected with powerline arrows for a seamless, professional appearance.
47
+
48
+ ## What This Feature Installs
49
+
50
+ - **ccstatusline npm package**: Installed on-demand via `npx` (not globally)
51
+ - **Configuration file**: `~/.config/ccstatusline/settings.json` with powerline theme
52
+ - **Claude Code integration**: Automatically updates `.claude/settings.json`
53
+ - **Disk Usage**: Minimal (~2MB when cached by npx)
54
+
55
+ ## Requirements
56
+
57
+ This feature has explicit dependencies that **must** be installed first:
58
+
59
+ ```json
60
+ {
61
+ "features": {
62
+ "ghcr.io/devcontainers/features/node:1": {},
63
+ "ghcr.io/devcontainers/features/common-utils:2": {},
64
+ "./features/ccstatusline": {}
65
+ }
66
+ }
67
+ ```
68
+
69
+ **Required:**
70
+ - **Node.js + npm/npx**: For running ccstatusline package
71
+ - **jq**: For safe JSON generation (from common-utils)
72
+
73
+ The feature will validate these are present and exit with an error if missing.
74
+
75
+ ## Features
76
+
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
81
+ - ✅ **Automatic Integration**: Auto-configures `.claude/settings.json`
82
+ - ✅ **Idempotent**: Safe to run multiple times
83
+ - ✅ **Multi-user**: Automatically detects container user
84
+
85
+ ## Post-Installation Steps
86
+
87
+ ### ✅ Configuration is Automatic
88
+
89
+ This feature automatically:
90
+ 1. Creates `~/.config/ccstatusline/settings.json` with powerline configuration
91
+ 2. Configures `.claude/settings.json` to use ccstatusline
92
+
93
+ **No manual steps required!**
94
+
95
+ ### Verify It Worked
96
+
97
+ **1. Check configuration:**
98
+ ```bash
99
+ cat ~/.config/ccstatusline/settings.json | jq .
100
+ ```
101
+
102
+ **2. Test manually:**
103
+ ```bash
104
+ echo '{"model":{"display_name":"Test Model"}}' | npx -y ccstatusline@latest
105
+ ```
106
+
107
+ You should see formatted output with powerline styling.
108
+
109
+ **3. Check Claude Code integration:**
110
+ ```bash
111
+ cat /workspaces/.claude/settings.json | jq '.statusLine'
112
+ ```
113
+
114
+ Should show:
115
+ ```json
116
+ {
117
+ "type": "command",
118
+ "command": "npx -y ccstatusline@latest"
119
+ }
120
+ ```
121
+
122
+ ## Customization
123
+
124
+ ### Modify Configuration After Installation
125
+
126
+ Edit the configuration file:
127
+ ```bash
128
+ vim ~/.config/ccstatusline/settings.json
129
+ ```
130
+
131
+ **Important:** Changes to runtime config are lost on container rebuild. To persist changes, modify the feature's `install.sh` file where the JSON is generated (lines 60-80).
132
+
133
+ ### Widget Configuration Format
134
+
135
+ Widgets are configured in the `lines` array:
136
+
137
+ ```json
138
+ {
139
+ "id": "unique-id",
140
+ "type": "widget-type",
141
+ "color": "#FFFFFF", // Foreground (hex)
142
+ "bgColor": "#000000", // Background (hex)
143
+ "bold": true // Optional: bold text
144
+ }
145
+ ```
146
+
147
+ ### Available Widget Types
148
+
149
+ **Session Metrics:**
150
+ - `model` - Current AI model
151
+ - `session-clock` - Session elapsed time
152
+ - `session-cost` - Total session cost (USD)
153
+ - `block-timer` - Block execution time
154
+ - `output-style` - Current output style
155
+
156
+ **Context Tracking:**
157
+ - `context-length` - Context window size
158
+ - `context-percentage` - Context usage percentage
159
+ - `context-percentage-usable` - Usable context percentage
160
+
161
+ **Token Metrics:**
162
+ - `tokens-input` - Input tokens
163
+ - `tokens-output` - Output tokens
164
+ - `tokens-cached` - Cached tokens
165
+ - `tokens-total` - Total tokens
166
+
167
+ **Git Integration:**
168
+ - `git-branch` - Current branch
169
+ - `git-changes` - Lines added/removed
170
+ - `git-worktree` - Git worktree info
171
+
172
+ **Other:**
173
+ - `cwd` - Current working directory
174
+ - `version` - Claude Code version
175
+ - `custom-text` - Static text
176
+ - `custom-command` - Command output
177
+
178
+ ### Color Scheme
179
+
180
+ The default powerline theme uses:
181
+
182
+ - **Maroon** (`#9B4F5C`): Model name - bold, authoritative
183
+ - **Gold** (`#FFD700`): Context, directory, cost - attention-grabbing
184
+ - **Blue** (`#4A90E2`): Git branch - clear, standard
185
+ - **Pink/Magenta** (`#D888C8`, `#E8A8C8`): Git changes and version - distinctive
186
+ - **White** (`#FFFFFF`): Text on dark backgrounds
187
+ - **Black** (`#1E1E1E`): Text on gold background
188
+
189
+ All colors selected for excellent readability on dark terminal themes with proper contrast ratios.
190
+
191
+ ## Troubleshooting
192
+
193
+ ### Status Line Doesn't Appear
194
+
195
+ **Symptom:** Claude Code starts but no status line visible
196
+
197
+ **Solution:**
198
+ ```bash
199
+ # 1. Verify config exists
200
+ cat ~/.config/ccstatusline/settings.json | jq .
201
+
202
+ # 2. Test manually
203
+ echo '{"model":{"display_name":"Test"}}' | npx -y ccstatusline@latest
204
+
205
+ # 3. Check Claude Code settings
206
+ cat /workspaces/.claude/settings.json | jq '.statusLine'
207
+
208
+ # 4. Manually run auto-config if needed
209
+ configure-ccstatusline-auto
210
+
211
+ # 5. Restart Claude Code
212
+ ```
213
+
214
+ ### Installation Fails: "npm/npx not available"
215
+
216
+ **Cause:** Node.js feature not installed first
217
+
218
+ **Solution:**
219
+ ```json
220
+ {
221
+ "features": {
222
+ "ghcr.io/devcontainers/features/node:1": {},
223
+ "./features/ccstatusline": {}
224
+ }
225
+ }
226
+ ```
227
+
228
+ ### Installation Fails: "jq not available"
229
+
230
+ **Cause:** common-utils feature not installed
231
+
232
+ **Solution:**
233
+ ```json
234
+ {
235
+ "features": {
236
+ "ghcr.io/devcontainers/features/common-utils:2": {},
237
+ "./features/ccstatusline": {}
238
+ }
239
+ }
240
+ ```
241
+
242
+ ### Display Issues (Broken Arrows, Colors)
243
+
244
+ **Cause:** Terminal doesn't support powerline fonts or truecolor
245
+
246
+ **Solutions:**
247
+ 1. Install powerline fonts in your terminal
248
+ 2. Check terminal supports 24-bit color (truecolor)
249
+ 3. For VS Code: Ensure using a powerline-compatible font like "Cascadia Code PL" or "MesloLGS NF"
250
+
251
+ ### Performance Issues (Slow Refresh)
252
+
253
+ **Cause:** `npx` downloads package on each run
254
+
255
+ **Solution:** Install globally for faster execution:
256
+ ```bash
257
+ npm install -g ccstatusline@latest
258
+ ```
259
+
260
+ Then update `.claude/settings.json`:
261
+ ```json
262
+ {
263
+ "statusLine": {
264
+ "type": "command",
265
+ "command": "ccstatusline"
266
+ }
267
+ }
268
+ ```
269
+
270
+ ### Permission Errors
271
+
272
+ **Symptom:** "Permission denied" on config file
273
+
274
+ **Solution:**
275
+ ```bash
276
+ # Check ownership
277
+ ls -la ~/.config/ccstatusline/settings.json
278
+
279
+ # Fix if needed (replace 'vscode' with your username)
280
+ sudo chown -R vscode:vscode ~/.config/ccstatusline/
281
+ ```
282
+
283
+ ## Resources
284
+
285
+ - [ccstatusline GitHub](https://github.com/sirmalloc/ccstatusline)
286
+ - [ccstatusline npm package](https://www.npmjs.com/package/ccstatusline)
287
+ - [Claude Code Documentation](https://docs.claude.com/en/docs/claude-code/statusline)
288
+ - [Powerline Fonts](https://github.com/powerline/fonts)
289
+
290
+ ## License
291
+
292
+ This feature configuration is MIT licensed. The ccstatusline package has its own license (see npm package).
293
+
294
+ ---
295
+
296
+ **Part of your DevContainer Features collection**
@@ -0,0 +1,19 @@
1
+ {
2
+ "id": "ccstatusline",
3
+ "version": "1.0.0",
4
+ "name": "ccstatusline",
5
+ "description": "Compact powerline status line for Claude Code with essential metrics",
6
+ "maintainer": "AnExiledDev",
7
+ "documentationURL": "https://github.com/sirmalloc/ccstatusline",
8
+ "options": {
9
+ "username": {
10
+ "type": "string",
11
+ "description": "Container user to install for",
12
+ "default": "automatic"
13
+ }
14
+ },
15
+ "installsAfter": [
16
+ "ghcr.io/devcontainers/features/node:1",
17
+ "ghcr.io/devcontainers/features/common-utils:2"
18
+ ]
19
+ }