summaryrefslogtreecommitdiff
path: root/dotfiles/system/.local/bin/ai-assistants
blob: 51028fe26fec0c67d7d8dc9acfbd51c55a213568 (plain)
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
#!/bin/bash
# Launch tmux session with Claude AI assistants for multiple projects

SESSION="ai-assistants"

# If session exists, attach to it
if tmux has-session -t "$SESSION" 2>/dev/null; then
  tmux attach-session -t "$SESSION"
  exit 0
fi

# Define projects: name and directory
projects=(
  "health:~/projects/health"
  "finances:~/projects/finances"
  "danneel:~/projects/danneel"
  "jr-estate:~/projects/jr-estate"
  "kit:~/projects/kit"
  "homelab:~/projects/homelab"
  "career:~/projects/career"
)

# Claude command to run in each window
CLAUDE_CMD='claude "Read docs/protocols.org and docs/NOTES.org, follow instructions exactly, then begin the session-start workflow"'

# Create session with first project
first="${projects[0]}"
name="${first%%:*}"
dir="${first#*:}"
dir="${dir/#\~/$HOME}"
tmux new-session -d -s "$SESSION" -n "$name" -c "$dir"
tmux send-keys -t "$SESSION:$name" "$CLAUDE_CMD" Enter

# Create remaining windows
for project in "${projects[@]:1}"; do
  name="${project%%:*}"
  dir="${project#*:}"
  dir="${dir/#\~/$HOME}"
  tmux new-window -t "$SESSION" -n "$name" -c "$dir"
  tmux send-keys -t "$SESSION:$name" "$CLAUDE_CMD" Enter
done

# Select first window and attach
tmux select-window -t "$SESSION:health"
tmux attach-session -t "$SESSION"