-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·44 lines (36 loc) · 1.25 KB
/
setup.sh
File metadata and controls
executable file
·44 lines (36 loc) · 1.25 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
#!/bin/bash
# Setup script — symlinks agent config files into place
set -e
DOTFILES_DIR="$(cd "$(dirname "$0")" && pwd)"
echo "Setting up agent config from $DOTFILES_DIR"
# Claude Code global instructions
mkdir -p ~/.claude
ln -sf "$DOTFILES_DIR/CLAUDE.md" ~/.claude/CLAUDE.md
echo " ✓ ~/.claude/CLAUDE.md"
# Codex CLI global instructions
mkdir -p ~/.codex
ln -sf "$DOTFILES_DIR/AGENTS.md" ~/.codex/AGENTS.md
echo " ✓ ~/.codex/AGENTS.md"
# Codex config
if [ -f "$DOTFILES_DIR/config/codex-config.toml" ]; then
ln -sf "$DOTFILES_DIR/config/codex-config.toml" ~/.codex/config.toml
echo " ✓ ~/.codex/config.toml"
fi
# OpenClaw workspace skills
if [ -d "$DOTFILES_DIR/skills" ]; then
SKILLS_DIR="${OPENCLAW_WORKSPACE:-$HOME/.openclaw/workspace}/skills"
mkdir -p "$SKILLS_DIR"
for skill in "$DOTFILES_DIR/skills"/*/; do
skill_name=$(basename "$skill")
ln -sfn "$skill" "$SKILLS_DIR/$skill_name"
echo " ✓ skills/$skill_name"
done
fi
echo "Done. Agent config linked."
# Git config (identity + signing, no credentials)
if [ -f "$DOTFILES_DIR/config/gitconfig" ] && [ ! -f ~/.gitconfig ]; then
ln -sf "$DOTFILES_DIR/config/gitconfig" ~/.gitconfig
echo " ✓ ~/.gitconfig"
else
echo " ⊘ ~/.gitconfig already exists (skipped)"
fi