{"id":49271709,"url":"https://github.com/26zl/macsmith","last_synced_at":"2026-05-24T01:01:19.753Z","repository":{"id":324633874,"uuid":"1072271539","full_name":"26zl/macsmith","owner":"26zl","description":"Forge a fresh Mac into a complete dev box, and keep it sharp. One-command install of Homebrew, Starship, language toolchains, and opt-in devops/netsec/crypto profiles. 'update' keeps everything current.","archived":false,"fork":false,"pushed_at":"2026-05-01T21:10:25.000Z","size":2544,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-01T23:32:25.806Z","etag":null,"topics":["apple-silicon","automation","cli","developer-experience","development","devops","dotfiles","dotfiles-macos","homebrew","macos","oh-my-zsh","productivity","setup-script","shell","starship","sysadmin","terminal","zsh"],"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/26zl.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-10-08T13:45:34.000Z","updated_at":"2026-05-01T20:37:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"4dc6e064-1544-404d-9e5e-f3762cca9d37","html_url":"https://github.com/26zl/macsmith","commit_stats":null,"previous_names":["26zl/macos_basic_setup","26zl/macos-dev-setup","26zl/macsmith"],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/26zl/macsmith","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/26zl%2Fmacsmith","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/26zl%2Fmacsmith/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/26zl%2Fmacsmith/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/26zl%2Fmacsmith/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/26zl","download_url":"https://codeload.github.com/26zl/macsmith/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/26zl%2Fmacsmith/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33417489,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T22:14:44.296Z","status":"ssl_error","status_checked_at":"2026-05-23T22:14:43.778Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["apple-silicon","automation","cli","developer-experience","development","devops","dotfiles","dotfiles-macos","homebrew","macos","oh-my-zsh","productivity","setup-script","shell","starship","sysadmin","terminal","zsh"],"created_at":"2026-04-25T14:08:13.238Z","updated_at":"2026-05-24T01:01:19.746Z","avatar_url":"https://github.com/26zl.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# macsmith\n\n```text\n                                                        \\ \\ \\\n                                                         \\ \\ \\\n                                    _ _   _              _\\_\\_\\___\n _ __ ___   __ _  ___ ___ _ __ ___ (_) |_| |__          |         |\n| '_ ` _ \\ / _` |/ __/ __| '_ ` _ \\| | __| '_ \\         |         |\n| | | | | | (_| | (__\\__ \\ | | | | | | |_| | | |      **|_________|\n|_| |_| |_|\\__,_|\\___|___/_| |_| |_|_|\\__|_| |_| * * **\n                                                * **  *\n                 ⚒  forge your Mac  ⚒          * *\n```\n\n**Forge a fresh Mac into a complete dev box — and keep it sharp.**\n\nOne command installs Homebrew, Starship, language toolchains, and optional sysadmin profiles. A second command (`update`) keeps everything current.\n\n[![macOS Test](https://github.com/26zl/macsmith/actions/workflows/macos-test.yml/badge.svg)](https://github.com/26zl/macsmith/actions/workflows/macos-test.yml)\n[![Checks](https://github.com/26zl/macsmith/actions/workflows/checks.yml/badge.svg)](https://github.com/26zl/macsmith/actions/workflows/checks.yml)\n[![Security Scan](https://github.com/26zl/macsmith/actions/workflows/security.yml/badge.svg)](https://github.com/26zl/macsmith/actions/workflows/security.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n![Terminal preview](background/image.png)\n\n---\n\n## Install\n\nPin to a release (recommended):\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/26zl/macsmith/\u003cTAG\u003e/bootstrap.sh \\\n  | MACSMITH_REF=\u003cTAG\u003e zsh\n```\n\nOr clone and review:\n\n```bash\ngit clone https://github.com/26zl/macsmith.git\ncd macsmith\n./install.sh\n./dev-tools.sh    # optional language toolchains\n```\n\nPick a tag from [Releases](https://github.com/26zl/macsmith/releases).\n\n## Daily use\n\n```text\nupdate [target]    # upgrade everything (default) or a single target: brew/node/python/ruby/rust/swift/go/dotnet/nix/mas (try: update help)\nverify             # health-check every installed tool\nversions           # print versions on one screen\ndoctor             # diagnose common setup issues (read-only)\nupgrade            # pull the latest macsmith release (SHA-256 verified against the release checksum)\nsys-install        # re-run install.sh (add/remove sysadmin profiles, pick up core updates)\ndev-tools          # re-run dev-tools.sh (add/remove language toolchains)\nuninstall-profile  # brew-uninstall a sysadmin profile's packages (power-user/crypto/netsec/devops/databases)\nuninstall-nix      # bundled macOS Nix uninstaller (--dry-run / --yes)\nuninstall-macsmith # remove macsmith itself (keeps Homebrew, language tools, your customizations)\nreload             # reload ~/.zprofile and ~/.zshrc after editing either\n```\n\n## What you get\n\nEverything optional is behind a y/n prompt with a sensible default (press Enter to accept). Defaults shown in brackets.\n\n**Installed automatically** (core shell foundation):\n\n- Xcode Command Line Tools, Homebrew, Starship prompt, zsh-syntax-highlighting, zsh-autosuggestions (both via Homebrew, no Oh My Zsh), FZF\n- The `macsmith` maintenance binary at `~/.local/bin/macsmith`\n- A managed `~/.zshrc` (your existing one is backed up with a timestamp)\n\n**Asked per tool during `./install.sh`**:\n\n- macOS package sources: `mas` **[N]**, `MacPorts` **[N]**, `Nix` **[N]**\n- Sysadmin profiles: power-user CLI **[Y]** (btop, ripgrep, bat, gh, lazygit, tmux, neovim, …), crypto/secrets **[Y]** (age, sops, gnupg, pinentry-mac), netsec **[N]** (nmap, masscan, iperf3, Wireshark), devops/SRE **[N]** (kubectl, Terraform via HashiCorp tap, ansible, awscli, orbstack, …), databases **[N]** (mysql, postgresql)\n\n**Asked per tool during `./dev-tools.sh`**:\n\n- Languages **[Y]**: Python (pyenv + pipx + uv), Node (nvm + pnpm + bun), Ruby (chruby + ruby-install), Rust (rustup), Go\n- Languages **[N]**: Swift (swiftly), Java (openjdk), .NET SDK, Conda/Miniforge, deno\n- JVM extras batch **[N]**: Kotlin, Scala, Clojure, Gradle, Maven, Groovy\n\n**Maintenance**: `update` keeps every formula, cask, and language runtime current; `verify` shows gaps. Project-local files (`package.json`, `go.mod`, `.swift-version`, …) are never touched.\n\n## What changes on your machine\n\nConcrete footprint before you commit to `curl | zsh`. Everything destructive to existing files creates a timestamped backup first.\n\n**Always written** (critical install, no prompt):\n\n- `~/.zshrc` — **overwritten** with macsmith's shell config. Previous file saved to `~/.zshrc.backup.YYYYMMDD_HHMMSS`. User-defined `alias`/`export` lines are harvested into `~/.zshrc.local` (secret-shaped exports — `*_TOKEN`, `*_SECRET`, `*_KEY` — are deliberately skipped).\n- `~/.zprofile` — managed block appended between `# FINAL PATH CLEANUP` and `# End macsmith managed block` markers. Previous file saved to `~/.zprofile.backup.YYYYMMDD_HHMMSS`.\n- `~/.local/bin/` — adds 3 binaries: `macsmith`, `uninstall-nix-macos`, `uninstall-macsmith`.\n- `~/.local/share/macsmith/` — created. Stores install-state marker, version file, and mirror of all repo scripts (used by `upgrade` and `uninstall-macsmith`).\n- `~/.config/starship.toml` — written **only if missing**. Existing configs are never overwritten.\n- **Homebrew** — installed at `/opt/homebrew` (Apple Silicon) or `/usr/local` (Intel) if not already present. The Homebrew installer itself requests `sudo`.\n\n**Written only if you say yes** (per-tool `[Y]`/`[N]` prompt):\n\n- **Homebrew packages**, by profile:\n  - `power-user` **[Y]**: 24 formulae (btop, ripgrep, bat, gh, lazygit, tmux, neovim, chezmoi, …)\n  - `crypto/secrets` **[Y]**: 4 formulae (age, sops, gnupg, pinentry-mac)\n  - `netsec` **[N]**: 3 formulae + 1 cask (nmap, masscan, iperf3, Wireshark app) — strictly network-layer tools; web-app / DB-exploit scanners are deliberately excluded\n  - `devops/SRE` **[N]**: 17 formulae + 3 casks (kubectl, Terraform via `hashicorp/tap`, ansible, awscli, docker, orbstack, google-cloud-sdk, multipass, …)\n  - `databases` **[N]**: 2 formulae (mysql, postgresql@17)\n- **Language toolchains** (via `./dev-tools.sh`, each one its own `[Y]`/`[N]` prompt):\n  - Python → `~/.pyenv/`\n  - Node.js → `~/.nvm/`\n  - Ruby → `~/.rubies/`, `~/.local/share/chruby/`, `~/.local/share/ruby-install/`\n  - Rust → `~/.rustup/`, `~/.cargo/`\n  - Swift → `~/.swiftly/`\n  - .NET → `/usr/local/share/dotnet/` (via brew cask; `sudo` for first install)\n  - Java (OpenJDK), Go, Conda/Miniforge, uv, bun, pnpm, deno — individual prompts\n- **MacPorts** → `/opt/local/`. Every install and every update needs `sudo`.\n- **Nix** → `/nix/` APFS volume + `/etc/nix/` + `LaunchDaemons` + `_nixbld1..32` users + `nixbld` group + edits to `/etc/synthetic.conf` and `/etc/fstab`. **System-wide, daemon-based, `sudo` required, 10–20 min.** Largest footprint of anything we offer.\n\n**Never touched**:\n\n- Existing Homebrew formulae/casks you installed yourself (`update` only upgrades; never uninstalls).\n- Project-local files (`package.json`, `Gemfile`, `go.mod`, `.swift-version`, `.python-version`, `.nvmrc`, …).\n- System Ruby at `/usr/bin/ruby`, system Python, macOS defaults, login items.\n- `~/.ssh/`, `~/.gnupg/`, `~/.aws/`, and everything in `~/.config/` except `starship.toml` when it's missing.\n- `/Applications/`, `/Library/`, `/System/`.\n\n**Reversing it**:\n\n- `uninstall-macsmith` — removes the 3 binaries, `~/.local/share/macsmith/`, the managed `.zprofile` block, and offers to restore `~/.zshrc` from the oldest non-macsmith backup. Does NOT touch Homebrew or language toolchains.\n- `uninstall-profile \u003cname\u003e` — `brew uninstall` a sysadmin profile's formulae + casks.\n- `uninstall-nix` — full Nix removal including the APFS volume (the volume-delete step always requires typing `yes` — `--yes` on everything else, never there).\n- Language toolchains: removed by their own tools (`rm -rf ~/.pyenv`, `brew uninstall go`, `rustup self uninstall`, …).\n\n## Why not just …\n\n| Tool | macsmith adds |\n| --- | --- |\n| **`brew bundle`** | Language version managers, shell config, an `update` that understands every ecosystem |\n| **`chezmoi`** | macsmith installs chezmoi itself for dotfile sync — they're orthogonal |\n| **`nix-darwin`** | No Nix language to learn; imperative but idempotent |\n| **Your own dotfiles repo** | A starting point + a maintenance loop. Fork it |\n\n## Options\n\n- `MACSMITH_REF=\u003ctag\u003e` — pin the bootstrap to a specific release (reproducible installs)\n- `MACSMITH_UPDATE_CHECK=1` — opt in to a daily update check on shell start (off by default)\n- `NONINTERACTIVE=1` — auto-answer \"yes\" to every prompt (for CI / unattended re-runs)\n- `MACSMITH_FIX_RUBY_GEMS=1` — auto-fix Ruby gem permissions during `update` (on by default; set `0` to disable)\n\n## Your own customizations\n\nmacsmith manages `~/.zshrc`. Put your aliases and exports in `~/.zshrc.local` — it's sourced last so your edits survive reinstalls. Fresh installs also harvest existing `alias`/`export` lines from your old `~/.zshrc` into `~/.zshrc.local` automatically; secret-shaped exports (`*_TOKEN`, `*_SECRET`, `*_KEY`, …) are deliberately skipped — grab those from the timestamped backup next to your new `~/.zshrc`.\n\n**Prompt themes:** `starship preset --list` to browse, `starship preset \u003cname\u003e -o ~/.config/starship.toml` to apply. Examples: `tokyo-night`, `gruvbox-rainbow`, `pastel-powerline`, `catppuccin-powerline`, `pure-preset`.\n\n## Ghostty terminal (optional)\n\n```bash\nbrew install --cask ghostty\nmkdir -p ~/.config/ghostty\ncp \"Ghostty config.txt\" ~/.config/ghostty/config\ncp background/terminal-background.png ~/.config/ghostty/terminal-background.png\n```\n\nThe bundled config auto-installs macsmith's terminfo over SSH, so `xterm-ghostty: unknown terminal type` never appears on remote hosts.\n\n## Troubleshooting\n\n**Garbled glyphs in the VS Code integrated terminal** (random characters render as the wrong bitmap — `Read` → `�ead`, broken powerline separators, mangled spinner emoji). This is the WebGL renderer's glyph-atlas getting corrupted by the Nerd Font / powerline glyphs and emoji that Starship and other tools emit — not a shell-config bug. Fix it in VS Code's `settings.json`:\n\n```jsonc\n\"terminal.integrated.gpuAcceleration\": \"canvas\",\n\"terminal.integrated.fontFamily\": \"MesloLGS NF\"\n```\n\n`canvas` drops the buggy WebGL texture atlas while keeping 2D acceleration; pinning the font to an installed Nerd Font stops fallback rendering. Open a fresh terminal (or **Developer: Reload Window**) to apply. If it still corrupts, step down to `\"gpuAcceleration\": \"off\"` (pure DOM rendering, no GPU atlas at all).\n\n## Requirements\n\nmacOS 13 Ventura or later. Apple Silicon or Intel. That's it.\n\n## Uninstalling\n\nTwo bundled scripts, both defensive with `--dry-run` and `--yes` flags. Run `--dry-run` first to see exactly what will change.\n\n### Remove macsmith itself\n\n`uninstall-macsmith` removes what macsmith installed (binaries in `~/.local/bin/`, `~/.local/share/macsmith/`, the managed PATH block in `~/.zprofile`) and offers to restore `~/.zshrc` from the oldest non-macsmith-managed backup (skips `.zshrc.backup.*` files that look like they were made by a prior macsmith run so you get your original pre-macsmith config, not a macsmith template). Also offers to remove `~/.config/starship.toml`. It **keeps** Homebrew, any installed formulae/casks, language toolchains (pyenv/nvm/chruby/rustup/swiftly/go/…), `~/.zshrc.local`, and every file you created.\n\n```bash\nuninstall-macsmith --dry-run     # show what will change\nuninstall-macsmith               # interactive\nuninstall-macsmith --yes         # non-interactive\n```\n\n### Remove Nix (macOS)\n\n`uninstall-nix` cleanly removes a multi-user Nix install: launch daemons, `_nixbld*` users, `/etc/nix`, `/etc/synthetic.conf`, `/etc/fstab`, and the `Nix Store` APFS volume. Auto-detects the Determinate Systems installer and prefers `sudo /nix/nix-installer uninstall` when present.\n\n```bash\nuninstall-nix --dry-run\nuninstall-nix\nuninstall-nix --yes\n```\n\nBoth scripts are installed to `~/.local/bin/` by `./install.sh`. From a clone, you can also run `./scripts/uninstall-macsmith.sh` or `./scripts/uninstall-nix-macos.sh` directly. **macOS-only.** The Nix script re-execs under `sudo`; the APFS volume deletion always requires interactive confirmation typed as `yes` — `--yes` on `uninstall-nix` skips the other prompts but never that one. Read the scripts before running. A reboot is recommended after uninstalling Nix.\n\n## License\n\n[MIT](LICENSE).\n\n---\n\nIf macsmith saved you an afternoon, a ⭐ is the tip jar.\n\n[![GitHub stars](https://img.shields.io/github/stars/26zl/macsmith?style=social)](https://github.com/26zl/macsmith/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/26zl/macsmith?style=social)](https://github.com/26zl/macsmith/fork)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F26zl%2Fmacsmith","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F26zl%2Fmacsmith","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F26zl%2Fmacsmith/lists"}