Add OpenClaw support to install.sh
- Auto-detect ~/.openclaw directory or openclaw CLI - Copy SOUL.md, AGENTS.md, IDENTITY.md per agent to ~/.openclaw/agency-agents/ - Add to interactive selector and tool list Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
# cursor -- Copy rules to .cursor/rules/ in current directory
|
# cursor -- Copy rules to .cursor/rules/ in current directory
|
||||||
# aider -- Copy CONVENTIONS.md to current directory
|
# aider -- Copy CONVENTIONS.md to current directory
|
||||||
# windsurf -- Copy .windsurfrules to current directory
|
# windsurf -- Copy .windsurfrules to current directory
|
||||||
|
# openclaw -- Copy workspaces to ~/.openclaw/agency-agents/
|
||||||
# all -- Install for all detected tools (default)
|
# all -- Install for all detected tools (default)
|
||||||
#
|
#
|
||||||
# Flags:
|
# Flags:
|
||||||
@@ -80,7 +81,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||||
INTEGRATIONS="$REPO_ROOT/integrations"
|
INTEGRATIONS="$REPO_ROOT/integrations"
|
||||||
|
|
||||||
ALL_TOOLS=(claude-code copilot antigravity gemini-cli opencode cursor aider windsurf)
|
ALL_TOOLS=(claude-code copilot antigravity gemini-cli opencode openclaw cursor aider windsurf)
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Usage
|
# Usage
|
||||||
@@ -110,6 +111,7 @@ detect_gemini_cli() { command -v gemini >/dev/null 2>&1 || [[ -d "${HOME}/.gem
|
|||||||
detect_cursor() { command -v cursor >/dev/null 2>&1 || [[ -d "${HOME}/.cursor" ]]; }
|
detect_cursor() { command -v cursor >/dev/null 2>&1 || [[ -d "${HOME}/.cursor" ]]; }
|
||||||
detect_opencode() { command -v opencode >/dev/null 2>&1 || [[ -d "${HOME}/.config/opencode" ]]; }
|
detect_opencode() { command -v opencode >/dev/null 2>&1 || [[ -d "${HOME}/.config/opencode" ]]; }
|
||||||
detect_aider() { command -v aider >/dev/null 2>&1; }
|
detect_aider() { command -v aider >/dev/null 2>&1; }
|
||||||
|
detect_openclaw() { command -v openclaw >/dev/null 2>&1 || [[ -d "${HOME}/.openclaw" ]]; }
|
||||||
detect_windsurf() { command -v windsurf >/dev/null 2>&1 || [[ -d "${HOME}/.codeium" ]]; }
|
detect_windsurf() { command -v windsurf >/dev/null 2>&1 || [[ -d "${HOME}/.codeium" ]]; }
|
||||||
|
|
||||||
is_detected() {
|
is_detected() {
|
||||||
@@ -119,6 +121,7 @@ is_detected() {
|
|||||||
antigravity) detect_antigravity ;;
|
antigravity) detect_antigravity ;;
|
||||||
gemini-cli) detect_gemini_cli ;;
|
gemini-cli) detect_gemini_cli ;;
|
||||||
opencode) detect_opencode ;;
|
opencode) detect_opencode ;;
|
||||||
|
openclaw) detect_openclaw ;;
|
||||||
cursor) detect_cursor ;;
|
cursor) detect_cursor ;;
|
||||||
aider) detect_aider ;;
|
aider) detect_aider ;;
|
||||||
windsurf) detect_windsurf ;;
|
windsurf) detect_windsurf ;;
|
||||||
@@ -134,6 +137,7 @@ tool_label() {
|
|||||||
antigravity) printf "%-14s %s" "Antigravity" "(~/.gemini/antigravity)" ;;
|
antigravity) printf "%-14s %s" "Antigravity" "(~/.gemini/antigravity)" ;;
|
||||||
gemini-cli) printf "%-14s %s" "Gemini CLI" "(gemini extension)" ;;
|
gemini-cli) printf "%-14s %s" "Gemini CLI" "(gemini extension)" ;;
|
||||||
opencode) printf "%-14s %s" "OpenCode" "(opencode.ai)" ;;
|
opencode) printf "%-14s %s" "OpenCode" "(opencode.ai)" ;;
|
||||||
|
openclaw) printf "%-14s %s" "OpenClaw" "(~/.openclaw)" ;;
|
||||||
cursor) printf "%-14s %s" "Cursor" "(.cursor/rules)" ;;
|
cursor) printf "%-14s %s" "Cursor" "(.cursor/rules)" ;;
|
||||||
aider) printf "%-14s %s" "Aider" "(CONVENTIONS.md)" ;;
|
aider) printf "%-14s %s" "Aider" "(CONVENTIONS.md)" ;;
|
||||||
windsurf) printf "%-14s %s" "Windsurf" "(.windsurfrules)" ;;
|
windsurf) printf "%-14s %s" "Windsurf" "(.windsurfrules)" ;;
|
||||||
@@ -192,7 +196,7 @@ interactive_select() {
|
|||||||
# --- controls ---
|
# --- controls ---
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf " ------------------------------------------------\n"
|
printf " ------------------------------------------------\n"
|
||||||
printf " ${C_CYAN}[1-8]${C_RESET} toggle ${C_CYAN}[a]${C_RESET} all ${C_CYAN}[n]${C_RESET} none ${C_CYAN}[d]${C_RESET} detected\n"
|
printf " ${C_CYAN}[1-9]${C_RESET} toggle ${C_CYAN}[a]${C_RESET} all ${C_CYAN}[n]${C_RESET} none ${C_CYAN}[d]${C_RESET} detected\n"
|
||||||
printf " ${C_GREEN}[Enter]${C_RESET} install ${C_RED}[q]${C_RESET} quit\n"
|
printf " ${C_GREEN}[Enter]${C_RESET} install ${C_RED}[q]${C_RESET} quit\n"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf " >> "
|
printf " >> "
|
||||||
@@ -341,6 +345,24 @@ install_opencode() {
|
|||||||
warn "OpenCode: project-scoped. Run from your project root to install there."
|
warn "OpenCode: project-scoped. Run from your project root to install there."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_openclaw() {
|
||||||
|
local src="$INTEGRATIONS/openclaw"
|
||||||
|
local dest="${HOME}/.openclaw/agency-agents"
|
||||||
|
local count=0
|
||||||
|
[[ -d "$src" ]] || { err "integrations/openclaw missing. Run convert.sh first."; return 1; }
|
||||||
|
mkdir -p "$dest"
|
||||||
|
local d
|
||||||
|
while IFS= read -r -d '' d; do
|
||||||
|
local name; name="$(basename "$d")"
|
||||||
|
mkdir -p "$dest/$name"
|
||||||
|
cp "$d/SOUL.md" "$dest/$name/SOUL.md"
|
||||||
|
cp "$d/AGENTS.md" "$dest/$name/AGENTS.md"
|
||||||
|
cp "$d/IDENTITY.md" "$dest/$name/IDENTITY.md"
|
||||||
|
(( count++ )) || true
|
||||||
|
done < <(find "$src" -mindepth 1 -maxdepth 1 -type d -print0)
|
||||||
|
ok "OpenClaw: $count workspaces -> $dest"
|
||||||
|
}
|
||||||
|
|
||||||
install_cursor() {
|
install_cursor() {
|
||||||
local src="$INTEGRATIONS/cursor/rules"
|
local src="$INTEGRATIONS/cursor/rules"
|
||||||
local dest="${PWD}/.cursor/rules"
|
local dest="${PWD}/.cursor/rules"
|
||||||
@@ -388,6 +410,7 @@ install_tool() {
|
|||||||
antigravity) install_antigravity ;;
|
antigravity) install_antigravity ;;
|
||||||
gemini-cli) install_gemini_cli ;;
|
gemini-cli) install_gemini_cli ;;
|
||||||
opencode) install_opencode ;;
|
opencode) install_opencode ;;
|
||||||
|
openclaw) install_openclaw ;;
|
||||||
cursor) install_cursor ;;
|
cursor) install_cursor ;;
|
||||||
aider) install_aider ;;
|
aider) install_aider ;;
|
||||||
windsurf) install_windsurf ;;
|
windsurf) install_windsurf ;;
|
||||||
|
|||||||
Reference in New Issue
Block a user