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,138 @@
1
+ # Tree-sitter Parser Feature
2
+
3
+ Installs [tree-sitter](https://tree-sitter.github.io/tree-sitter/) parsing library with Node.js and Python bindings.
4
+
5
+ ## Usage
6
+
7
+ ```json
8
+ {
9
+ "features": {
10
+ "./features/tree-sitter": {}
11
+ }
12
+ }
13
+ ```
14
+
15
+ ## Options
16
+
17
+ | Option | Type | Default | Description |
18
+ |--------|------|---------|-------------|
19
+ | `version` | string | `latest` | tree-sitter version (e.g., `0.24.4`) |
20
+ | `bindings` | enum | `both` | Language bindings: `node`, `python`, `both`, `none` |
21
+ | `installCli` | boolean | `true` | Install tree-sitter CLI tool (requires Node.js) |
22
+ | `grammars` | string | `javascript,typescript,python` | Comma-separated grammars to preload |
23
+ | `username` | string | `automatic` | Container user to install for |
24
+
25
+ ## Examples
26
+
27
+ ### Default (CLI + Node + Python + JS/TS/Python grammars)
28
+
29
+ ```json
30
+ {
31
+ "features": {
32
+ "./features/tree-sitter": {}
33
+ }
34
+ }
35
+ ```
36
+
37
+ ### With Additional Grammars
38
+
39
+ ```json
40
+ {
41
+ "features": {
42
+ "./features/tree-sitter": {
43
+ "grammars": "javascript,typescript,python,rust,json"
44
+ }
45
+ }
46
+ }
47
+ ```
48
+
49
+ ### Node.js Only
50
+
51
+ ```json
52
+ {
53
+ "features": {
54
+ "./features/tree-sitter": {
55
+ "bindings": "node",
56
+ "grammars": "javascript,typescript"
57
+ }
58
+ }
59
+ }
60
+ ```
61
+
62
+ ### Python Only (No CLI)
63
+
64
+ ```json
65
+ {
66
+ "features": {
67
+ "./features/tree-sitter": {
68
+ "bindings": "python",
69
+ "installCli": false,
70
+ "grammars": "python"
71
+ }
72
+ }
73
+ }
74
+ ```
75
+
76
+ ## Installed Components
77
+
78
+ ### CLI (`installCli: true`)
79
+
80
+ - `tree-sitter` CLI installed via npm ([tree-sitter-cli](https://www.npmjs.com/package/tree-sitter-cli))
81
+ - Requires Node.js to be installed
82
+
83
+ ### Node.js Bindings (`bindings: "node"` or `"both"`)
84
+
85
+ - `web-tree-sitter` - WebAssembly-based tree-sitter for Node.js
86
+ - Grammar packages as `tree-sitter-{language}`
87
+
88
+ ### Python Bindings (`bindings: "python"` or `"both"`)
89
+
90
+ - `tree-sitter` - Python bindings package
91
+ - Grammar packages as `tree-sitter-{language}`
92
+
93
+ ## Available Grammars
94
+
95
+ Common grammars available via npm/pip:
96
+
97
+ - `javascript`, `typescript`, `tsx`
98
+ - `python`, `rust`, `c`, `cpp`
99
+ - `java`, `ruby`, `php`, `swift`
100
+ - `json`, `yaml`, `toml`, `html`, `css`
101
+ - `bash`, `markdown`, `regex`
102
+
103
+ ## Dependencies
104
+
105
+ This feature requires:
106
+
107
+ - **Node.js** (via `ghcr.io/devcontainers/features/node:1`) - required for CLI and Node bindings
108
+ - **Python** (via `ghcr.io/devcontainers/features/python:1`) - for Python bindings only
109
+
110
+ ## Quick Start
111
+
112
+ ### Node.js
113
+
114
+ ```javascript
115
+ const Parser = require('web-tree-sitter');
116
+
117
+ await Parser.init();
118
+ const parser = new Parser();
119
+
120
+ const JavaScript = await Parser.Language.load('path/to/tree-sitter-javascript.wasm');
121
+ parser.setLanguage(JavaScript);
122
+
123
+ const tree = parser.parse('const x = 1;');
124
+ console.log(tree.rootNode.toString());
125
+ ```
126
+
127
+ ### Python
128
+
129
+ ```python
130
+ import tree_sitter_python as tspython
131
+ from tree_sitter import Language, Parser
132
+
133
+ PY_LANGUAGE = Language(tspython.language())
134
+ parser = Parser(PY_LANGUAGE)
135
+
136
+ tree = parser.parse(b"def hello(): pass")
137
+ print(tree.root_node.sexp())
138
+ ```
@@ -0,0 +1,52 @@
1
+ {
2
+ "id": "tree-sitter",
3
+ "version": "1.1.0",
4
+ "name": "Tree-sitter Parser",
5
+ "description": "Installs tree-sitter CLI (via npm) and parsing library with Node.js and Python bindings",
6
+ "maintainer": "AnExiledDev",
7
+ "documentationURL": "https://tree-sitter.github.io/tree-sitter/",
8
+ "options": {
9
+ "version": {
10
+ "type": "string",
11
+ "description": "tree-sitter-cli npm package version (e.g., 'latest', '0.24.4')",
12
+ "default": "latest"
13
+ },
14
+ "bindings": {
15
+ "type": "string",
16
+ "description": "Language bindings to install (node, python, both, none)",
17
+ "default": "both",
18
+ "enum": [
19
+ "node",
20
+ "python",
21
+ "both",
22
+ "none"
23
+ ],
24
+ "proposals": [
25
+ "node",
26
+ "python",
27
+ "both",
28
+ "none"
29
+ ]
30
+ },
31
+ "installCli": {
32
+ "type": "boolean",
33
+ "description": "Install tree-sitter CLI tool (requires Node.js)",
34
+ "default": true
35
+ },
36
+ "grammars": {
37
+ "type": "string",
38
+ "description": "Comma-separated list of grammars to preload (e.g., 'javascript,python,rust'). Empty for none.",
39
+ "default": "javascript,typescript,python"
40
+ },
41
+ "username": {
42
+ "type": "string",
43
+ "description": "Container user to install for",
44
+ "default": "automatic"
45
+ }
46
+ },
47
+ "installsAfter": [
48
+ "ghcr.io/devcontainers/features/common-utils:2",
49
+ "ghcr.io/devcontainers/features/node:1",
50
+ "ghcr.io/devcontainers/features/python:1"
51
+ ]
52
+ }
@@ -0,0 +1,173 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+
4
+ # === IMPORT OPTIONS ===
5
+ # DevContainer converts camelCase to UPPERCASE without underscores
6
+ VERSION="${VERSION:-latest}"
7
+ BINDINGS="${BINDINGS:-both}"
8
+ INSTALL_CLI="${INSTALLCLI:-true}"
9
+ GRAMMARS="${GRAMMARS:-}"
10
+ USERNAME="${USERNAME:-automatic}"
11
+
12
+ echo "[tree-sitter] Starting tree-sitter installation..."
13
+ echo "[tree-sitter] Options: version=${VERSION}, bindings=${BINDINGS}, cli=${INSTALL_CLI}"
14
+
15
+ # === SOURCE NVM ===
16
+ if [ -f /usr/local/share/nvm/nvm.sh ]; then
17
+ source /usr/local/share/nvm/nvm.sh
18
+ fi
19
+
20
+ # === VALIDATE BINDINGS OPTION ===
21
+ if [[ ! "${BINDINGS}" =~ ^(node|python|both|none)$ ]]; then
22
+ echo "[tree-sitter] ERROR: bindings must be 'node', 'python', 'both', or 'none'"
23
+ echo " Provided: ${BINDINGS}"
24
+ exit 1
25
+ fi
26
+
27
+ # === VALIDATE DEPENDENCIES ===
28
+ NEED_NODE=false
29
+ NEED_PYTHON=false
30
+
31
+ if [ "${BINDINGS}" = "node" ] || [ "${BINDINGS}" = "both" ]; then
32
+ NEED_NODE=true
33
+ fi
34
+ if [ "${BINDINGS}" = "python" ] || [ "${BINDINGS}" = "both" ]; then
35
+ NEED_PYTHON=true
36
+ fi
37
+
38
+ # CLI installation requires npm
39
+ if [ "${INSTALL_CLI}" = "true" ]; then
40
+ NEED_NODE=true
41
+ fi
42
+
43
+ if [ "${NEED_NODE}" = "true" ]; then
44
+ if ! command -v npm &>/dev/null; then
45
+ echo "[tree-sitter] ERROR: npm not available but required for CLI or node bindings"
46
+ echo " Ensure node feature is installed first"
47
+ exit 1
48
+ fi
49
+ echo "[tree-sitter] Node.js: $(node --version)"
50
+ fi
51
+
52
+ if [ "${NEED_PYTHON}" = "true" ]; then
53
+ if ! command -v pip &>/dev/null && ! command -v pip3 &>/dev/null; then
54
+ echo "[tree-sitter] ERROR: pip not available but python bindings requested"
55
+ echo " Ensure python feature is installed first"
56
+ exit 1
57
+ fi
58
+ echo "[tree-sitter] Python: $(python3 --version)"
59
+ fi
60
+
61
+ # === DETECT USER ===
62
+ if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
63
+ if [ -n "${_REMOTE_USER:-}" ]; then
64
+ USERNAME="${_REMOTE_USER}"
65
+ elif getent passwd vscode >/dev/null 2>&1; then
66
+ USERNAME="vscode"
67
+ elif getent passwd node >/dev/null 2>&1; then
68
+ USERNAME="node"
69
+ elif getent passwd codespace >/dev/null 2>&1; then
70
+ USERNAME="codespace"
71
+ else
72
+ USERNAME="root"
73
+ fi
74
+ fi
75
+
76
+ if [ "${USERNAME}" = "root" ]; then
77
+ USER_HOME="/root"
78
+ else
79
+ USER_HOME=$(getent passwd "${USERNAME}" | cut -d: -f6)
80
+ fi
81
+
82
+ echo "[tree-sitter] Installing for user: ${USERNAME} (home: ${USER_HOME})"
83
+
84
+ # === INSTALL CLI VIA NPM ===
85
+ if [ "${INSTALL_CLI}" = "true" ]; then
86
+ echo "[tree-sitter] Installing tree-sitter CLI via npm..."
87
+
88
+ # Build version specifier
89
+ if [ "${VERSION}" = "latest" ]; then
90
+ NPM_PACKAGE="tree-sitter-cli"
91
+ else
92
+ NPM_PACKAGE="tree-sitter-cli@${VERSION}"
93
+ fi
94
+
95
+ npm install -g "${NPM_PACKAGE}" 2>/dev/null || {
96
+ echo "[tree-sitter] WARNING: Global npm install failed, trying user install"
97
+ su - "${USERNAME}" -c "npm install -g ${NPM_PACKAGE}" 2>/dev/null || true
98
+ }
99
+
100
+ echo "[tree-sitter] CLI installed: $(tree-sitter --version 2>/dev/null || echo 'unknown')"
101
+ fi
102
+
103
+ # === INSTALL NODE BINDINGS ===
104
+ if [ "${BINDINGS}" = "node" ] || [ "${BINDINGS}" = "both" ]; then
105
+ echo "[tree-sitter] Installing Node.js bindings..."
106
+
107
+ # Install web-tree-sitter for runtime parsing
108
+ npm install -g web-tree-sitter 2>/dev/null || {
109
+ echo "[tree-sitter] WARNING: Global npm install failed, trying user install"
110
+ su - "${USERNAME}" -c "npm install -g web-tree-sitter" 2>/dev/null || true
111
+ }
112
+
113
+ # Install grammars if specified
114
+ if [ -n "${GRAMMARS}" ]; then
115
+ echo "[tree-sitter] Installing Node.js grammars: ${GRAMMARS}"
116
+ IFS=',' read -ra GRAMMAR_LIST <<< "${GRAMMARS}"
117
+ for grammar in "${GRAMMAR_LIST[@]}"; do
118
+ grammar=$(echo "${grammar}" | xargs) # trim whitespace
119
+ if [ -n "${grammar}" ]; then
120
+ npm install -g "tree-sitter-${grammar}" 2>/dev/null || {
121
+ echo "[tree-sitter] WARNING: Failed to install grammar: ${grammar}"
122
+ }
123
+ fi
124
+ done
125
+ fi
126
+
127
+ echo "[tree-sitter] Node.js bindings installed"
128
+ fi
129
+
130
+ # === INSTALL PYTHON BINDINGS ===
131
+ if [ "${NEED_PYTHON}" = "true" ]; then
132
+ echo "[tree-sitter] Installing Python bindings..."
133
+
134
+ # Use pip3 with --break-system-packages for system python
135
+ PIP_CMD="pip3"
136
+ if command -v pip &>/dev/null; then
137
+ PIP_CMD="pip"
138
+ fi
139
+
140
+ # Install tree-sitter python package
141
+ ${PIP_CMD} install --break-system-packages tree-sitter 2>/dev/null || \
142
+ ${PIP_CMD} install tree-sitter 2>/dev/null || {
143
+ echo "[tree-sitter] WARNING: System pip install failed, trying user install"
144
+ su - "${USERNAME}" -c "${PIP_CMD} install --user tree-sitter" 2>/dev/null || true
145
+ }
146
+
147
+ # Install grammars if specified
148
+ if [ -n "${GRAMMARS}" ]; then
149
+ echo "[tree-sitter] Installing Python grammars: ${GRAMMARS}"
150
+ IFS=',' read -ra GRAMMAR_LIST <<< "${GRAMMARS}"
151
+ for grammar in "${GRAMMAR_LIST[@]}"; do
152
+ grammar=$(echo "${grammar}" | xargs) # trim whitespace
153
+ if [ -n "${grammar}" ]; then
154
+ ${PIP_CMD} install --break-system-packages "tree-sitter-${grammar}" 2>/dev/null || \
155
+ ${PIP_CMD} install "tree-sitter-${grammar}" 2>/dev/null || {
156
+ echo "[tree-sitter] WARNING: Failed to install grammar: ${grammar}"
157
+ }
158
+ fi
159
+ done
160
+ fi
161
+
162
+ echo "[tree-sitter] Python bindings installed"
163
+ fi
164
+
165
+ # === SUMMARY ===
166
+ echo ""
167
+ echo "[tree-sitter] Installation complete!"
168
+ echo " CLI: $(command -v tree-sitter &>/dev/null && echo "installed ($(tree-sitter --version 2>/dev/null || echo 'unknown'))" || echo "not installed")"
169
+ echo " Node.js: $([ "${NEED_NODE}" = "true" ] && echo "installed" || echo "skipped")"
170
+ echo " Python: $([ "${NEED_PYTHON}" = "true" ] && echo "installed" || echo "skipped")"
171
+ if [ -n "${GRAMMARS}" ]; then
172
+ echo " Grammars: ${GRAMMARS}"
173
+ fi
@@ -0,0 +1,106 @@
1
+ {
2
+ "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
3
+ "name": "devs-marketplace",
4
+ "description": "CodeForge plugin marketplace for development tools",
5
+ "owner": {
6
+ "name": "AnExiledDev"
7
+ },
8
+ "plugins": [
9
+ {
10
+ "name": "codeforge-lsp",
11
+ "description": "LSP servers for CodeForge (Python, TypeScript, Go)",
12
+ "version": "1.0.0",
13
+ "source": "./plugins/codeforge-lsp",
14
+ "category": "development",
15
+ "lspServers": {
16
+ "pyright": {
17
+ "command": "pyright-langserver",
18
+ "args": ["--stdio"],
19
+ "extensionToLanguage": {
20
+ ".py": "python",
21
+ ".pyi": "python"
22
+ }
23
+ },
24
+ "typescript": {
25
+ "command": "typescript-language-server",
26
+ "args": ["--stdio"],
27
+ "extensionToLanguage": {
28
+ ".ts": "typescript",
29
+ ".tsx": "typescriptreact",
30
+ ".js": "javascript",
31
+ ".jsx": "javascriptreact",
32
+ ".mts": "typescript",
33
+ ".cts": "typescript",
34
+ ".mjs": "javascript",
35
+ ".cjs": "javascript"
36
+ }
37
+ },
38
+ "gopls": {
39
+ "command": "gopls",
40
+ "args": ["serve"],
41
+ "extensionToLanguage": {
42
+ ".go": "go",
43
+ ".mod": "go.mod",
44
+ ".sum": "go.sum"
45
+ }
46
+ }
47
+ }
48
+ },
49
+ {
50
+ "name": "ticket-workflow",
51
+ "description": "EARS-based ticket workflow with GitHub integration",
52
+ "version": "1.0.0",
53
+ "source": "./plugins/ticket-workflow",
54
+ "category": "workflow"
55
+ },
56
+ {
57
+ "name": "notify-hook",
58
+ "description": "Desktop notifications and audio chime when Claude finishes responding",
59
+ "version": "1.0.0",
60
+ "source": "./plugins/notify-hook",
61
+ "category": "productivity"
62
+ },
63
+ {
64
+ "name": "planning-reminder",
65
+ "description": "Encourages plan-before-implement workflow",
66
+ "version": "1.0.0",
67
+ "source": "./plugins/planning-reminder",
68
+ "category": "workflow"
69
+ },
70
+ {
71
+ "name": "dangerous-command-blocker",
72
+ "description": "Blocks dangerous bash commands (rm -rf, sudo rm, chmod 777, force push)",
73
+ "version": "1.0.0",
74
+ "source": "./plugins/dangerous-command-blocker",
75
+ "category": "safety"
76
+ },
77
+ {
78
+ "name": "protected-files-guard",
79
+ "description": "Blocks modifications to .env, lock files, .git/, and credentials",
80
+ "version": "1.0.0",
81
+ "source": "./plugins/protected-files-guard",
82
+ "category": "safety"
83
+ },
84
+ {
85
+ "name": "auto-formatter",
86
+ "description": "Auto-formats files after editing (black for Python, gofmt for Go)",
87
+ "version": "1.0.0",
88
+ "source": "./plugins/auto-formatter",
89
+ "category": "development"
90
+ },
91
+ {
92
+ "name": "auto-linter",
93
+ "description": "Auto-lints files after editing (pyright for Python)",
94
+ "version": "1.0.0",
95
+ "source": "./plugins/auto-linter",
96
+ "category": "development"
97
+ },
98
+ {
99
+ "name": "codedirective-skills",
100
+ "description": "Coding standards and skills for the CodeDirective project",
101
+ "version": "1.0.0",
102
+ "source": "./plugins/codedirective-skills",
103
+ "category": "development"
104
+ }
105
+ ]
106
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "auto-formatter",
3
+ "description": "Auto-formats files after editing (black for Python, gofmt for Go)",
4
+ "author": {
5
+ "name": "AnExiledDev"
6
+ }
7
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "description": "Auto-format files after editing",
3
+ "hooks": {
4
+ "PostToolUse": [
5
+ {
6
+ "matcher": "Edit|Write",
7
+ "hooks": [
8
+ {
9
+ "type": "command",
10
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/format-file.py",
11
+ "timeout": 30
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
17
+ }
@@ -0,0 +1,101 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Auto-format files after editing.
4
+
5
+ Reads tool input from stdin, detects file type by extension,
6
+ runs appropriate formatter if available.
7
+ Outputs JSON with additionalContext on success.
8
+ Non-blocking: exit 0 regardless of formatting result.
9
+ """
10
+
11
+ import json
12
+ import os
13
+ import subprocess
14
+ import sys
15
+ from pathlib import Path
16
+
17
+ # Formatter configuration: extension -> (command, args, name)
18
+ FORMATTERS = {
19
+ ".py": ("/usr/local/py-utils/bin/black", ["--quiet"], "Black"),
20
+ ".pyi": ("/usr/local/py-utils/bin/black", ["--quiet"], "Black"),
21
+ ".go": ("/usr/local/go/bin/gofmt", ["-w"], "gofmt"),
22
+ }
23
+
24
+
25
+ def get_formatter(file_path: str) -> tuple[str, list[str], str] | None:
26
+ """Get formatter config for file extension."""
27
+ ext = Path(file_path).suffix.lower()
28
+ return FORMATTERS.get(ext)
29
+
30
+
31
+ def format_file(file_path: str) -> tuple[bool, str]:
32
+ """Run formatter on file.
33
+
34
+ Returns:
35
+ (success, message)
36
+ """
37
+ formatter = get_formatter(file_path)
38
+ if formatter is None:
39
+ return True, "" # No formatter available, that's OK
40
+
41
+ cmd_path, args, name = formatter
42
+
43
+ # Check if formatter exists
44
+ if not os.path.exists(cmd_path):
45
+ return True, f"[Auto-formatter] {name} not found, skipping"
46
+
47
+ # Check if file exists
48
+ if not os.path.exists(file_path):
49
+ return True, ""
50
+
51
+ try:
52
+ # Run formatter
53
+ cmd = [cmd_path] + args + [file_path]
54
+ result = subprocess.run(
55
+ cmd,
56
+ capture_output=True,
57
+ text=True,
58
+ timeout=25
59
+ )
60
+
61
+ if result.returncode == 0:
62
+ return True, f"[Auto-formatter] Formatted with {name}"
63
+ else:
64
+ # Formatting failed, but don't block
65
+ error = result.stderr.strip() if result.stderr else "Unknown error"
66
+ return True, f"[Auto-formatter] {name} warning: {error}"
67
+
68
+ except subprocess.TimeoutExpired:
69
+ return True, f"[Auto-formatter] {name} timed out"
70
+ except Exception as e:
71
+ return True, f"[Auto-formatter] Error: {e}"
72
+
73
+
74
+ def main():
75
+ try:
76
+ input_data = json.load(sys.stdin)
77
+ tool_input = input_data.get("tool_input", {})
78
+ file_path = tool_input.get("file_path", "")
79
+
80
+ if not file_path:
81
+ sys.exit(0)
82
+
83
+ _, message = format_file(file_path)
84
+
85
+ if message:
86
+ # Output context for Claude
87
+ print(json.dumps({
88
+ "additionalContext": message
89
+ }))
90
+
91
+ sys.exit(0)
92
+
93
+ except json.JSONDecodeError:
94
+ sys.exit(0)
95
+ except Exception as e:
96
+ print(f"Hook error: {e}", file=sys.stderr)
97
+ sys.exit(0)
98
+
99
+
100
+ if __name__ == "__main__":
101
+ main()
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "auto-linter",
3
+ "description": "Auto-lints files after editing (pyright for Python)",
4
+ "author": {
5
+ "name": "AnExiledDev"
6
+ }
7
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "description": "Auto-lint files after editing",
3
+ "hooks": {
4
+ "PostToolUse": [
5
+ {
6
+ "matcher": "Edit|Write",
7
+ "hooks": [
8
+ {
9
+ "type": "command",
10
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/lint-file.py",
11
+ "timeout": 60
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
17
+ }