{"id":50384782,"url":"https://github.com/omarss/os-doctor","last_synced_at":"2026-05-30T14:03:32.988Z","repository":{"id":349408876,"uuid":"1202200340","full_name":"omarss/os-doctor","owner":"omarss","description":"Cross-platform dev environment bootstrap, health checker, and OS hardening toolkit for Linux, macOS, Windows, and WSL.","archived":false,"fork":false,"pushed_at":"2026-04-05T19:08:01.000Z","size":96,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-05T21:05:29.564Z","etag":null,"topics":["bash","bootstrap","cross-platform","developer-tools","devops","dotfiles","hardening","linux","macos","powershell","shell","windows","wsl","zsh"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omarss.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-05T18:21:33.000Z","updated_at":"2026-04-05T19:08:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/omarss/os-doctor","commit_stats":null,"previous_names":["omarss/os-doctor"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/omarss/os-doctor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarss%2Fos-doctor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarss%2Fos-doctor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarss%2Fos-doctor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarss%2Fos-doctor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omarss","download_url":"https://codeload.github.com/omarss/os-doctor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarss%2Fos-doctor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33694738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"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","bootstrap","cross-platform","developer-tools","devops","dotfiles","hardening","linux","macos","powershell","shell","windows","wsl","zsh"],"created_at":"2026-05-30T14:03:31.936Z","updated_at":"2026-05-30T14:03:32.979Z","avatar_url":"https://github.com/omarss.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# os-doctor\n\n### One toolkit. Three shells. Every platform.\n\n**Bootstrap**, **diagnose**, **update**, and **harden** your dev environment with the same commands on Linux, macOS, Windows, WSL, and Android.\n\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n[![CI](https://img.shields.io/github/actions/workflow/status/omarss/os-doctor/lint.yml?branch=main\u0026label=ci\u0026logo=github)](https://github.com/omarss/os-doctor/actions/workflows/lint.yml)\n[![Platforms](https://img.shields.io/badge/platforms-linux%20%7C%20macos%20%7C%20windows%20%7C%20wsl%20%7C%20android-brightgreen)](#-whats-included)\n[![Shells](https://img.shields.io/badge/shells-bash%20%7C%20zsh%20%7C%20powershell-purple)](#-whats-included)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](.pre-commit-config.yaml)\n\n```text\n$ doctor\n  ✔ git 2.47.0\n  ✔ node v24.8.0\n  ✔ docker 27.3.1\n  ✘ java — not installed\n    → sdk install java 25.0.2-librca\n  ⚠ SSH key uses rsa (prefer ed25519)\n\n8 checks failed — run `doctor --fix` to repair\n```\n\n\u003c/div\u003e\n\n---\n\n## ✨ Why os-doctor?\n\nSetting up a dev machine means remembering dozens of install steps, debugging PATH conflicts, and hoping your Windows box matches your teammate's Mac. **os-doctor replaces that entire ritual with three commands that behave identically everywhere:**\n\n| | What it does |\n|---|---|\n| 🩺 **`doctor`** | Audits 50+ tools, PATH entries, git config, and security posture. Reports `✔` / `✘` / `⚠` with color, and tells you exactly how to fix each failure. |\n| 🔧 **`doctor --fix`** | Actually runs those fixes. Requests sudo/admin upfront so you can walk away. |\n| 📦 **`install`** | Bootstraps a fresh machine from scratch — package managers, runtimes, SDKs, CLI tools. |\n| ⬆️ **`update`** | Upgrades every package manager in one shot. Skips anything you haven't installed. |\n\nPlus `optimize/*` scripts for OS-level **hardening** (CIS-style benchmarks for Windows, Ubuntu, macOS, and Android).\n\n---\n\n## 🚀 Quick Start\n\n### Linux / macOS / WSL\n\n```bash\ngit clone https://github.com/omarss/os-doctor.git \u0026\u0026 cd os-doctor\n./install.sh          # auto-detects OS, installs the right profile\n```\n\n### Windows\n\n```powershell\ngit clone https://github.com/omarss/os-doctor.git; cd os-doctor\n.\\install.bat          # or double-click in Explorer\n```\n\n### Manual install\n\n\u003cdetails\u003e\n\u003csummary\u003eCopy the profile yourself\u003c/summary\u003e\n\n```bash\n# Linux / WSL\ncp shells/bashrc ~/.bashrc \u0026\u0026 source ~/.bashrc\n\n# macOS\ncp shells/zshrc ~/.zshrc \u0026\u0026 source ~/.zshrc\n```\n\n```powershell\n# Windows PowerShell\nCopy-Item shells/windows.ps1 $PROFILE\n. $PROFILE\n```\n\u003c/details\u003e\n\nAfter installing, restart your shell and run `doctor` to see where you stand.\n\n---\n\n## 📖 Table of Contents\n\n- [The Three Commands](#-the-three-commands)\n- [What's Included](#-whats-included)\n- [Doctor Checks](#-doctor-checks)\n- [Optimizers (OS Hardening)](#-optimizers-os-hardening)\n- [Architecture](#-architecture)\n- [Pinned Versions](#-pinned-versions)\n- [Contributing](#-contributing)\n- [License](#-license)\n\n---\n\n## 🎯 The Three Commands\n\nEvery command works the same on every platform. Every command supports `--help`.\n\n```bash\ndoctor                   # run all health checks\ndoctor --fix             # fix what can be fixed automatically\ndoctor --help            # usage\n\ninstall                  # bootstrap a fresh machine\nupdate                   # upgrade every installed package manager\n\ndevenv-help              # show the full command reference\ndevenv-help doctor       # per-command detail\n```\n\n**Extra commands** bundled with the profile:\n\n| Command | Description |\n|---|---|\n| 🐳 `docker-start` / `docker-stop` | Start or stop Docker (daemon on Linux, Desktop on macOS/Windows) |\n| 💣 `docker-nuke` | Remove **all** containers, images, volumes — with confirmation |\n| 📂 `dsize [path]` | Show directory sizes (uses `dust` if available, else `du`) |\n| 🔗 `gh_latest owner/repo \u003cpattern\u003e` | Get the latest GitHub release download URL |\n\n---\n\n## 📦 What's Included\n\n### Shell profiles\n\n| File | Platform | Shell framework |\n|---|---|---|\n| [`shells/bashrc`](shells/bashrc) | Linux · WSL · Ubuntu | bash + Oh My Bash |\n| [`shells/zshrc`](shells/zshrc) | macOS | zsh + Oh My Zsh |\n| [`shells/windows.ps1`](shells/windows.ps1) | Windows | PowerShell 5.1+ / 7+ |\n\n### Aliases (all platforms)\n\n| Alias | Expands to | | Alias | Expands to |\n|---|---|---|---|---|\n| `g` | `git` | | `k` | `kubectl` |\n| `lg` | `lazygit` | | `kctx` | `kubectl config current-context` |\n| `d` | `docker` or `podman` | | `kns` | `kubectl config set-context --current --namespace` |\n| `dc` | `docker compose` | | `tf` | `terraform` |\n| `ls` | `eza` with icons | | `..` · `...` | navigate up |\n\n🛡️ **Safety guards.** `rm`, `mv`, `cp` are aliased with `-i`/`-I` to require confirmation before destructive writes.\n\n### Autocomplete\n\n- **Bash** — TAB cycles completions, colored file-type hints, case-insensitive\n- **Zsh** — arrow-key menu select, grouped by category, colored\n- **PowerShell** — predictive IntelliSense from history, ListView suggestions\n- **Auto-loaded completions** — `kubectl`, `gh`, `docker`\n\n### Unix polyfills *(Windows only)*\n\nGit-for-Windows `usr\\bin` goes on PATH (`grep`, `sed`, `awk`, `find`, `xargs`, …) plus PowerShell functions for `touch`, `which`, `head`, `tail`, `wc`, `grep`, `df`, `ln`, `export`, `unset`.\n\n---\n\n## 🩺 Doctor Checks\n\n`doctor` validates your entire dev environment across **ten categories**:\n\n| Category | What's verified |\n|---|---|\n| 🛠️ **System tools** | `apt`, `curl`, `git`, `jq`, `python3`, `wget`, `telnet`, `htop`, `tree` |\n| 📦 **Package managers** | Homebrew · `npm` · `pnpm` · `cargo` · `rustup` · `winget` · `choco` · `scoop` |\n| ⚙️ **Runtimes** | Node ≥ 24 (LTS) · Java ≥ 25 (LTS) · NVM · SDKMAN |\n| 🐳 **Containers** | Docker · Podman · Socktainer *(macOS)* · `kubectl` · `kubectx` · `k9s` |\n| ☁️ **Cloud \u0026 infra** | Terraform · gcloud · GitHub CLI |\n| 🔧 **CLI tools** | `fzf` · `eza` · `dust` · `httpie` · `lazygit` · `starship` · Claude Code |\n| 📱 **Android SDK** | `ANDROID_HOME` · `cmdline-tools` · `platform-tools` · `sdkmanager` |\n| 🔒 **Security** | Firewall · SSH keys (Ed25519) · git credentials · disk encryption |\n| 🧭 **PATH** | Duplicates · stale entries · `JAVA_HOME` consistency |\n| ⚙️ **Configuration** | Git settings · auth status · editor · `pull.rebase` · line endings |\n\n**Platform extras:**\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e🐧 \u003cb\u003eLinux / WSL\u003c/b\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003e🪟 \u003cb\u003eWindows\u003c/b\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003e🍎 \u003cb\u003emacOS\u003c/b\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd valign=\"top\"\u003e\n\n- WSL `appendWindowsPath`\n- `systemd` enabled\n- VS Code Server\n\n\u003c/td\u003e\n\u003ctd valign=\"top\"\u003e\n\n- Defender status\n- Secure Boot\n- BitLocker\n- Scoop, Windows features\n\n\u003c/td\u003e\n\u003ctd valign=\"top\"\u003e\n\n- FileVault\n- Gatekeeper\n- SIP\n- Xcode license\n- Socktainer socket\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n## 🛡️ Optimizers (OS Hardening)\n\nStandalone scripts in `optimize/` that go beyond the shell profile and harden the underlying OS. Each follows the same workflow: **default** profile ships safe settings, **strict** profile turns on aggressive hardening, **`--dry-run`** shows you everything first.\n\n| Script | Platform | Based on |\n|---|---|---|\n| [`optimize/windows.ps1`](optimize/windows.ps1) | Windows 11 | CIS Windows 11 Enterprise Benchmark |\n| [`optimize/ubuntu.sh`](optimize/ubuntu.sh) | Ubuntu · WSL | CIS Ubuntu Benchmark |\n| [`optimize/macos.sh`](optimize/macos.sh) | macOS | Apple Platform Security guidance |\n| [`optimize/android.sh`](optimize/android.sh) | Android *(via adb)* | AOSP best practices |\n\n### Common flags\n\nEvery optimizer understands the same surface area:\n\n```bash\n\u003cscript\u003e                  # default safe profile\n\u003cscript\u003e --profile strict # stronger hardening\n\u003cscript\u003e --dry-run        # preview without changes\n\u003cscript\u003e --clean          # cleanup only\n\u003cscript\u003e --interactive    # pick categories to run\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e🪟 \u003cb\u003eWindows 11 hardening\u003c/b\u003e — Defender, Credential Guard, HVCI, SMB signing, DNS over HTTPS, telemetry, bloatware removal, ASR rules…\u003c/summary\u003e\n\n```powershell\n.\\optimize\\windows.ps1                              # recommended default\n.\\optimize\\windows.ps1 -HardeningProfile Strict -BlockNTLM\n.\\optimize\\windows.ps1 -DisableRemoteDesktop\n.\\optimize\\windows.ps1 -DryRun\n.\\optimize\\windows.ps1 -Interactive\n.\\optimize\\windows.ps1 -Clean\n```\n\nCreates a system restore point before changes. Strict NTLM blocking requires explicit `-BlockNTLM`; Remote Desktop stays available unless `-DisableRemoteDesktop` is passed.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e🐧 \u003cb\u003eUbuntu / WSL\u003c/b\u003e — sysctl tuning, journald limits, unattended-upgrades, UFW, SSH hardening, privacy cleanup…\u003c/summary\u003e\n\n```bash\nsudo ./optimize/ubuntu.sh                  # default safe profile\nsudo ./optimize/ubuntu.sh --profile strict\nsudo ./optimize/ubuntu.sh --dry-run\nsudo ./optimize/ubuntu.sh --clean\nsudo ./optimize/ubuntu.sh --interactive\n```\n\nDetects WSL and skips Linux-native actions that don't apply there.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e🍎 \u003cb\u003emacOS\u003c/b\u003e — Dock/Finder tuning, firewall, Gatekeeper, FileVault nudging, cache cleanup…\u003c/summary\u003e\n\n```bash\nsudo ./optimize/macos.sh\nsudo ./optimize/macos.sh --profile strict\nsudo ./optimize/macos.sh --dry-run\nsudo ./optimize/macos.sh --clean\nsudo ./optimize/macos.sh --interactive\n```\n\nCleans Xcode DerivedData, Homebrew leftovers, and common developer caches.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e📱 \u003cb\u003eAndroid\u003c/b\u003e — animation scales, scan shutdown, package verification, dex optimization (via adb, no on-device script)…\u003c/summary\u003e\n\n```bash\n./optimize/android.sh                          # auto-target single device\n./optimize/android.sh --serial emulator-5554\n./optimize/android.sh --profile strict\n./optimize/android.sh --dry-run\n./optimize/android.sh --clean\n```\n\nOEM support varies — unsupported keys are logged as warnings instead of aborting.\n\u003c/details\u003e\n\n---\n\n## 🏗️ Architecture\n\nEvery shell profile follows the same nine-section layout, so jumping between `bashrc` / `zshrc` / `windows.ps1` feels the same:\n\n```\n1. Shell framework        → Oh My Bash · Oh My Zsh · Starship\n2. PATH \u0026 environment     → idempotent, guarded, deduped\n3. Shell settings         → autocomplete, completions (kubectl, gh, docker)\n4. Aliases                → navigation · containers · infra · safety\n5. Utility functions      → gh_latest · dsize · docker-{start,stop,nuke}\n6. fzf integration        → Ctrl-R history search\n7. update()               → per-platform package manager upgrades\n8. install()              → full bootstrap with auto-elevation (Windows)\n9. doctor()               → health checks with colored output\n```\n\n### Repo layout\n\n```\nos-doctor/\n├── shells/               # profiles deployed to user ($HOME, $PROFILE)\n│   ├── bashrc            # Linux · WSL\n│   ├── zshrc             # macOS\n│   └── windows.ps1       # Windows PowerShell 5.1+ / 7+\n├── optimize/             # standalone OS-hardening scripts\n│   ├── ubuntu.sh · macos.sh · android.sh · windows.ps1\n├── install.sh            # POSIX entry point (Linux · macOS · WSL)\n├── install.bat           # Windows entry point\n├── .github/              # CI workflows + issue/PR templates\n├── .pre-commit-config.yaml\n└── CLAUDE.md · AGENTS.md # contributor \u0026 agent guidance\n```\n\n---\n\n## 📌 Pinned Versions\n\n| Tool | Version |\n|---|---|\n| NVM | [v0.40.4](https://github.com/nvm-sh/nvm/releases/tag/v0.40.4) |\n| Java | [25.0.2-librca](https://bell-sw.com/pages/downloads/) *(Liberica LTS)* |\n| Kubernetes apt repo | v1.35 |\n| Android build-tools | 36.1.0 |\n| Android platforms | android-36 |\n\nUpgrade policy: **latest stable** for actions/workflows, **latest LTS** for runtimes.\n\n---\n\n## 🤝 Contributing\n\nPRs welcome! Please read [**CONTRIBUTING.md**](CONTRIBUTING.md) — it covers the cross-platform parity checklist, lint workflow (`pre-commit install \u0026\u0026 pre-commit run --all-files`), and common pitfalls.\n\n- 🐛 [Report a bug](https://github.com/omarss/os-doctor/issues/new?template=bug_report.md)\n- ✨ [Request a feature](https://github.com/omarss/os-doctor/issues/new?template=feature_request.md)\n- 🔒 Security issue? See [**SECURITY.md**](SECURITY.md) — please **don't** open a public issue\n- 📜 [Code of Conduct](CODE_OF_CONDUCT.md)\n\n---\n\n## 📜 License\n\nLicensed under the [**Apache License 2.0**](LICENSE). See [NOTICE](NOTICE) for attribution.\n\n\u003cdiv align=\"center\"\u003e\n\n---\n\nMade with care for developers who hop between machines.\n\n**[⬆ Back to top](#os-doctor)**\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomarss%2Fos-doctor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomarss%2Fos-doctor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomarss%2Fos-doctor/lists"}