{"id":49146517,"url":"https://github.com/lakminagamage/macnetty","last_synced_at":"2026-04-22T04:05:47.073Z","repository":{"id":343538950,"uuid":"1149626928","full_name":"lakminagamage/macNetty","owner":"lakminagamage","description":"Simple Network config manager and WIFI Network based automation CLI tool for MacOS","archived":false,"fork":false,"pushed_at":"2026-03-10T18:41:45.000Z","size":26,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-11T00:21:07.461Z","etag":null,"topics":["apple-silicon","m1-mac","macos-package","macosx","network-configuration","wifimanager"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lakminagamage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-02-04T10:31:01.000Z","updated_at":"2026-03-10T18:41:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lakminagamage/macNetty","commit_stats":null,"previous_names":["lakminagamage/macnetty"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lakminagamage/macNetty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lakminagamage%2FmacNetty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lakminagamage%2FmacNetty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lakminagamage%2FmacNetty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lakminagamage%2FmacNetty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lakminagamage","download_url":"https://codeload.github.com/lakminagamage/macNetty/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lakminagamage%2FmacNetty/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32120408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"online","status_checked_at":"2026-04-22T02:00:05.693Z","response_time":58,"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":["apple-silicon","m1-mac","macos-package","macosx","network-configuration","wifimanager"],"created_at":"2026-04-22T04:04:41.468Z","updated_at":"2026-04-22T04:05:47.064Z","avatar_url":"https://github.com/lakminagamage.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# macNetty 🌐🍎\n\n\u003e **A beautiful, interactive CLI wizard for macOS network configuration and auto-switching**\n\nmacNetty simplifies network management for macOS users by providing an elegant command-line interface to create location-based network profiles and automatically switch between them based on your Wi-Fi connection.\n\n![macOS](https://img.shields.io/badge/macOS-10.12+-blue.svg)\n![Bash](https://img.shields.io/badge/bash-4.0+-green.svg)\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n\n## ✨ Features\n- 🔧 **Network Profile Management** - Create and delete location-based profiles for different Wi-Fi networks\n- 📡 **Static IP Configuration** - Set custom IP addresses, gateways, and subnet masks\n- 🌐 **DNS Server Configuration** - Set custom DNS servers (Google DNS, Cloudflare, OpenDNS, etc.)\n- 🔐 **Proxy Support** - Configure HTTP/HTTPS proxies per network location\n- 🔄 **Auto-Switching** - Automatically switch network profiles when connecting to different Wi-Fi networks\n- 🗑️ **Easy Profile Deletion** - Remove unwanted network profiles with confirmation prompts\n- 🍏 **Apple Silicon Compatible** - Uses `ipconfig` for M1/M2/M3 Mac compatibility\n- 🚫 **Zero Dependencies** - Pure Bash - no Python, Node.js, or external libraries required\n- 🎨 **Beautiful CLI Interface** - Color-coded output with ASCII art for a modern terminal experience\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- macOS 10.12 or later\n- Administrator (sudo) access\n\n### Installation\n\n1. **Download macNetty:**\n   ```bash\n   curl -O https://raw.githubusercontent.com/lakminagamage/macNetty/main/macNetty.sh\n   chmod +x macNetty.sh\n   ```\n\n2. **Run the wizard:**\n   ```bash\n   sudo ./macNetty.sh\n   ```\n\nThat's it! No compilation, no dependencies, no package managers.\n\n## 📖 Usage\n\n### Main Menu Options\n\nWhen you run macNetty, you'll see four options:\n\n```\n[1] Create New Network Profile\n[2] Delete Network Profile\n[3] Install Auto-Switcher (Set \u0026 Forget)\n[4] Exit\n```\n\n### Option 1: Create New Network Profile\n\nCreate a custom network configuration for a specific Wi-Fi network:\n\n1. Enter the exact Wi-Fi SSID (network name)\n2. Choose whether to use Static IP (optional)\n   - Enter IP Address, Gateway, and Subnet Mask\n3. Choose whether to configure a Proxy (optional)\n   - Enter Proxy Host and Port\n4. Choose whether to set custom DNS servers (optional)\n   - Enter Primary DNS (e.g., 8.8.8.8 for Google DNS)\n   - Enter Secondary DNS (optional, e.g., 8.8.4.4)\n\n**Example Use Case:** Configure your office Wi-Fi with a static IP, custom DNS, and proxy, while your home Wi-Fi uses DHCP.\n\n### Option 2: Delete Network Profile\n\nRemove an existing network profile:\n\n1. Select option [2] from the main menu\n2. View the list of all available network profiles\n3. Enter the exact name of the profile you want to delete\n4. Confirm deletion when prompted\n\n**Safety Features:**\n- Lists all profiles before deletion\n- Requires exact profile name match\n- Asks for confirmation before removing\n- Shows clear success/error messages\n\n**Example Use Case:** Remove old network profiles for Wi-Fi networks you no longer use, such as previous workplace networks or temporary hotspots.\n\n### Option 3: Install Auto-Switcher\n\nSet up automatic network profile switching:\n\n- Monitors your Wi-Fi connection every 10 seconds\n- Automatically switches to the matching network profile when you connect to a known Wi-Fi network\n- Runs silently in the background via macOS LaunchAgent\n- Logs activity to `/tmp/wifichanger.log`\n\n**Perfect for:** Users who frequently move between home, office, coffee shops, etc.\n\n## 🔧 How It Works\n\n### Network Profiles\n\nmacNetty uses macOS's built-in **Network Locations** feature (`networksetup`) to create and manage profiles. Each Wi-Fi SSID gets its own location with custom settings.\n\n### Auto-Switching\n\nThe auto-switcher works by:\n\n1. Creating a monitor script (`~/.locationchanger/monitor.sh`)\n2. Installing a LaunchAgent that runs the script every 10 seconds\n3. Comparing current Wi-Fi SSID to current network location\n4. Switching locations automatically when they don't match\n\nThe monitor script uses `ipconfig getsummary en0` for Apple Silicon compatibility, ensuring it works on both Intel and ARM-based Macs.\n\n## 📝 Examples\n\n### Configure Static IP for Office Network\n\n```bash\nsudo ./macNetty.sh\n# Select [1] Create New Network Profile\n# Enter SSID: OfficeWiFi\n# Static IP? y\n# IP: 192.168.10.100\n# Gateway: 192.168.10.1\n# Subnet: 255.255.255.0\n# Proxy? n\n# Custom DNS? n\n```\n\n### Configure Home Network with Custom DNS\n\n```bash\nsudo ./macNetty.sh\n# Select [1] Create New Network Profile\n# Enter SSID: HomeWiFi\n# Static IP? n\n# Proxy? n\n# Custom DNS? y\n# Primary DNS: 8.8.8.8          # Google DNS\n# Secondary DNS: 8.8.4.4        # Google DNS backup\n```\n\n### Popular DNS Providers\n\n- **Google Public DNS:** 8.8.8.8 / 8.8.4.4\n- **Cloudflare DNS:** 1.1.1.1 / 1.0.0.1\n- **OpenDNS:** 208.67.222.222 / 208.67.220.220\n- **Quad9:** 9.9.9.9 / 149.112.112.112\n\n### Delete Old Network Profile\n\n```bash\nsudo ./macNetty.sh\n# Select [2] Delete Network Profile\n# View the list of profiles\n# Enter profile name: OldOfficeWiFi\n# Confirm deletion: y\n# Profile deleted!\n```\n\n### Setup Auto-Switching\n\n```bash\nsudo ./macNetty.sh\n# First, create profiles for each network (option 1)\n# Then select [3] Install Auto-Switcher\n# Done! Your Mac will now auto-switch\n```\n\n\n## 🐛 Troubleshooting\n\n### Auto-switcher not working?\n\nCheck if the LaunchAgent is running:\n```bash\nlaunchctl list | grep wifichanger\n```\n\nView logs:\n```bash\ntail -f /tmp/wifichanger.log\n```\n\n### Permission errors?\n\nMake sure you're running with `sudo`:\n```bash\nsudo ./macNetty.sh\n```\n\n### Network not switching?\n\nVerify the location was created:\n```bash\nnetworksetup -listlocations\n```\n\nCheck current location:\n```bash\nnetworksetup -getcurrentlocation\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Here's how you can help:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n### Ideas for Contributions\n\n- IPv6 support\n- VPN integration\n- Export/import profiles\n- Network quality testing (ping, speed test)\n- GUI wrapper\n- Homebrew formula\n- Bluetooth network configuration\n\n## 📄 License\n\nThis project is licensed under the MIT License.\n\n\n## 🙏 Acknowledgments\n\nThe Wi-Fi network based automation tool is inspired by [eprev's locationchanger script](https://github.com/eprev/locationchanger). Thanks for your contribution!\n\n\n## 📬 Support\n\nIf you find macNetty useful, please:\n- ⭐ Star this repository\n- 🐛 Report bugs via Issues\n- 💡 Suggest features via Issues\n- 📢 Share with others who might benefit\n\n---\n\n\n**Made with ❤️ for Mac users who love the terminal**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flakminagamage%2Fmacnetty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flakminagamage%2Fmacnetty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flakminagamage%2Fmacnetty/lists"}