Skip to main content

No project description provided

Project description

macdefaultbrowsy

A command-line tool and package (written in Python) for macOS that allows you to view installed browsers and set the default web browser, with automatic dialog confirmation.

Features

  • List all installed web browsers with the current default marked with *
  • Set any browser as the default with a simple command
  • Automatically confirms the system dialog (no manual clicking required)
  • Built as a universal binary (Intel + Apple Silicon)
  • Simple installation via Homebrew or manual install

Installation

uv pip install --system macdefaultbrowsy

or

pip install git+https://github.com/twardoch/macdefaultbrowsy

Usage

List all browsers

macdefaultbrowsy

Output example:

  chrome
  firefox
* safari
  edge

Set default browser

macdefaultbrowsy chrome

The tool will automatically set Chrome as your default browser and confirm the system dialog.

How it Works

The tool uses the macOS Launch Services API to:

  1. Query all installed applications that can handle HTTP/HTTPS URLs
  2. Get the current default browser
  3. Set a new default browser for both HTTP and HTTPS schemes

When setting a new default browser, the tool also uses AppleScript automation to automatically click the confirmation button in the system dialog, providing a seamless experience.

Development

To capture a snapshot of the codebase:

npx repomix -i ".giga,.cursorrules,.cursor,*.md" -o llms.txt .

License

This project is licensed under the MIT License - see the LICENSE file for details.

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

macdefaultbrowsy-2.0.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

macdefaultbrowsy-2.0.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file macdefaultbrowsy-2.0.0.tar.gz.

File metadata

  • Download URL: macdefaultbrowsy-2.0.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for macdefaultbrowsy-2.0.0.tar.gz
Algorithm Hash digest
SHA256 0adc0ef12352eec7af8a262804868df2f81e2ef678c2778d7f091f6835adeaae
MD5 44da20f8b982cf57f31bb1f577af8351
BLAKE2b-256 6ece31cb4e49a367c5e5bdef2c2815771aed48bddd76e1f5e266f9be9717933b

See more details on using hashes here.

File details

Details for the file macdefaultbrowsy-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for macdefaultbrowsy-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0fee9c578fe8f5f650c5297e200d0e6ce02def2c6dc1a5e55564add05f766e88
MD5 2881dceba0a6c0cf2b27f8d63a54116a
BLAKE2b-256 b565abf2637b6f256b3bc0ec303753f1fd7d5c7fd80a3577a8c250fc082d0548

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page