Skip to content
Edith

Hosts & Environment

Hosts & Environment for Mac

Edit /etc/hosts and environment variables without Terminal.

Developer & Data
Get Edith for $35
ed extensions install hostsEditor

Hosts & Environment edits /etc/hosts as entries, groups and named profiles. Every write shows the exact diff, keeps a backup and asks for an administrator. It also shows the variables your shell and apps get, and keeps yours in one marked block of the shell startup file.

Updated

How to use Hosts & Environment on your Mac

  1. 1

    Review the hosts file

    Entries are grouped as the file groups them. Turn one off to comment it out, or add and edit entries with checked addresses and host names.

  2. 2

    Switch a profile

    A profile is a named set of entries, such as Staging. Turning it on adds its block to the hosts file; turning it off comments the block out.

  3. 3

    Write with a diff

    Edith shows the exact change, keeps a backup of the previous file, asks for an administrator, then clears the DNS cache.

  4. 4

    Set environment variables

    Variables you add go into one block marked as Edith's in your shell startup file. Lines outside it are never changed.

What it does

Edit the hosts file

Turn /etc/hosts entries on and off, and add, edit and delete them with validation.

Hosts profiles

Switch named sets of hosts entries, such as Staging or Block distractions.

Environment variables

See login shell and app variables and keep your own in a marked block of the shell startup file.

From the terminal and your coding agents

Every example returns JSON with --json, and agents can call the same thing over MCP.

Terminal
ed invoke hostsEditor list --json '{}'ed invoke hostsEditor toggle --json '{"host":"api.staging.test"}'ed invoke hostsEditor toggle --json '{"host":"api.staging.test","write":true}'ed invoke hostsEditor apply --json '{"profile":"Staging","write":true}'

Permissions and requirements

Requirements

  • macOS 14 or later on Apple silicon