-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
241 lines (179 loc) · 7.73 KB
/
Makefile
File metadata and controls
241 lines (179 loc) · 7.73 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
.PHONY: help install update diff status backup clean doctor bootstrap sync sync-from-remote backup-full install-optional generate-template setup-age age-retrieve age-status setup-mise mise-status mise-upgrade mise-doctor setup-raycast raycast-export raycast-import raycast-status setup-takopi takopi-onboard takopi-backup takopi-status setup-signoz-mcp signoz-mcp-status signoz-mcp-update lint perf perf-report skills-status
# Configuration
DOTFILES_ROOT := $(shell pwd)
SCRIPTS_DIR := $(DOTFILES_ROOT)/scripts
BACKUP_DIR := $(DOTFILES_ROOT)/backups
GITHUB_USER ?= DROOdotFOO
# Default target
help: ## Show this help message
@echo "Available commands:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
# Core operations
install: ## Install dotfiles using chezmoi
@echo "Installing dotfiles..."
chezmoi init --apply https://github.com/$(GITHUB_USER)/dotfiles.git
update: ## Update dotfiles from remote repository
@echo "Updating dotfiles..."
chezmoi update
chezmoi apply
diff: ## Show differences between current and target state
@echo "Showing differences..."
chezmoi diff
status: ## Show status of dotfiles
@echo "Showing status..."
chezmoi status
# Backup operations
backup: ## Create backup of current dotfiles
@$(SCRIPTS_DIR)/utils/backup.sh data
backup-full: ## Create full backup with archive
@$(SCRIPTS_DIR)/utils/backup.sh full
clean: ## Clean up temporary files and backups
@$(SCRIPTS_DIR)/utils/clean.sh
# Health and maintenance
doctor: ## Run health check on dotfiles setup
@$(SCRIPTS_DIR)/utils/health-check.sh
bootstrap: ## Run bootstrap script for fresh installation
@$(SCRIPTS_DIR)/setup/bootstrap.sh
# Sync operations
sync: ## Sync local changes to repository
@$(SCRIPTS_DIR)/utils/sync.sh local
sync-from-remote: ## Sync from remote repository
@$(SCRIPTS_DIR)/utils/sync.sh remote
# Optional tools
install-optional: ## Install optional tools interactively
@$(SCRIPTS_DIR)/utils/install-optional.sh
# Linting
lint: ## Run shellcheck on scripts
@echo "Running shellcheck..."
@find scripts/ -name '*.sh' -not -path '*/templates/*' | sort | while read -r f; do \
printf " %-50s" "$$f"; \
if shellcheck --severity=warning "$$f" 2>/dev/null; then \
echo "ok"; \
else \
echo "FAIL"; \
fi; \
done
# Testing and development
test: ## Run comprehensive dotfiles test suite
@echo "Running Dotfiles Test Suite..."
@$(SCRIPTS_DIR)/utils/test-suite.sh
perf: ## Benchmark shell startup time
@$(SCRIPTS_DIR)/utils/performance-monitor.sh measure
perf-report: ## Show shell startup breakdown
@$(SCRIPTS_DIR)/utils/performance-monitor.sh report
lazy-load-config: ## Generate lazy loading config
@$(SCRIPTS_DIR)/utils/lazy-load-tools.sh generate
lazy-load-stats: ## Show lazy loading stats
@$(SCRIPTS_DIR)/utils/lazy-load-tools.sh stats
lazy-load-clean: ## Clean lazy loading data
@$(SCRIPTS_DIR)/utils/lazy-load-tools.sh clean
# Tailscale setup
setup-tailscale: ## Install and configure Tailscale
@$(SCRIPTS_DIR)/setup/setup-tailscale.sh install
tailscale-status: ## Show Tailscale network status
@$(SCRIPTS_DIR)/setup/setup-tailscale.sh status
# Secrets management setup
setup-secrets: ## Install 1Password, AWS CLI, Infisical, Tailscale
@$(SCRIPTS_DIR)/setup/setup-secrets.sh all
secrets-status: ## Show secrets tools installation status
@$(SCRIPTS_DIR)/setup/setup-secrets.sh status
# SSH key rotation
rotate-keys: ## Generate new SSH key, store in 1Password, sync to Tailscale hosts
@$(SCRIPTS_DIR)/utils/secrets-rotation.sh rotate
sync-keys: ## Sync SSH public key to all Tailscale hosts
@$(SCRIPTS_DIR)/utils/secrets-rotation.sh sync
keys-status: ## Show SSH key rotation status
@$(SCRIPTS_DIR)/utils/secrets-rotation.sh status
# Age encryption
setup-age: ## Generate age key and back up to 1Password
@$(SCRIPTS_DIR)/setup/setup-age.sh generate
@$(SCRIPTS_DIR)/setup/setup-age.sh backup
age-retrieve: ## Retrieve age key from 1Password (new machine)
@$(SCRIPTS_DIR)/setup/setup-age.sh retrieve
age-status: ## Show age encryption status
@$(SCRIPTS_DIR)/setup/setup-age.sh status
# Mise runtime manager
setup-mise: ## Install mise and all tool versions
@$(SCRIPTS_DIR)/setup/setup-mise.sh install
mise-status: ## Show mise installed tools and versions
@$(SCRIPTS_DIR)/setup/setup-mise.sh status
mise-upgrade: ## Upgrade mise tool versions
@$(SCRIPTS_DIR)/setup/setup-mise.sh upgrade
mise-doctor: ## Run mise diagnostics
@$(SCRIPTS_DIR)/setup/setup-mise.sh doctor
# Dashboard
dashboard: ## Show comprehensive service status dashboard
@$(SCRIPTS_DIR)/utils/dashboard.sh --all
dashboard-watch: ## Show dashboard with auto-refresh
@$(SCRIPTS_DIR)/utils/dashboard.sh --watch
dashboard-secrets: ## Show secrets providers status only
@$(SCRIPTS_DIR)/utils/dashboard.sh --secrets
# Theming
theme-generate: ## Generate all tool configs from unified theme
@$(SCRIPTS_DIR)/utils/theme-generator.sh all
theme-list: ## List available theme generators
@$(SCRIPTS_DIR)/utils/theme-generator.sh list
# Starship prompt
setup-starship: ## Install and configure Starship prompt
@$(SCRIPTS_DIR)/setup/setup-starship.sh install
# PaperWM (Hammerspoon tiling)
setup-paperwm: ## Install PaperWM.spoon for Hammerspoon
@$(SCRIPTS_DIR)/setup/setup-paperwm.sh install
paperwm-status: ## Show PaperWM installation status
@$(SCRIPTS_DIR)/setup/setup-paperwm.sh status
# Raycast
setup-raycast: ## Verify Raycast installation
@$(SCRIPTS_DIR)/setup/setup-raycast.sh install
raycast-export: ## Export Raycast settings to dotfiles
@$(SCRIPTS_DIR)/setup/setup-raycast.sh export
raycast-import: ## Import Raycast settings from dotfiles
@$(SCRIPTS_DIR)/setup/setup-raycast.sh import
raycast-status: ## Show Raycast status
@$(SCRIPTS_DIR)/setup/setup-raycast.sh status
# takopi (Telegram AI agent bridge)
setup-takopi: ## Install takopi via uv
@$(SCRIPTS_DIR)/setup/setup-takopi.sh install
takopi-onboard: ## Run takopi interactive onboarding
@$(SCRIPTS_DIR)/setup/setup-takopi.sh onboard
takopi-backup: ## Encrypt takopi config to chezmoi source
@$(SCRIPTS_DIR)/setup/setup-takopi.sh config-backup
takopi-status: ## Show takopi status
@$(SCRIPTS_DIR)/setup/setup-takopi.sh status
# SigNoz MCP server
setup-signoz-mcp: ## Build and install SigNoz MCP server from source
@$(SCRIPTS_DIR)/setup/setup-signoz-mcp.sh install
signoz-mcp-status: ## Show SigNoz MCP server status
@$(SCRIPTS_DIR)/setup/setup-signoz-mcp.sh status
signoz-mcp-update: ## Update SigNoz MCP server from source
@$(SCRIPTS_DIR)/setup/setup-signoz-mcp.sh update
# Brewfile management
brew-install: ## Install packages from Brewfile
@$(SCRIPTS_DIR)/setup/setup-brew.sh install
brew-dump: ## Update Brewfile from current system
@$(SCRIPTS_DIR)/setup/setup-brew.sh dump
brew-check: ## Check for packages not in Brewfile
@$(SCRIPTS_DIR)/setup/setup-brew.sh check
brew-cleanup: ## Remove packages not in Brewfile
@$(SCRIPTS_DIR)/setup/setup-brew.sh cleanup
brew-update: ## Update Homebrew and all packages
@$(SCRIPTS_DIR)/setup/setup-brew.sh update
# CI/CD setup
setup-ci: ## Setup CI/CD tools and pre-commit hooks
@$(SCRIPTS_DIR)/setup/setup-ci.sh
# Claude Code skills (source: github.com/DROOdotFOO/agent-skills)
skills-status: ## Show installed Claude Code skills
@echo "Skills (pinned version):"
@grep -o 'v[0-9.]*' home/.chezmoiexternal.toml 2>/dev/null || echo " (unknown)"
@echo ""
@echo "Skills (deployed):"
@ls -1 ~/.agents/skills/ 2>/dev/null || echo " (none)"
@echo ""
@echo "Skills (symlinked):"
@ls -la ~/.claude/skills/ 2>/dev/null || echo " (none)"
# Template generation
generate-template: ## Generate project template
@if [ -n "$(TEMPLATE)" ] && [ -n "$(NAME)" ]; then \
$(SCRIPTS_DIR)/utils/template-manager.sh generate "$(TEMPLATE)" "$(NAME)" "$(OPTIONS)"; \
else \
$(SCRIPTS_DIR)/utils/template-manager.sh list; \
fi