{"id":35840601,"url":"https://github.com/thomashartm/one-shot-setup","last_synced_at":"2026-01-08T03:04:56.206Z","repository":{"id":329188333,"uuid":"1118413481","full_name":"thomashartm/one-shot-setup","owner":"thomashartm","description":"OneShotSetup: dependency-aware macOS dev environment bootstrapper with selectable installs, version tracking, and reusable tool scripts.","archived":false,"fork":false,"pushed_at":"2025-12-20T18:58:04.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-21T09:16:03.215Z","etag":null,"topics":["bash","macos","tools"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomashartm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-17T18:04:07.000Z","updated_at":"2025-12-20T18:58:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/thomashartm/one-shot-setup","commit_stats":null,"previous_names":["thomashartm/one-shot-setup"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/thomashartm/one-shot-setup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomashartm%2Fone-shot-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomashartm%2Fone-shot-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomashartm%2Fone-shot-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomashartm%2Fone-shot-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomashartm","download_url":"https://codeload.github.com/thomashartm/one-shot-setup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomashartm%2Fone-shot-setup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28240570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2026-01-08T02:00:06.591Z","response_time":241,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","macos","tools"],"created_at":"2026-01-08T03:02:30.927Z","updated_at":"2026-01-08T03:04:56.200Z","avatar_url":"https://github.com/thomashartm.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OneShotSetup\n\nA reproducible macOS development machine bootstrapper you can keep in a Git repo and re-run after reinstalling macOS.\n\n---\n\n## Why This Exists\n\nSetting up a new development machine shouldn't feel like archaeology. Every time you bootstrap a fresh MacBook, you face the same questions: *What did I install last time? Which tools did I actually use? How was everything configured?*\n\n**OneShotSetup solves this with a simple philosophy:**\n\n- **Your setup is code** - Keep it in Git, version it, share it across machines\n- **Consistency matters** - Same tools, same configs, every time\n- **Memory fades** - Let the script remember what you installed 6 months ago\n- **Shell scripts are simple** - No complex frameworks, just Bash. Easy to read, easy to modify, runs anywhere\n- **Bootstrapping should be boring** - Clone, run, get back to work\n\nWhether you're setting up a new laptop, recovering from a clean install, or maintaining multiple development machines, OneShotSetup gives you a single command to restore your complete development environment.\n\n---\n\n## Key Features\n\n- **Tool registry** - Numbered  list of available tools with descriptions\n- **Dependency resolution** - Automatically installs dependencies first (e.g., Homebrew before tools that need it)\n- **Reinstallation support** - Re-run installers to restore shell configs after accidental deletions or updates\n- **State tracking** - Local state folder (`~/.one-shot-setup/`) with install history and version tracking\n- **Safe verification** - `show` command opens official docs before installing\n- **Status commands** - Check what's installed, view history, see versions\n\n---\n\n## Repository Layout\n\n```\n.\n├── setup.sh              # Main CLI orchestrator\n├── CLAUDE.md             # Project architecture guide\n└── tools/                # One file per tool\n    ├── homebrew.sh       # Package manager (priority 0)\n    ├── oh-my-zsh.sh      # Shell framework\n    ├── claude-code.sh    # Claude CLI\n    ├── nvm-nodejs.sh     # Node.js via nvm\n    ├── uv.sh             # Python package manager\n    ├── gcloud-cli.sh     # Google Cloud CLI\n    ├── go.sh             # Go programming language\n    ├── docker-cli.sh     # Docker client\n    ├── colima.sh         # Container runtime\n    ├── mkcert.sh         # Locally-trusted development certificates\n    ├── ngnix.sh          # nginx HTTP server\n    └── terraform-stack.sh # Terraform + Terragrunt\n```\n\nEach tool file is self-contained and declares its own dependencies.\n\n---\n\n## Requirements\n\n- macOS (Darwin)\n- Bash (macOS default Bash 3.2 is supported)\n\n---\n\n## Quick start\n\n```bash\ngit clone \u003cyour-repo-url\u003e\ncd \u003cyour-repo-folder\u003e\n\nchmod +x setup.sh\n./setup.sh list\n````\n\n---\n\n## Commands\n\n### List available tools\n\n```bash\n./setup.sh list\n```\n\nShows a numbered list with:\n\n* ID\n* Name\n* Priority\n* Dependencies\n* Description\n\n### Show install pages\n\nOpen the tool’s official page in your browser:\n\n```bash\n./setup.sh show homebrew\n./setup.sh show 1\n./setup.sh show all\n```\n\n### Install tools\n\nInstall by id, number, or `all`:\n\n```bash\n./setup.sh install homebrew\n./setup.sh install 1 3\n./setup.sh install all\n```\n\n**Reinstallation:** Run the same command to reinstall/update a tool. Useful for:\n- Restoring shell configs (.zshrc, .zshenv) after accidental deletions\n- Updating tool configurations\n- Fixing incomplete installations\n\nNon-interactive mode:\n\n```bash\n./setup.sh install homebrew claude -y\n```\n\nSkip dependency expansion (advanced):\n\n```bash\n./setup.sh install claude --no-deps\n```\n\n### Check installation status and versions\n\n```bash\n./setup.sh status\n```\n\nOutputs install detection + current version for every registered tool.\n\n### List installed tools\n\n```bash\n./setup.sh installed\n```\n\nShows only tools currently detected as installed.\n\n### View install history log\n\n```bash\n./setup.sh history\n```\n---\n\n## State and Logs\n\nState directory: `~/.one-shot-setup/`\n\n```\ninstalled.tsv   # tool id, name, first install date, current version\ninstall.log     # append-only: timestamp, action, tool id, name, version\n```\n\n**Actions logged:** `installed`, `reinstalled`, `detected`, `skipped`, `failed`\n\nThe install log tracks every execution for auditing and troubleshooting.\n\n---\n\n## Tool Ordering: Priority + Dependencies\n\nEach tool declares:\n- **Priority** - Lower numbers run first (Homebrew is `0`, apps are `50+`)\n- **Dependencies** - Tool IDs that must be installed before this tool\n\nExample: Installing `claude` automatically installs `homebrew` first if needed.\n\n```bash\n./setup.sh install claude\n# Installs: homebrew (priority 0) → claude (priority 30)\n```\n\n---\n\n## Adding a New Tool\n\nCreate `tools/mytool.sh` and implement four functions:\n\n```bash\nmytool_show()          # Open tool's official URL\nmytool_install()       # Install the tool (assumes dependencies available)\nmytool_is_installed()  # Return 0 if installed, 1 if not\nmytool_version()       # Print version string\n```\n\nRegister the tool:\n\n```bash\nregister_tool \\\n  \"mytool\" \\           # Unique ID\n  \"MyTool\" \\           # Display name\n  \"Description\" \\      # Short description\n  \"https://url\" \\      # Official URL\n  \"mytool_install\" \\   # Install function\n  \"mytool_show\" \\      # Show function\n  50 \\                 # Priority (lower runs first)\n  \"homebrew\" \\         # Dependencies (space-separated IDs)\n  \"mytool_is_installed\" \\\n  \"mytool_version\"\n```\n\n**Important:** See `.claude.md` for architecture principles:\n- Never install or configure dependencies (only check/use them)\n- Support reinstallation (check for complete config, remove incomplete blocks)\n- Keep installations conservative (no extras)\n\n---\n\n## Safety\n\nSome tools use `curl | bash` installers. Best practice:\n\n1. `./setup.sh show \u003ctool\u003e` - Opens official documentation\n2. Review the installer yourself\n3. `./setup.sh install \u003ctool\u003e` - Run when ready\n\nAlways verify sources before installing.\n\n---\n\n## Roadmap\n\n* Interactive multi-select UI\n* `doctor` command - Diagnose PATH and environment issues\n* `status --sync` - Refresh versions after external upgrades\n* Brewfile integration - Full package reproducibility\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomashartm%2Fone-shot-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomashartm%2Fone-shot-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomashartm%2Fone-shot-setup/lists"}