added opencode

This commit is contained in:
Bryan Ramos 2026-04-12 23:05:31 -04:00
parent 54acfec834
commit 254d72cfd4
8 changed files with 315 additions and 4 deletions

View file

@ -302,3 +302,32 @@ if [ -d "$SCRIPT_DIR/codex" ]; then
create_file_symlink "$SCRIPT_DIR/codex/config.toml" "$CODEX_DIR/config.toml" "codex config.toml"
fi
fi
# OpenCode integration (optional — only if opencode/ output exists)
OPENCODE_CONFIG_DIR="$HOME/.config/opencode"
if [ -d "$SCRIPT_DIR/opencode" ]; then
echo ""
echo "OpenCode output found — installing to $OPENCODE_CONFIG_DIR"
mkdir -p "$OPENCODE_CONFIG_DIR"
# Skills: symlink each skill directory into ~/.config/opencode/skills/
install_team_skills_for_target "opencode" "$OPENCODE_CONFIG_DIR/skills" "opencode"
# Generated agents
if [ -d "$SCRIPT_DIR/opencode/agents" ]; then
create_symlink "$SCRIPT_DIR/opencode/agents" "$OPENCODE_CONFIG_DIR/agents" "opencode agents"
else
echo "Run ./generate.sh first to generate OpenCode agent definitions"
fi
# Generated AGENTS.md
if [ -f "$SCRIPT_DIR/opencode/AGENTS.md" ]; then
create_file_symlink "$SCRIPT_DIR/opencode/AGENTS.md" "$OPENCODE_CONFIG_DIR/AGENTS.md" "opencode AGENTS.md"
fi
# Merged config — the generated opencode.json becomes the installed config.json
if [ -f "$SCRIPT_DIR/opencode/opencode.json" ]; then
create_file_symlink "$SCRIPT_DIR/opencode/opencode.json" "$OPENCODE_CONFIG_DIR/config.json" "opencode config"
fi
fi