-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
169 lines (148 loc) · 5.52 KB
/
Copy pathjustfile
File metadata and controls
169 lines (148 loc) · 5.52 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# Dotfiles task runner
# Usage: just <recipe>
# Run `just --list` to see all available recipes
set shell := ["bash", "-euo", "pipefail", "-c"]
dotfiles := env("HOME") / ".dotfiles"
# Run full setup (idempotent — safe to re-run)
setup: core runtimes agents tools link
@echo ""
@echo "Setup complete! Restart your shell or run: source ~/.zshrc"
# Install core tools: zsh, oh-my-zsh, tmux, starship, nvim, lazygit, direnv
core:
@bash {{dotfiles}}/install/core.sh
# Install language runtimes: pyenv, uv, nvm, Node.js, Bun, Rust
runtimes:
@bash {{dotfiles}}/install/runtimes.sh
# Install AI coding agents: Claude Code, Codex, OpenCode, Pi
agents:
@bash {{dotfiles}}/install/agents.sh
# Validate shared skills for Claude Code, Codex, and Pi portability
validate-skills:
@bash {{dotfiles}}/tools/validate-agent-skills.sh
# Install CLI tools: gh, glab, jq, yq, just, agent-browser, portless
tools:
@bash {{dotfiles}}/install/tools.sh
# Install infrastructure tools: Terraform, Pulumi, SST (opt-in)
infra:
@bash {{dotfiles}}/install/infra.sh
# Clone/pull personal workspace repos defined in install/repos.txt
repos:
@bash {{dotfiles}}/install/repos.sh
# Create all config symlinks (idempotent)
link:
#!/usr/bin/env bash
source {{dotfiles}}/lib/helpers.sh
info "Linking configuration files..."
# Shell
ensure_symlink "{{dotfiles}}/config/zsh/.zshenv" "$HOME/.zshenv"
ensure_symlink "{{dotfiles}}/config/zsh/.zshrc" "$HOME/.zshrc"
ensure_symlink "{{dotfiles}}/config/tmux/.tmux.conf" "$HOME/.tmux.conf"
# Git
ensure_symlink "{{dotfiles}}/config/git/.gitconfig" "$HOME/.gitconfig"
ensure_symlink "{{dotfiles}}/config/git/.gitmessage" "$HOME/.gitmessage"
# Editors & tools
ensure_symlink "{{dotfiles}}/config/nvim" "$HOME/.config/nvim"
ensure_symlink "{{dotfiles}}/config/starship/starship.toml" "$HOME/.config/starship.toml"
# Lazygit (OS-dependent path)
if [ "$DOTFILES_OS" = "macos" ]; then
ensure_symlink "{{dotfiles}}/config/lazygit/config.yml" "$HOME/Library/Application Support/lazygit/config.yml"
else
ensure_symlink "{{dotfiles}}/config/lazygit/config.yml" "$HOME/.config/lazygit/config.yml"
fi
# SketchyBar (macOS only)
if [ "$DOTFILES_OS" = "macos" ]; then
ensure_symlink "{{dotfiles}}/config/sketchybar" "$HOME/.config/sketchybar"
fi
# Claude Code
ensure_dir "$HOME/.claude"
ensure_dir "$HOME/.claude/hooks"
ensure_dir "$HOME/.claude/commands"
ensure_symlink "{{dotfiles}}/agents/claude/settings.json" "$HOME/.claude/settings.json"
ensure_symlink "{{dotfiles}}/agents/claude/statusline.sh" "$HOME/.claude/statusline.sh"
chmod +x "{{dotfiles}}/agents/claude/statusline.sh"
# Symlink all hooks
for hook in {{dotfiles}}/agents/claude/hooks/*; do
[ -f "$hook" ] && ensure_symlink "$hook" "$HOME/.claude/hooks/$(basename "$hook")"
done
# Symlink all commands
for cmd in {{dotfiles}}/agents/claude/commands/*; do
[ -f "$cmd" ] && ensure_symlink "$cmd" "$HOME/.claude/commands/$(basename "$cmd")"
done
# Symlink output-styles directory
ensure_symlink "{{dotfiles}}/agents/claude/output-styles" "$HOME/.claude/output-styles"
# Symlink all skills into both Claude Code and Codex
ensure_dir "$HOME/.claude/skills"
ensure_dir "$HOME/.codex/skills"
ensure_dir "$HOME/.pi/agent"
ensure_dir "$HOME/.pi/agent/skills"
for skill in {{dotfiles}}/agents/skills/*/; do
if [ -d "$skill" ]; then
name="$(basename "$skill")"
ensure_symlink "$skill" "$HOME/.claude/skills/$name"
ensure_symlink "$skill" "$HOME/.codex/skills/$name"
ensure_symlink "$skill" "$HOME/.pi/agent/skills/$name"
fi
done
# Codex CLI
ensure_dir "$HOME/.codex"
ensure_symlink "{{dotfiles}}/agents/codex/config.toml" "$HOME/.codex/config.toml"
# Pi
ensure_symlink "{{dotfiles}}/agents/pi/settings.json" "$HOME/.pi/agent/settings.json"
# OpenCode
ensure_dir "$HOME/.config/opencode"
ensure_symlink "{{dotfiles}}/agents/opencode/opencode.json" "$HOME/.config/opencode/opencode.json"
ensure_symlink "{{dotfiles}}/agents/opencode/oh-my-opencode.json" "$HOME/.config/opencode/oh-my-opencode.json"
ok "All symlinks created"
# Unlink all symlinks (for clean removal)
unlink:
#!/usr/bin/env bash
source {{dotfiles}}/lib/helpers.sh
links=(
"$HOME/.zshenv"
"$HOME/.zshrc"
"$HOME/.tmux.conf"
"$HOME/.gitconfig"
"$HOME/.gitmessage"
"$HOME/.config/nvim"
"$HOME/.config/starship.toml"
"$HOME/.claude/settings.json"
"$HOME/.claude/statusline.sh"
"$HOME/.claude/output-styles"
"$HOME/.codex/config.toml"
"$HOME/.pi/agent/settings.json"
"$HOME/.config/opencode/opencode.json"
"$HOME/.config/opencode/oh-my-opencode.json"
)
# Lazygit (OS-dependent path)
if [ "$(uname)" = "Darwin" ]; then
links+=("$HOME/Library/Application Support/lazygit/config.yml")
else
links+=("$HOME/.config/lazygit/config.yml")
fi
# SketchyBar (macOS only)
if [ "$(uname)" = "Darwin" ]; then
links+=("$HOME/.config/sketchybar")
fi
# Claude hooks
for hook in "$HOME/.claude/hooks/"*; do
[ -L "$hook" ] && links+=("$hook")
done
# Claude commands
for cmd in "$HOME/.claude/commands/"*; do
[ -L "$cmd" ] && links+=("$cmd")
done
# Claude skills
for skill in "$HOME/.claude/skills/"*; do
[ -L "$skill" ] && links+=("$skill")
done
# Codex skills
for skill in "$HOME/.codex/skills/"*; do
[ -L "$skill" ] && links+=("$skill")
done
# Pi skills
for skill in "$HOME/.pi/agent/skills/"*; do
[ -L "$skill" ] && links+=("$skill")
done
for link in "${links[@]}"; do
[ -L "$link" ] && rm "$link" && ok "Removed $link"
done