🚨 The Problem
When developing web applications, you often need to test against local development environments while maintaining the same hostname as production (e.g., example.com).
Traditional solutions like editing the hosts file affect the entire system and require admin privileges.
✨ The Solution
Dev Browser creates custom browser app bundles with DNS override rules using Chromium's --host-resolver-rules flag.
- Uses separate browser profiles
- Applies DNS rules only to specific browser instances
- Runs alongside regular browsers
- Appears as native Mac apps
🚀 Quick Install
One-Command Install (Recommended)
curl -fsSL https://raw.githubusercontent.com/cjflory/dev-browser/main/dev-browser | bash -s install
Downloads the script and icons to ~/.local/share/dev-browser/ and creates a dev-browser command.
Manual Install
git clone https://github.com/cjflory/dev-browser.git
cd dev-browser
chmod +x dev-browser
./dev-browser install
🌟 Key Features
🌐 Multi-Browser Support
Auto-detects Chrome, Brave, Edge, Vivaldi, Opera, Arc
🎯 Smart Defaults
Auto-suggests profile names from app names
📁 Organized Storage
Defaults to ~/dev-browsers directory for easy management
📱 Native Mac Apps
Proper .app bundles with distinctive icons
🔒 Isolated Profiles
Separate from your main browser data
⚡ No Admin Required
No system-wide changes or privileges needed
💻 How to Use
Run the Command
dev-browser create
Follow Interactive Prompts
- Browser selection (auto-detected)
- App name (e.g., "Dev Environment")
- DNS rules (hostname → IP mappings)
- Optional custom icon
Launch Your Dev Browser
Double-click the created .app bundle or drag it to your Dock
🎯 Use Cases
Frontend Development
- Test React/Vue/Angular apps against different API environments
- Switch between local, staging, and production backends
- Debug cross-origin issues with proper domain names
Full-Stack Development
- Run multiple microservices locally with production-like URLs
- Test authentication flows with real domain names
- Validate SSL certificate handling in development
QA Testing
- Create dedicated browser profiles for each test environment
- Isolate test data and browser state
- Quick switching between different API versions
DevOps/Infrastructure
- Test load balancer configurations locally
- Validate DNS changes before going live
- Debug service discovery issues
📝 Example Commands
These are the main commands you'll use to create, manage, and remove your custom browser apps.
📋 Requirements
- Google Chrome
- Brave Browser
- Microsoft Edge
- Chromium
- Opera
- Arc Browser