Skip to content

Commit e31b33b

Browse files
AI Assistantclaude
andcommitted
feat: rename commands for clarity (update=data, upgrade=system) + add bootstrap and upgrade-all
BREAKING CHANGES: - update-% → upgrade-% (e.g., update-python → upgrade-python) - auto-update → upgrade-managed - auto-update-* → upgrade-managed-* / upgrade-project-deps - auto-update-detect → detect-managers - auto-update-dry-run → upgrade-dry-run NEW COMMANDS: - bootstrap / init - initialize system, install Python if missing - upgrade-all - orchestrated 5-stage full system upgrade - upgrade-all-dry-run - preview full upgrade RATIONALE: Following apt/brew convention: - "update" = refresh data (apt update, brew update) - "upgrade" = modify system (apt upgrade, brew upgrade) Old naming was confusing: "make update" refreshed data but "make update-python" modified system. Now consistent: "make update" = data, "make upgrade-*" = system. No backward compatibility - clean break for clarity. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 978b3d7 commit e31b33b

3 files changed

Lines changed: 377 additions & 14 deletions

File tree

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ export
1212
lint lint-code lint-types lint-security format format-check \
1313
install install-dev install-core install-python install-node install-go \
1414
install-aws install-kubectl install-terraform install-ansible install-docker \
15-
install-brew install-rust update-% uninstall-% reconcile-% \
15+
install-brew install-rust upgrade-% uninstall-% reconcile-% \
1616
build build-dist build-wheel check-dist publish publish-test publish-prod \
1717
clean clean-build clean-test clean-pyc clean-all \
18-
scripts-perms audit-auto auto-update auto-update-detect auto-update-dry-run \
19-
auto-update-system auto-update-user auto-update-project auto-update-all \
20-
auto-update-system-only auto-update-skip-system
18+
scripts-perms audit-auto detect-managers upgrade-managed upgrade-dry-run \
19+
upgrade-managed-system upgrade-managed-user upgrade-project-deps upgrade-managed-all \
20+
upgrade-managed-system-only upgrade-managed-skip-system bootstrap init \
21+
upgrade-all upgrade-all-dry-run check-path fix-path
2122

2223
# ============================================================================
2324
# HELP & OVERVIEW

Makefile.d/user.mk

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ install-brew: scripts-perms ## Install Homebrew (macOS/Linux)
9191
install-rust: scripts-perms ## Install Rust via rustup
9292
./scripts/install_rust.sh
9393

94-
update-%: scripts-perms ## Update tool (e.g., make update-python)
94+
upgrade-%: scripts-perms ## Upgrade tool (e.g., make upgrade-python)
9595
./scripts/install_$*.sh update
9696

9797
uninstall-%: scripts-perms ## Uninstall tool (e.g., make uninstall-python)
@@ -100,33 +100,54 @@ uninstall-%: scripts-perms ## Uninstall tool (e.g., make uninstall-python)
100100
reconcile-%: scripts-perms ## Reconcile tool installation (e.g., make reconcile-node)
101101
./scripts/install_$*.sh reconcile
102102

103-
auto-update-detect: scripts-perms ## Detect all installed package managers
103+
detect-managers: scripts-perms ## Detect all installed package managers
104104
./scripts/auto_update.sh detect
105105

106-
auto-update: scripts-perms ## Auto-update all package managers and their packages
106+
upgrade-managed: scripts-perms ## Upgrade all package managers and their packages
107107
SCOPE=all ./scripts/auto_update.sh update
108108

109-
auto-update-dry-run: scripts-perms ## Show what would be updated without making changes
109+
upgrade-dry-run: scripts-perms ## Preview what would be upgraded without making changes
110110
SCOPE=all ./scripts/auto_update.sh --dry-run update
111111

112-
auto-update-system-only: scripts-perms ## Update only system package managers (apt, brew, snap, flatpak)
112+
upgrade-managed-system-only: scripts-perms ## Upgrade only system package managers (apt, brew, snap, flatpak)
113113
@bash -c './scripts/auto_update.sh apt && ./scripts/auto_update.sh brew && ./scripts/auto_update.sh snap && ./scripts/auto_update.sh flatpak' || true
114114

115-
auto-update-skip-system: scripts-perms ## Update all package managers except system ones
115+
upgrade-managed-skip-system: scripts-perms ## Upgrade all package managers except system ones
116116
./scripts/auto_update.sh --skip-system update
117117

118-
auto-update-system: scripts-perms ## Update only system-scoped packages (requires sudo)
118+
upgrade-managed-system: scripts-perms ## Upgrade only system-scoped packages (requires sudo)
119119
SCOPE=system ./scripts/auto_update.sh update
120120

121-
auto-update-user: scripts-perms ## Update only user-scoped packages (no sudo)
121+
upgrade-managed-user: scripts-perms ## Upgrade only user-scoped packages (no sudo)
122122
SCOPE=user ./scripts/auto_update.sh update
123123

124-
auto-update-project: scripts-perms ## Update project dependencies (with confirmation)
124+
upgrade-project-deps: scripts-perms ## Upgrade project dependencies (with confirmation)
125125
SCOPE=project ./scripts/auto_update.sh update
126126

127-
auto-update-all: scripts-perms ## Update system + user scopes (skip project)
127+
upgrade-managed-all: scripts-perms ## Upgrade system + user scopes (skip project)
128128
SCOPE=all ./scripts/auto_update.sh update
129129

130+
bootstrap: scripts-perms ## Initialize system (install Python if needed, setup environment)
131+
@echo "→ Bootstrapping ai_cli_preparation..." >&2
132+
@bash -c ' \
133+
if ! command -v python3 >/dev/null 2>&1; then \
134+
echo "⚠️ Python not found. Installing..." >&2; \
135+
./scripts/install_python.sh || exit 1; \
136+
fi; \
137+
py_version=$$(python3 --version 2>&1 | sed "s/Python //"); \
138+
echo "✓ Python $$py_version available" >&2; \
139+
$(MAKE) check-path || $(MAKE) fix-path; \
140+
$(MAKE) update; \
141+
echo "✓ Bootstrap complete. Run '\''make audit'\'' to see installed tools." >&2'
142+
143+
init: bootstrap ## Alias for bootstrap
144+
145+
upgrade-all: scripts-perms ## Complete system upgrade: update data → upgrade managers → upgrade tools
146+
@bash scripts/upgrade_all.sh
147+
148+
upgrade-all-dry-run: scripts-perms ## Preview complete system upgrade without making changes
149+
@DRY_RUN=1 bash scripts/upgrade_all.sh
150+
130151
check-path: scripts-perms ## Check PATH configuration for package managers
131152
@bash -c "source scripts/lib/path_check.sh && check_all_paths"
132153

0 commit comments

Comments
 (0)