Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Browser Air Traffic Controller

A macOS app that routes URLs to different Google Chrome profiles based on regex rules. Set it as your default browser, and every link you click automatically opens in the right Chrome profile โ€” work links go to your work profile, personal links to your personal profile, and so on.

Requirements

  • macOS 14.0+
  • Swift 6.0 toolchain
  • Google Chrome installed

Installation

brew install --cask suenyiyang/browser-atc/browser-atc
xattr -dr com.apple.quarantine "$(brew --caskroom)/browser-atc"/*/*.app

After installation, open the app, then go to System Settings โ†’ Desktop & Dock โ†’ Default web browser and select Browser Air Traffic Controller.

Build from source

make install

This builds the app and copies it to ~/Applications/BrowserATC.app.

Usage

Adding Rules

Click the + button to create a routing rule. Each rule has:

  • Pattern โ€” a regex matched against the full URL (e.g. github\.com/my-org or .*\.slack\.com)
  • Profile โ€” the Chrome profile to open matching URLs in
  • Enabled โ€” toggle rules on/off without deleting them

Rules are evaluated top-to-bottom; the first match wins. Drag to reorder.

Default Profile

In Settings, pick a fallback Chrome profile for URLs that don't match any rule.

Testing

Use the Test URL field in Settings to check which rule (if any) matches a given URL before you commit to it.

Development

make build    # Compile release binary
make run      # Build, bundle, and launch the app
make clean    # Remove build artifacts

The project uses Swift Package Manager โ€” no Xcode project required. You can also open the directory in Xcode via open Package.swift.

How It Works

The app registers as a browser handler for http/https schemes via its Info.plist. When macOS routes a URL to it, the app matches the URL against your rules using Swift's Regex API, launches Chrome with the --profile-directory flag for the matched profile, and immediately hides itself.

Chrome profiles are auto-detected by reading Chrome's Local State file. Rules are stored as JSON in ~/Library/Application Support/BrowserATC/.

License

Apache License 2.0

About

Browser air traffic controller for your browsers and profiles. Open correct browser with one click. ๐Ÿ‘†

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages