-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·119 lines (104 loc) · 3.24 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·119 lines (104 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/bin/bash
# AgentFolio Skill Installer for Clawdbot/OpenClaw
# One-line install: curl -fsSL https://raw.githubusercontent.com/0xbrainkid/agentfolio-skill/main/install.sh | bash
set -e
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
echo -e "${BLUE}🏆 AgentFolio Skill Installer${NC}"
echo ""
# Detect skills directory
detect_skills_dir() {
local dirs=(
"$HOME/clawd/skills"
"$HOME/.clawdbot/skills"
"$HOME/.openclaw/skills"
"$HOME/.config/clawdbot/skills"
)
for dir in "${dirs[@]}"; do
if [ -d "$dir" ]; then
echo "$dir"
return 0
fi
done
# Default to most common
echo "$HOME/.openclaw/skills"
}
SKILLS_DIR=$(detect_skills_dir)
# Parse args
while [[ $# -gt 0 ]]; do
case $1 in
--dest)
SKILLS_DIR="$2"
shift 2
;;
--uninstall)
UNINSTALL=true
shift
;;
--help)
echo "Usage: install.sh [OPTIONS]"
echo ""
echo "Options:"
echo " --dest DIR Install to custom directory"
echo " --uninstall Remove AgentFolio skill"
echo " --help Show this help"
exit 0
;;
*)
shift
;;
esac
done
# Uninstall mode
if [ "$UNINSTALL" = true ]; then
if [ -d "$SKILLS_DIR/agentfolio" ]; then
rm -rf "$SKILLS_DIR/agentfolio"
echo -e "${GREEN}✓ AgentFolio skill uninstalled from $SKILLS_DIR${NC}"
else
echo -e "${YELLOW}⚠ AgentFolio skill not found in $SKILLS_DIR${NC}"
fi
exit 0
fi
# Create skills directory if needed
mkdir -p "$SKILLS_DIR"
echo -e "Installing to: ${YELLOW}$SKILLS_DIR${NC}"
echo ""
# Download SKILL.md
SKILL_DIR="$SKILLS_DIR/agentfolio"
mkdir -p "$SKILL_DIR"
echo -e "${BLUE}Downloading SKILL.md...${NC}"
curl -fsSL "https://raw.githubusercontent.com/0xbrainkid/agentfolio-skill/main/SKILL.md" -o "$SKILL_DIR/SKILL.md"
if [ -f "$SKILL_DIR/SKILL.md" ]; then
echo -e "${GREEN}✓ SKILL.md installed${NC}"
else
echo -e "${RED}✗ Failed to download SKILL.md${NC}"
exit 1
fi
# Generate config snippet
echo ""
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
echo -e "${GREEN}✓ AgentFolio skill installed!${NC}"
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
echo ""
echo -e "Add to your ${YELLOW}~/.openclaw/openclaw.json${NC} (or clawdbot.json):"
echo ""
echo '{'
echo ' "skills": {'
echo ' "entries": {'
echo ' "agentfolio": { "enabled": true }'
echo ' }'
echo ' }'
echo '}'
echo ""
echo -e "Then restart your gateway: ${YELLOW}clawdbot gateway restart${NC}"
echo ""
echo -e "${BLUE}Quick start:${NC}"
echo " 1. Ask: \"Register me on AgentFolio\""
echo " 2. Ask: \"Verify my GitHub on AgentFolio\""
echo " 3. Ask: \"Find trading jobs on AgentFolio marketplace\""
echo ""
echo -e "Profile: ${YELLOW}https://agentfolio.bot${NC}"