This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Cross-platform dev machine setup automation for macOS, Windows, Ubuntu, Debian, and Fedora.
Each platform has its own directory with an entry-point script,
an automation engine, and a vars.yaml configuration file.
| Platform | Entry Point | Automation | Package Manager |
|---|---|---|---|
| macOS | macOS/setup.sh |
Ansible (setup.yaml) |
Homebrew |
| Windows | windows/setup.ps1 |
Native PowerShell | Chocolatey |
| Ubuntu | ubuntu/setup.sh |
Ansible (setup.yaml) |
APT + Snap |
| Debian | debian/setup.sh |
Ansible (setup.yaml) |
APT + Flatpak |
| Fedora | fedora/setup.sh |
Ansible (setup.yaml) |
DNF + Flatpak |
All platforms share the same flow:
install prerequisites, load vars.yaml, install packages by category,
configure Git, run custom commands, run custom script, clean up.
Each platform's vars.yaml is the single source of truth.
Package lists are flat YAML arrays grouped by category:
- OS packages:
homebrew_formulae/homebrew_casks/choco_packages/apt_packages/snap_packages/dnf_packages/flatpak_packages/appimage_packages - Cross-platform:
powershell_modules,pipx_packages,uv_tools,npm_global_packages,dotnet_tools,vscode_extensions - Git config:
git_user_email,git_user_name - Custom commands:
custom_commands_user(non-elevated),custom_commands_elevated(sudo) - Custom script:
custom_script(path to a script run at the end)
- macOS uses flat string arrays for
homebrew_formulaeandhomebrew_casks. All other platforms use objects with anamekey. - Windows
choco_packagesobjects support additionalparametersandprereleasekeys beyondname. - Windows
custom_commandsis a single list (not split into user/elevated) since the script already runs as Administrator. - Ubuntu has additional
external_apt_repositories(deb822 format) andapt_packages_prereqsfor bootstrap dependencies. - Ubuntu uses
supported_architectureson some packages to skip amd64-only software on ARM64. - Fedora has
external_dnf_repositories(yum_repository format) anddnf_packages_prereqsfor bootstrap dependencies. - Fedora uses
supported_architectureswithx86_64/aarch64values (notamd64/arm64like Ubuntu). - Debian shares the APT package format with Ubuntu but uses Flatpak instead
of Snap (
flatpak_packageslike Fedora). Debian prerequisites includegnupginstead ofsoftware-properties-common(which is Ubuntu-only for PPA support). Ubuntu PPAs (ppa.launchpad.netURLs) are not compatible with Debian. Docker and Microsoft repos use/linux/debianinstead of/linux/ubuntu. - Fedora uses
flatpak_packages(Flathub app IDs) instead of Snap packages. - Ubuntu/Debian/Fedora support
appimage_packagesfor generic AppImage installation. Each entry hasname,url, and optional fields (comment,categories,mime_types,no_sandbox,checksum,supported_architectures). Cursor is installed this way on Linux; macOS uses Homebrew caskcursor, Windows uses Chocolateycursoride. All platforms reuse thevscode_extensionslist for Cursor extension installation. uv_toolsinstalls Python CLI tools viauv tool install. On macOS/Windows,pipx_packagesis empty (uv is available via Homebrew/Chocolatey); on Linux,pipx_packagesretains onlyuv(pipx bootstraps uv, then uv manages the rest). The uv tools step is guarded on uv being installed -- if uv is not on PATH, the step is silently skipped.
# macOS
chmod 700 ./macOS/setup.sh
./macOS/setup.sh -e your.email@example.com
# Ubuntu
chmod 700 ./ubuntu/setup.sh
./ubuntu/setup.sh -e your.email@example.com
# Debian
chmod 700 ./debian/setup.sh
./debian/setup.sh -e your.email@example.com
# Fedora
chmod 700 ./fedora/setup.sh
./fedora/setup.sh -e your.email@example.com# Windows (run as Administrator)
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force
.\windows\setup.ps1 -e your.email@example.comCommon flags: -v (verbose, repeatable), -e (git email),
-n (git name), -p (prerequisites only, macOS/Ubuntu/Debian/Fedora),
-c (CI mode, skip interactive sudo prompts, macOS/Ubuntu/Debian/Fedora).
The Ansible playbooks use tags to run specific sections:
# Run only Homebrew tasks
ansible-playbook setup.yaml --tags homebrew
# Run only VS Code extension installation
ansible-playbook setup.yaml --tags vscodeAdd to the appropriate list in the platform's vars.yaml.
Keep entries alphabetically sorted within their group.
Comment groups organize packages by purpose.
When adding to multiple platforms,
use the correct format for each
(flat strings for macOS, name: objects for Ubuntu/Debian/Fedora/Windows).
Follow conventional commits:
type(scope): brief description
Types: feat, fix, docs, style, refactor, test, chore.
Scope is typically the platform name: macOS, windows, ubuntu, debian.
- Shell scripts:
#!/bin/sh,set -e, snake_case functions - PowerShell:
#Requiresdirectives, PascalCase, Get/Test/Set pattern with verbose logging - YAML: 2-space indent, comments above entries, group related packages with comment headers
- Ansible tasks: use
ignore_errors: yesfor package installs,changed_whenfor idempotency, tag every task
- Flat configuration -- no nested package structures
- Declarative --
vars.yamldescribes desired end state - Idempotent -- safe to run multiple times
- Extend through data -- add packages to
vars.yaml, not code to scripts