-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·75 lines (67 loc) · 2.33 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·75 lines (67 loc) · 2.33 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
#!/bin/bash
set -e
ASSISTANT_DIR="$HOME/.assistant"
PROJECT_DIR="$(cd "$(dirname "$0")" && pwd)"
echo "=== AI Daily Assistant Setup ==="
# 1. Create directory structure
echo "Creating ~/.assistant/ directories..."
mkdir -p "$ASSISTANT_DIR"/{state,memory/entities/archived,memory/weekly,notes,logs,tasks,inbox/processed,outbox/pending,outbox/delivered,notifications/pending,notifications/delivered,notifications/failed,worktrees,sessions}
# 2. Create initial files if they don't exist
if [ ! -f "$ASSISTANT_DIR/config.json" ]; then
echo "Creating default config.json..."
cat > "$ASSISTANT_DIR/config.json" << 'EOF'
{
"version": 1,
"github": {
"repo": "",
"pollIntervalMinutes": 5
},
"jira": {
"project": "",
"pollIntervalMinutes": 15
},
"models": {
"trivial": "claude-haiku-4-5",
"standard": "claude-sonnet-4-6",
"deep": "claude-opus-4-6"
},
"daemon": {
"port": 3847
},
"standup": {
"days": ["monday", "thursday"],
"remindAt": "09:00"
},
"workingHours": {
"start": "08:00",
"end": "18:00"
}
}
EOF
echo " >> Edit ~/.assistant/config.json to set your github.repo and jira.project"
fi
[ -f "$ASSISTANT_DIR/memory/hot-context.md" ] || echo "# Hot Context" > "$ASSISTANT_DIR/memory/hot-context.md"
[ -f "$ASSISTANT_DIR/notes/todos.md" ] || printf "# Todos\n\n## Today\n" > "$ASSISTANT_DIR/notes/todos.md"
[ -f "$ASSISTANT_DIR/notes/inbox.md" ] || echo "# Notes" > "$ASSISTANT_DIR/notes/inbox.md"
[ -f "$ASSISTANT_DIR/notes/done.md" ] || echo "# Completed Items" > "$ASSISTANT_DIR/notes/done.md"
[ -f "$ASSISTANT_DIR/tasks/index.json" ] || echo '{"nextId": 1, "tasks": []}' > "$ASSISTANT_DIR/tasks/index.json"
[ -f "$ASSISTANT_DIR/sessions/active.json" ] || echo '{"sessions": []}' > "$ASSISTANT_DIR/sessions/active.json"
# 3. Build Go binary
echo "Building daemon..."
cd "$PROJECT_DIR"
mkdir -p bin
go build -o bin/assistantd ./cmd/assistantd
# 4. Install assistant wrapper
echo "Installing assistant command..."
mkdir -p "$HOME/bin"
ln -sf "$PROJECT_DIR/scripts/assistant.sh" "$HOME/bin/assistant"
if [[ ":$PATH:" != *":$HOME/bin:"* ]]; then
echo " >> Add to your .bashrc: export PATH=\"\$HOME/bin:\$PATH\""
fi
echo ""
echo "=== Setup Complete ==="
echo ""
echo "Next steps:"
echo " 1. Edit ~/.assistant/config.json — set github.repo and localPath"
echo " 2. Run: assistant"
echo ""