Help

Install, the helper, profiles and expiry, the resolve panel, licensing, uninstalling.

Install

Download HostBar.dmg, drag HostBar to Applications, and open it. HostBar lives in the menu bar; there is no Dock icon. With Homebrew: brew tap suresk/tap && brew install --cask suresk/tap/hostbar.

Why HostBar needs a helper

Overrides live in /etc/hosts, which only root can edit. HostBar installs a small helper that runs as root and can do exactly two things: replace the HostBar block in /etc/hosts, and tell mDNSResponder to drop its cache. It refuses connections from anything that is not a Developer-ID-signed, non-debuggable copy of HostBar. Everything outside the block, including your own entries, is never touched. Because /etc/hosts is shared by every account on the Mac, only an administrator can use HostBar to turn a profile on or otherwise change the file; a standard account is told to ask an administrator, or sign in as one.

Installing and approving the helper

The first time you open HostBar it asks to install the helper. macOS shows an admin password prompt, then a banner in System Settings › General › Login Items & Extensions where the helper must be allowed. HostBar's menu shows "Helper off" until it is. If an update changes the helper, HostBar asks you to update it. Until you do, the helper that is already installed keeps making HostBar's changes.

Profiles

A profile is a named set of overrides: an address and one or more hostnames per line, switched on and off together. Create one in the HostBar window (⌘N), add entries, and flip the switch. The block HostBar writes is marked with # >>> HostBar managed block. Do not edit; changes are overwritten. >>> and # <<< HostBar managed block <<< lines, with a summary line saying which profiles are on and when they expire.

Expiry

Every profile expires eight hours after you turn it on unless you pick 1, 4, or 24 hours, a custom number, or Never. When it expires HostBar turns it off, rewrites the file, and posts a notification. Expiry does not depend on HostBar being open: the helper keeps the deadlines and takes an expired override out of /etc/hosts itself, after a quit or a restart as well as after sleep. It only ever removes lines. A line you delete from the file by hand stays deleted: neither an expiry nor an edit in HostBar puts it back. Only Reapply does.

Quitting with overrides on

If profiles are on when you quit, HostBar asks whether to turn them off or keep them. Choose "Remember my choice" to skip the question next time; change it later in Settings.

When another tool edits the file

HostBar watches /etc/hosts. If the block changes outside HostBar, the menu bar icon shows a warning and a banner offers Reapply (write the block again from your profiles, exactly as they are now) or Adopt (treat the file as the truth: only the entries whose lines are actually gone are switched off; the warning clears once the block on disk matches what HostBar expects). Adding a line to /etc/hosts this way still needs a license, the same as turning a profile on.

Import and export profiles

File › Export All Profiles saves every profile as a JSON file, and File › Export “name” saves just the selected one (both are in the toolbar’s Import or Export menu too). Exported profiles are all switched off, for a teammate to import or for you to keep in a repo. File › Import Profiles (or the toolbar button) reads one back: each profile arrives switched off, is checked the same way profiles.json is on launch, and a name that clashes with one you already have is renamed, for example "Staging" to "Staging (imported)". A file over 1 MB is refused outright.

Resolve panel

Type a hostname and HostBar shows the whole chain: any hosts-file match (and which profile put it there), what macOS itself answers, and what every DNS server your Mac is configured to use answers, grouped by the resolver that would be asked: the default, split-DNS resolvers from a VPN, and /etc/resolver files. The verdict at the top explains disagreements, and notes when Chrome's own Secure DNS setting can skip /etc/hosts entirely and answer from its own server instead. Copy Summary puts a plain-text version on the clipboard for a bug report.

Flush DNS cache

The Flush button in the menu asks the helper to send mDNSResponder a HUP, which is what sudo killall -HUP mDNSResponder does. Hosts-file changes normally take effect without it; use it when a cached DNS answer is in the way.

License

The 14-day trial is unrestricted. After it ends you can still see everything and turn profiles off; turning profiles on and flushing need a license. Buy one at polar.sh, then paste the key into HostBar › License… One key activates three Macs; free one from the customer portal. A license includes a year of updates; after that the app keeps working and a renewal is $9/year.

Keyboard shortcut

Settings can enable ⌃⌥H to open the menu from anywhere.

Uninstalling

Turn your profiles off first so the block is removed from /etc/hosts. Then HostBar › Settings › Uninstall helper, quit HostBar, and drag it to the Trash. With Homebrew, brew uninstall --cask hostbar unloads the helper's launchd job; use HostBar › Settings › Uninstall helper first so its registration is removed as well. brew uninstall --zap also removes preferences and ~/Library/Application Support/HostBar.

Something else?

Email [email protected]. Include the Copy Summary text if it is about resolution.