{"id":51490146,"url":"https://github.com/johnpatrickroach/better-anonymity","last_synced_at":"2026-07-07T11:00:36.260Z","repository":{"id":346685637,"uuid":"1128610986","full_name":"johnpatrickroach/better-anonymity","owner":"johnpatrickroach","description":"MacOS Security, Privacy \u0026 Anonymity Tools","archived":false,"fork":false,"pushed_at":"2026-06-18T16:33:52.000Z","size":5652,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-05T20:04:21.518Z","etag":null,"topics":["anonymity","bash","brew","cli","command-line-tool","dnscrypt-proxy","firefox","gpg","homebrew","macos","os-hardening","pip","privacy","privoxy","pypi","security","shell","tor","unbound","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/johnpatrickroach.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":"2026-01-05T22:38:55.000Z","updated_at":"2026-06-11T18:30:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/johnpatrickroach/better-anonymity","commit_stats":null,"previous_names":["johnpatrickroach/better-anonymity"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/johnpatrickroach/better-anonymity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnpatrickroach%2Fbetter-anonymity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnpatrickroach%2Fbetter-anonymity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnpatrickroach%2Fbetter-anonymity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnpatrickroach%2Fbetter-anonymity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnpatrickroach","download_url":"https://codeload.github.com/johnpatrickroach/better-anonymity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnpatrickroach%2Fbetter-anonymity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35225029,"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-07-07T02:00:07.222Z","response_time":90,"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":["anonymity","bash","brew","cli","command-line-tool","dnscrypt-proxy","firefox","gpg","homebrew","macos","os-hardening","pip","privacy","privoxy","pypi","security","shell","tor","unbound","zsh"],"created_at":"2026-07-07T11:00:33.547Z","updated_at":"2026-07-07T11:00:36.251Z","avatar_url":"https://github.com/johnpatrickroach.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# better-anonymity\n\n## MacOS Security, Privacy \u0026 Anonymity Tools\n\nThis repository contains scripts and configuration files to automate the hardening of MacOS (Intel and Apple Silicon). It aims to enhance security, privacy, and anonymity by applying best practices inspired by the [drduh/macOS-Security-and-Privacy-Guide](https://github.com/drduh/macOS-Security-and-Privacy-Guide) and [privacy.sexy](https://privacy.sexy).\n\n### Credits \u0026 Influences\n\nA significant portion of the aggressive privacy tuning and \"Privacy Over Security\" configurations found within this toolkit's macOS hardening logic is directly influenced by and adapted from the excellent work over at **[privacy.sexy](https://github.com/undergroundwires/privacy.sexy)** by undergroundwires. We highly recommend checking out their project for comprehensive cross-platform privacy scripts.\n\n### Command Aliases\n\nWhen you run `better-anonymity install` (or \"Install CLI Aliases\"), the following shortcuts are added to your shell (`~/.zshrc`):\n\n| Alias | Equivalent Command | Description |\n| :--- | :--- | :--- |\n| `torify` | `export ALL_PROXY=...` | Enables Tor SOCKS5 proxy for current shell session |\n| `untorify` | `unset ALL_PROXY` | Disables Tor proxy for current shell session |\n| `tor-run \u003ccmd\u003e` | `env ALL_PROXY=... \u003ccmd\u003e` | Runs a single command through Tor (e.g., `tor-run curl ifconfig.me`) |\n| `stay-connected` | `b-a captive monitor` | Monitoring tool for flaky Wi-Fi / Captive Portals |\n| `i2pify` | `export http_proxy=...` | Enables I2P HTTP proxy for current shell session |\n\n## Disclaimer\n\n**USE AT YOUR OWN RISK.**\n\nThese scripts modify system settings, network configurations, and application preferences. While every effort has been made to ensure safety, applying these settings may break functionality (e.g., Handoff, AirDrop, certain iCloud features).\n\n* **Always backup your data before running these scripts.**\n* Review the scripts before execution to understand what changes will be applied.\n* It is recommended to test in a Virtual Machine first.\n\n## Features\n\n* **OS Hardening**: Disables telemetry, enables firewall with hardware-level IP blocklists (`pfctl`), configures secure boot requirements.\n* **Network Privacy**: DNS configuration, Privoxy setup for local proxying, Boot-persistent MAC Spoofing via event-driven LaunchDaemons.\n* **Browser Hardening**: Automated surgical `user.js` injection for Firefox/LibreWolf privacy.\n* **Anonymity**: Scripts to assist with Tor configuration and I2P installation.\n* **UX**: Automatic Sudo Keep-Alive to minimize password prompts during setup.\n\n## Installation\n\nChoose your preferred installation method:\n\n### Option 1: Homebrew (Recommended)\n\nInstall directly using our custom Homebrew tap:\n\n```bash\nbrew tap johnpatrickroach/better-anonymity\nbrew install better-anonymity\n```\n\n### Option 2: Pip (Python)\n\nYou can install the highly accessible Python wrapper directly from PyPI. This will automatically install dependencies and place the CLI in your `$PATH`.\n\n```bash\npip install better-anonymity\n```\n\n*Note: On newer macOS versions, you might encounter an \"externally-managed-environment\" error. If so, we recommend using `pipx install better-anonymity`.*\n\n### Option 3: Install from Source\n\nIf you prefer to run the raw Bash scripts or want to contribute to the codebase, clone the repository directly:\n\n```bash\ngit clone https://github.com/johnpatrickroach/better-anonymity.git\ncd better-anonymity\n```\n\nThen, manually install the global aliases (`b-a`):\n\n```bash\n./bin/better-anonymity install\n```\n\n## Configuration\n\nBy default, running `better-anonymity harden` will comprehensively execute every macOS privacy and security countermeasure built into the toolkit. \n\nHowever, you can surgically customize exactly which actions execute by modifying the `config/settings.json` file natively included in the repository.\n\n```json\n{\n    \"hardening\": {\n        \"enable_firewall\": true,\n        \"disable_analytics\": false,\n        \"anonymize_hostname\": true,\n        \"ensure_lockdown\": false\n    }\n}\n```\n\nIf you set any specific module to `false`, the hardening script will structurally bypass that component during execution without prompt. This is ideal for building tailored execution baselines that don't intrude on explicit network features you rely on.\n\n## Quick Start (Recommended)\n\n1. **First Run Setup**: Launch the interactive wizard to apply the security baseline.\n\n    ```bash\n    better-anonymity setup\n    ```\n\n2. **Check Your Score**: Analyze your system's current privacy/anonymity status.\n\n    ```bash\n    better-anonymity diagnose\n    ```\n\n3. **Interactive Menu**: Explore all features via the dashboard.\n\n    ```bash\n    better-anon\n    ```\n\n## Usage\n\nYou can use the interactive menu or individual commands. CLI aliases `better-anonymity`, `better-anon`, and `b-a` are interchangeable.\n\n### Common Commands\n\n* **Diagnosis**:\n\n  ```bash\n  b-a diagnose\n  b-a --version\n  ```\n\n* **Explaining Commands**:\n  Use the `--explain` flag with any command to see what it does without running it.\n\n  ```bash\n  b-a setup --explain\n  b-a network-anon --explain\n  ```\n\n* **Hardening**:\n\n  ```bash\n  b-a harden    # Apply macOS hardening\n  b-a ssh       # SSH Hardening menu\n  ```\n\n* **Tools**:\n\n  ```bash\n  b-a tor install\n  b-a install signal\n  b-a dns quad9\n  b-a network-open  # Restore network defaults\n  b-a network-anon  # Enable all anonymity services\n  b-a captive monitor # Launch connectivity monitor\n  ```\n\n### Updates\n\nKeep your installation current:\n\n```bash\nb-a check-update    # Check if updates are available\nb-a update          # Auto-upgrades via Brew, Pip, or Git natively\nb-a test            # Run unit tests\n```\n\n### Uninstallation \u0026 Restore\n\nTo remove the CLI aliases (`b-a`, `better-anon`) from your system:\n\n```bash\nbetter-anonymity uninstall\n```\n\n**New**: You will be prompted to:\n\n1. **Restore System State**: Revert Hostname, DNS, and Firewall to their original values (captured during setup).\n2. **Uninstall Tools**: Automatically remove tools installed by `better-anonymity` (e.g., Tor, Privoxy).\n3. **Scrub Environment**: Remove the `~/.better-anonymity` cache and dynamically wipe the convenience alias blocks from your `~/.zshrc`.\n\n*Note: Manual verification is recommended after uninstallation to ensure all desired changes are reverted.*\n\n### Documentation\n\nFor detailed information on each module, please refer to the specific documentation:\n\n* **[OS Hardening](docs/OS_HARDENING.md)**: Firewall, Analytics, Spotlight, Screen Saver.\n* **[Network Privacy](docs/NETWORK.md)**: DNS configuration and Wi-Fi hygiene.\n* **[Privoxy](docs/PRIVOXY.md)**: Local proxy for adblocking and privacy.\n* **[Tor](docs/TOR.md)**: Anonymity network configuration.\n* **[Firefox Hardening](docs/BROWSER.md)**: `user.js` configuration.\n* **[GPG](docs/GPG.md)**: Strong cryptography settings.\n* **[Password Generator](docs/PASSWORD.md)**: Strong passphrase generation.\n\n### Shell Completions\n\nTo enable **zsh** completions (tab-autocomplete), add the following to your `.zshrc`:\n\n```bash\n# Add better-anonymity completions to fpath\necho 'fpath=(/path/to/better-anonymity/completions $fpath)' \u003e\u003e ~/.zshrc\necho 'autoload -Uz compinit \u0026\u0026 compinit' \u003e\u003e ~/.zshrc\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnpatrickroach%2Fbetter-anonymity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnpatrickroach%2Fbetter-anonymity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnpatrickroach%2Fbetter-anonymity/lists"}