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.
- package/.devcontainer/.env +22 -0
- package/.devcontainer/CHANGELOG.md +197 -0
- package/.devcontainer/CLAUDE.md +117 -0
- package/.devcontainer/README.md +222 -0
- package/.devcontainer/config/main-system-prompt.md +502 -0
- package/.devcontainer/config/settings.json +47 -0
- package/.devcontainer/devcontainer.json +94 -0
- package/.devcontainer/features/README.md +113 -0
- package/.devcontainer/features/agent-browser/README.md +65 -0
- package/.devcontainer/features/agent-browser/devcontainer-feature.json +23 -0
- package/.devcontainer/features/agent-browser/install.sh +79 -0
- package/.devcontainer/features/ast-grep/README.md +24 -0
- package/.devcontainer/features/ast-grep/devcontainer-feature.json +24 -0
- package/.devcontainer/features/ast-grep/install.sh +51 -0
- package/.devcontainer/features/ccstatusline/README.md +296 -0
- package/.devcontainer/features/ccstatusline/devcontainer-feature.json +19 -0
- package/.devcontainer/features/ccstatusline/install.sh +290 -0
- package/.devcontainer/features/ccusage/README.md +205 -0
- package/.devcontainer/features/ccusage/devcontainer-feature.json +38 -0
- package/.devcontainer/features/ccusage/install.sh +132 -0
- package/.devcontainer/features/claude-code/README.md +498 -0
- package/.devcontainer/features/claude-code/config/settings.json +36 -0
- package/.devcontainer/features/claude-code/config/system-prompt.md +118 -0
- package/.devcontainer/features/claude-code/config/world-building-sp.md +1432 -0
- package/.devcontainer/features/claude-code/devcontainer-feature.json +42 -0
- package/.devcontainer/features/claude-code/install.sh +466 -0
- package/.devcontainer/features/claude-monitor/README.md +74 -0
- package/.devcontainer/features/claude-monitor/devcontainer-feature.json +38 -0
- package/.devcontainer/features/claude-monitor/install.sh +99 -0
- package/.devcontainer/features/lsp-servers/README.md +85 -0
- package/.devcontainer/features/lsp-servers/devcontainer-feature.json +40 -0
- package/.devcontainer/features/lsp-servers/install.sh +116 -0
- package/.devcontainer/features/mcp-qdrant/CHANGES.md +399 -0
- package/.devcontainer/features/mcp-qdrant/README.md +474 -0
- package/.devcontainer/features/mcp-qdrant/devcontainer-feature.json +57 -0
- package/.devcontainer/features/mcp-qdrant/install.sh +295 -0
- package/.devcontainer/features/mcp-qdrant/poststart-hook.sh +129 -0
- package/.devcontainer/features/mcp-reasoner/README.md +177 -0
- package/.devcontainer/features/mcp-reasoner/devcontainer-feature.json +20 -0
- package/.devcontainer/features/mcp-reasoner/install.sh +177 -0
- package/.devcontainer/features/mcp-reasoner/poststart-hook.sh +67 -0
- package/.devcontainer/features/notify-hook/README.md +86 -0
- package/.devcontainer/features/notify-hook/devcontainer-feature.json +23 -0
- package/.devcontainer/features/notify-hook/install.sh +38 -0
- package/.devcontainer/features/splitrail/README.md +140 -0
- package/.devcontainer/features/splitrail/devcontainer-feature.json +34 -0
- package/.devcontainer/features/splitrail/install.sh +129 -0
- package/.devcontainer/features/tree-sitter/README.md +138 -0
- package/.devcontainer/features/tree-sitter/devcontainer-feature.json +52 -0
- package/.devcontainer/features/tree-sitter/install.sh +173 -0
- package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +106 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/hooks/hooks.json +17 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/scripts/format-file.py +101 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/hooks/hooks.json +17 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/scripts/lint-file.py +137 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/.claude-plugin/plugin.json +8 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/claude-code-headless/SKILL.md +387 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/claude-code-headless/references/cli-flags-and-output.md +312 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/claude-code-headless/references/sdk-and-mcp.md +569 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker/SKILL.md +309 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker/references/compose-services.md +438 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker/references/dockerfile-patterns.md +340 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker-py/SKILL.md +412 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker-py/references/container-lifecycle.md +388 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker-py/references/resources-and-security.md +444 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/fastapi/SKILL.md +344 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/fastapi/references/middleware-and-lifespan.md +254 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/fastapi/references/pydantic-models.md +245 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/fastapi/references/routing-and-dependencies.md +255 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/fastapi/references/sse-and-streaming.md +318 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/pydantic-ai/SKILL.md +345 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/pydantic-ai/references/agents-and-tools.md +271 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/pydantic-ai/references/models-and-streaming.md +422 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/skill-building/SKILL.md +220 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/skill-building/references/cross-vendor-principles.md +139 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/skill-building/references/patterns-and-antipatterns.md +376 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/skill-building/references/skill-authoring-patterns.md +356 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/sqlite/SKILL.md +329 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/sqlite/references/advanced-queries.md +314 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/sqlite/references/javascript-patterns.md +323 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/sqlite/references/python-patterns.md +354 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/sqlite/references/schema-and-pragmas.md +326 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/SKILL.md +356 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/ai-sdk-svelte.md +128 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/component-patterns.md +332 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/layercake.md +203 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/migration-guide.md +350 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/runes-and-reactivity.md +328 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/spa-and-routing.md +262 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/svelte-dnd-action.md +181 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/testing/SKILL.md +414 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/testing/references/fastapi-testing.md +411 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/testing/references/svelte-testing.md +538 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/codeforge-lsp/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/hooks/hooks.json +17 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/scripts/block-dangerous.py +110 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/notify-hook/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/notify-hook/hooks/hooks.json +17 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/planning-reminder/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/planning-reminder/hooks/hooks.json +17 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/.claude-plugin/plugin.json +7 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/hooks/hooks.json +17 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected.py +108 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/commands/ticket/357/200/272create-pr.md +337 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/commands/ticket/357/200/272new.md +166 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/commands/ticket/357/200/272review-commit.md +290 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/commands/ticket/357/200/272work.md +257 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/plugin.json +8 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/system-prompt.md +184 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/.claude-plugin/plugin.json +6 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/config/planning-instructions.md +14 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/functional-conjuring-map.md +989 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/hooks/hooks.json +33 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/__pycache__/post-enhance-task.cpython-314.pyc +0 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/enhance-planning.py +71 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/enhancers/enhance-plan.sh +68 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/enhancers/enhance-task.sh +120 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/post-enhance-plan.py +133 -0
- package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/post-enhance-task.py +253 -0
- package/.devcontainer/scripts/setup-aliases.sh +80 -0
- package/.devcontainer/scripts/setup-config.sh +28 -0
- package/.devcontainer/scripts/setup-irie-claude.sh +32 -0
- package/.devcontainer/scripts/setup-plugins.sh +80 -0
- package/.devcontainer/scripts/setup.sh +58 -0
- package/LICENSE.txt +674 -0
- package/README.md +267 -0
- package/package.json +44 -0
- package/setup.js +83 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Setup claude/cc functions for claude with local system prompt support
|
|
3
|
+
|
|
4
|
+
CLAUDE_DIR="${CLAUDE_CONFIG_DIR:?CLAUDE_CONFIG_DIR not set}"
|
|
5
|
+
|
|
6
|
+
echo "[setup-aliases] Configuring Claude aliases..."
|
|
7
|
+
|
|
8
|
+
# Shared function for claude with local config (used by both cc and claude)
|
|
9
|
+
CLAUDE_FUNCTION='_claude_with_config() {
|
|
10
|
+
local LOCAL_PROMPT=".claude/system-prompt.md"
|
|
11
|
+
local DEFAULT_PROMPT="/workspaces/.devcontainer/config/main-system-prompt.md"
|
|
12
|
+
local LOCAL_SETTINGS=".claude/settings.json"
|
|
13
|
+
local DEFAULT_SETTINGS="/workspaces/.devcontainer/config/settings.json"
|
|
14
|
+
|
|
15
|
+
mkdir -p .claude
|
|
16
|
+
|
|
17
|
+
if [ ! -f "$LOCAL_PROMPT" ]; then
|
|
18
|
+
cp "$DEFAULT_PROMPT" "$LOCAL_PROMPT"
|
|
19
|
+
echo "[claude] Created $LOCAL_PROMPT from default"
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
if [ ! -f "$LOCAL_SETTINGS" ]; then
|
|
23
|
+
cp "$DEFAULT_SETTINGS" "$LOCAL_SETTINGS"
|
|
24
|
+
echo "[claude] Created $LOCAL_SETTINGS from default"
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
command claude --system-prompt-file "$LOCAL_PROMPT" --permission-mode plan --allow-dangerously-skip-permissions "$@"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
# cc: shorthand for claude with config
|
|
31
|
+
cc() { _claude_with_config "$@"; }
|
|
32
|
+
|
|
33
|
+
# claude: override to use config (use ccraw for vanilla)
|
|
34
|
+
claude() { _claude_with_config "$@"; }
|
|
35
|
+
|
|
36
|
+
# ccraw: vanilla claude without any config
|
|
37
|
+
alias ccraw="command claude"'
|
|
38
|
+
|
|
39
|
+
for rc in ~/.bashrc ~/.zshrc; do
|
|
40
|
+
if [ -f "$rc" ]; then
|
|
41
|
+
# Remove old cc alias/function if present
|
|
42
|
+
if grep -q "alias cc=" "$rc" 2>/dev/null; then
|
|
43
|
+
sed -i '/alias cc=/d' "$rc"
|
|
44
|
+
echo "[setup-aliases] Removed old cc alias from $(basename $rc)"
|
|
45
|
+
fi
|
|
46
|
+
if grep -q "^cc()" "$rc" 2>/dev/null; then
|
|
47
|
+
# Remove old cc function (multi-line)
|
|
48
|
+
sed -i '/^cc() {/,/^}/d' "$rc"
|
|
49
|
+
echo "[setup-aliases] Removed old cc function from $(basename $rc)"
|
|
50
|
+
fi
|
|
51
|
+
# Remove old specwright alias if present
|
|
52
|
+
if grep -q "alias specwright=" "$rc" 2>/dev/null; then
|
|
53
|
+
sed -i '/alias specwright=/d' "$rc"
|
|
54
|
+
echo "[setup-aliases] Removed specwright alias from $(basename $rc)"
|
|
55
|
+
fi
|
|
56
|
+
# Remove old _claude_with_config function if present
|
|
57
|
+
if grep -q "^_claude_with_config()" "$rc" 2>/dev/null; then
|
|
58
|
+
sed -i '/^_claude_with_config() {/,/^}/d' "$rc"
|
|
59
|
+
fi
|
|
60
|
+
# Remove old claude function override if present
|
|
61
|
+
if grep -q "^claude() {" "$rc" 2>/dev/null; then
|
|
62
|
+
sed -i '/^claude() { _claude_with_config/d' "$rc"
|
|
63
|
+
fi
|
|
64
|
+
# Remove old ccraw alias if present
|
|
65
|
+
if grep -q "alias ccraw=" "$rc" 2>/dev/null; then
|
|
66
|
+
sed -i '/alias ccraw=/d' "$rc"
|
|
67
|
+
fi
|
|
68
|
+
# Add functions if not present
|
|
69
|
+
if ! grep -q "^_claude_with_config()" "$rc" 2>/dev/null; then
|
|
70
|
+
echo "" >> "$rc"
|
|
71
|
+
echo "$CLAUDE_FUNCTION" >> "$rc"
|
|
72
|
+
echo "[setup-aliases] Added claude functions to $(basename $rc)"
|
|
73
|
+
fi
|
|
74
|
+
fi
|
|
75
|
+
done
|
|
76
|
+
|
|
77
|
+
echo "[setup-aliases] Aliases configured:"
|
|
78
|
+
echo " claude -> claude with local .claude/system-prompt.md (auto-created from defaults)"
|
|
79
|
+
echo " cc -> shorthand for claude with config"
|
|
80
|
+
echo " ccraw -> vanilla claude without any config"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Copy Claude configuration files to workspace
|
|
3
|
+
|
|
4
|
+
CONFIG_DIR="${CONFIG_SOURCE_DIR:?CONFIG_SOURCE_DIR not set}"
|
|
5
|
+
TARGET_DIR="${CLAUDE_CONFIG_DIR:?CLAUDE_CONFIG_DIR not set}"
|
|
6
|
+
OVERWRITE="${OVERWRITE_CONFIG:-false}"
|
|
7
|
+
|
|
8
|
+
echo "[setup-config] Copying configuration files..."
|
|
9
|
+
[ "$OVERWRITE" = "true" ] && echo "[setup-config] Overwrite mode enabled"
|
|
10
|
+
|
|
11
|
+
mkdir -p "$TARGET_DIR"
|
|
12
|
+
|
|
13
|
+
copy_file() {
|
|
14
|
+
local file="$1"
|
|
15
|
+
if [ -f "$CONFIG_DIR/$file" ]; then
|
|
16
|
+
if [ "$OVERWRITE" = "true" ] || [ ! -f "$TARGET_DIR/$file" ]; then
|
|
17
|
+
cp "$CONFIG_DIR/$file" "$TARGET_DIR/$file"
|
|
18
|
+
echo "[setup-config] Copied $file"
|
|
19
|
+
else
|
|
20
|
+
echo "[setup-config] $file already exists, skipping"
|
|
21
|
+
fi
|
|
22
|
+
fi
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
copy_file "settings.json"
|
|
26
|
+
copy_file "main-system-prompt.md"
|
|
27
|
+
|
|
28
|
+
echo "[setup-config] Configuration complete"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# setup-irie-claude.sh
|
|
3
|
+
# Copies commands and agents from irie project to workspace .claude directory.
|
|
4
|
+
# This script is only for AnExiledDev's setup.
|
|
5
|
+
|
|
6
|
+
IRIE_CLAUDE="/workspaces/projects/irie/.claude"
|
|
7
|
+
WORKSPACE_CLAUDE="/workspaces/.claude"
|
|
8
|
+
|
|
9
|
+
# Fail gracefully if irie doesn't exist
|
|
10
|
+
if [[ ! -d "/workspaces/projects/irie" ]]; then
|
|
11
|
+
echo "┌─────────────────────────────────────────────────────────┐"
|
|
12
|
+
echo "│ Note: /workspaces/projects/irie not found. │"
|
|
13
|
+
echo "│ Failure is expected - this script is only for AnExiledDev│"
|
|
14
|
+
echo "└─────────────────────────────────────────────────────────┘"
|
|
15
|
+
exit 0
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
# Copy commands if source exists
|
|
19
|
+
if [[ -d "$IRIE_CLAUDE/commands" ]]; then
|
|
20
|
+
mkdir -p "$WORKSPACE_CLAUDE/commands"
|
|
21
|
+
cp -f "$IRIE_CLAUDE/commands/"* "$WORKSPACE_CLAUDE/commands/" 2>/dev/null
|
|
22
|
+
echo "Copied irie commands to workspace .claude"
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
# Copy agents if source exists
|
|
26
|
+
if [[ -d "$IRIE_CLAUDE/agents" ]]; then
|
|
27
|
+
mkdir -p "$WORKSPACE_CLAUDE/agents"
|
|
28
|
+
cp -f "$IRIE_CLAUDE/agents/"* "$WORKSPACE_CLAUDE/agents/" 2>/dev/null
|
|
29
|
+
echo "Copied irie agents to workspace .claude"
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
echo "irie .claude sync complete"
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Install plugins: official Anthropic + local devs-marketplace
|
|
3
|
+
|
|
4
|
+
echo "[setup-plugins] Installing plugins..."
|
|
5
|
+
|
|
6
|
+
# --- Official Anthropic Plugins ---
|
|
7
|
+
OFFICIAL_PLUGINS=(
|
|
8
|
+
"frontend-design@claude-plugins-official"
|
|
9
|
+
"svelte@sveltejs/mcp"
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
for plugin in "${OFFICIAL_PLUGINS[@]}"; do
|
|
13
|
+
echo "[setup-plugins] Installing $plugin..."
|
|
14
|
+
if claude plugin install "$plugin" 2>/dev/null; then
|
|
15
|
+
echo "[setup-plugins] Installed: $plugin"
|
|
16
|
+
else
|
|
17
|
+
echo "[setup-plugins] Warning: Failed to install $plugin (may already exist)"
|
|
18
|
+
fi
|
|
19
|
+
done
|
|
20
|
+
|
|
21
|
+
# --- Local Marketplace Plugins ---
|
|
22
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
23
|
+
MARKETPLACE_PATH="${SCRIPT_DIR}/../plugins/devs-marketplace"
|
|
24
|
+
|
|
25
|
+
# Load PLUGIN_BLACKLIST from .env if not already set in environment
|
|
26
|
+
ENV_FILE="${SCRIPT_DIR}/../.env"
|
|
27
|
+
if [ -z "${PLUGIN_BLACKLIST+x}" ] && [ -f "$ENV_FILE" ]; then
|
|
28
|
+
PLUGIN_BLACKLIST=$(grep -E '^PLUGIN_BLACKLIST=' "$ENV_FILE" | cut -d'=' -f2- | tr -d '"')
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# Parse blacklist into array
|
|
32
|
+
IFS=',' read -ra BLACKLIST <<< "${PLUGIN_BLACKLIST:-}"
|
|
33
|
+
|
|
34
|
+
# Helper function to check if plugin is blacklisted
|
|
35
|
+
is_blacklisted() {
|
|
36
|
+
local plugin_name="$1"
|
|
37
|
+
for blocked in "${BLACKLIST[@]}"; do
|
|
38
|
+
# Trim whitespace and compare
|
|
39
|
+
blocked="${blocked// /}"
|
|
40
|
+
if [ "$plugin_name" = "$blocked" ]; then
|
|
41
|
+
return 0
|
|
42
|
+
fi
|
|
43
|
+
done
|
|
44
|
+
return 1
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
# Add local marketplace (if not already added)
|
|
48
|
+
if ! claude plugin marketplace list 2>/dev/null | grep -q "devs-marketplace"; then
|
|
49
|
+
echo "[setup-plugins] Adding devs-marketplace..."
|
|
50
|
+
claude plugin marketplace add "$MARKETPLACE_PATH" 2>/dev/null || {
|
|
51
|
+
echo "[setup-plugins] WARNING: Failed to add marketplace"
|
|
52
|
+
}
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
# Install ALL plugins from marketplace.json (dynamic discovery)
|
|
56
|
+
MARKETPLACE_JSON="$MARKETPLACE_PATH/.claude-plugin/marketplace.json"
|
|
57
|
+
if [ -f "$MARKETPLACE_JSON" ]; then
|
|
58
|
+
PLUGINS=$(jq -r '.plugins[].name' "$MARKETPLACE_JSON" 2>/dev/null)
|
|
59
|
+
|
|
60
|
+
if [ -z "$PLUGINS" ]; then
|
|
61
|
+
echo "[setup-plugins] WARNING: No plugins found in marketplace.json"
|
|
62
|
+
else
|
|
63
|
+
for plugin in $PLUGINS; do
|
|
64
|
+
if is_blacklisted "$plugin"; then
|
|
65
|
+
echo "[setup-plugins] Skipping $plugin (blacklisted)"
|
|
66
|
+
continue
|
|
67
|
+
fi
|
|
68
|
+
echo "[setup-plugins] Installing $plugin from devs-marketplace..."
|
|
69
|
+
if claude plugin install "${plugin}@devs-marketplace" 2>/dev/null; then
|
|
70
|
+
echo "[setup-plugins] Installed: $plugin"
|
|
71
|
+
else
|
|
72
|
+
echo "[setup-plugins] WARNING: Failed to install $plugin (may already be installed)"
|
|
73
|
+
fi
|
|
74
|
+
done
|
|
75
|
+
fi
|
|
76
|
+
else
|
|
77
|
+
echo "[setup-plugins] WARNING: marketplace.json not found at $MARKETPLACE_JSON"
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
echo "[setup-plugins] Plugin installation complete"
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Master setup script for CodeForge devcontainer
|
|
3
|
+
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
DEVCONTAINER_DIR="$(dirname "$SCRIPT_DIR")"
|
|
8
|
+
ENV_FILE="$DEVCONTAINER_DIR/.env"
|
|
9
|
+
|
|
10
|
+
# Load configuration
|
|
11
|
+
if [ -f "$ENV_FILE" ]; then
|
|
12
|
+
set -a
|
|
13
|
+
source "$ENV_FILE"
|
|
14
|
+
set +a
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
# Apply defaults for any unset variables
|
|
18
|
+
: "${CLAUDE_CONFIG_DIR:=/workspaces/.claude}"
|
|
19
|
+
: "${CONFIG_SOURCE_DIR:=$DEVCONTAINER_DIR/config}"
|
|
20
|
+
: "${SETUP_CONFIG:=true}"
|
|
21
|
+
: "${SETUP_ALIASES:=true}"
|
|
22
|
+
: "${OVERWRITE_CONFIG:=false}"
|
|
23
|
+
: "${SETUP_PLUGINS:=true}"
|
|
24
|
+
|
|
25
|
+
export CLAUDE_CONFIG_DIR CONFIG_SOURCE_DIR SETUP_CONFIG SETUP_ALIASES OVERWRITE_CONFIG SETUP_PLUGINS
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
29
|
+
echo " CodeForge Setup"
|
|
30
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
31
|
+
echo ""
|
|
32
|
+
|
|
33
|
+
run_script() {
|
|
34
|
+
local script="$1"
|
|
35
|
+
local enabled="$2"
|
|
36
|
+
local name="$(basename $script .sh)"
|
|
37
|
+
|
|
38
|
+
if [ "$enabled" = "true" ]; then
|
|
39
|
+
if [ -f "$script" ]; then
|
|
40
|
+
echo "Running $name..."
|
|
41
|
+
bash "$script"
|
|
42
|
+
echo ""
|
|
43
|
+
else
|
|
44
|
+
echo "WARNING: $script not found, skipping"
|
|
45
|
+
fi
|
|
46
|
+
else
|
|
47
|
+
echo "Skipping $name (disabled)"
|
|
48
|
+
fi
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
run_script "$SCRIPT_DIR/setup-config.sh" "$SETUP_CONFIG"
|
|
52
|
+
run_script "$SCRIPT_DIR/setup-aliases.sh" "$SETUP_ALIASES"
|
|
53
|
+
run_script "$SCRIPT_DIR/setup-plugins.sh" "$SETUP_PLUGINS"
|
|
54
|
+
run_script "$SCRIPT_DIR/setup-irie-claude.sh" "true"
|
|
55
|
+
|
|
56
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
57
|
+
echo " Setup Complete"
|
|
58
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|