# Hosts & Environment

> Hosts & Environment documentation for Edith on Mac. Edit /etc/hosts and environment variables without Terminal.

- Canonical URL: https://getedith.pro/docs/extensions/hosts-editor
- Updated: 2026-12-02

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.

## Install Hosts & Environment

1. Open **Library** in Edith's sidebar.
2. Search for Hosts & Environment in **Search tools**, or open the **Developer & Data** category.
3. Press **Install**. Hosts & Environment is added to your sidebar.

From the terminal, `ed extensions install hostsEditor` does the same. See [Extensions](https://getedith.pro/docs/extensions) for turning extensions off, updating and removing them.

## Where to find Hosts & Environment

- **Sidebar.** Click Hosts & Environment in the sidebar to open its page, or press <kbd>⌘</kbd><kbd>K</kbd> and type its name.
- **Home.** Open **Home**, press **Edit Home**, then **Add widgets** to place its widgets.

## Get started with Hosts & Environment

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. **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. **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. **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 Hosts & Environment 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.

## Settings

Open Hosts & Environment from the sidebar and press **Settings** at the top right of its page. You can also select Hosts & Environment in **Library** and press **Settings**, or press <kbd>⌥</kbd><kbd>⌘</kbd><kbd>,</kbd> while its page is open.

From the terminal, read a setting with `ed config get <key>` and change it with `ed config set <key> <value>`, using the key in the last column. See [ed config](https://getedith.pro/docs/cli/config).

### Writing the hosts file

| Setting | Default | Values | Key |
| --- | --- | --- | --- |
| **Clear the DNS cache after writing**<br>Apps see the new hosts entries at once instead of after the cache expires. | On | On, Off | `hostsEditorFlushDNS` |

### Environment

| Setting | Default | Values | Key |
| --- | --- | --- | --- |
| **Show values of keys and tokens**<br>Values of variables whose names look like keys, tokens or passwords are hidden until you turn this on. | Off | On, Off | `hostsEditorRevealValues` |

## From the terminal

Everything above works in the app. The `ed` command line is optional, for scripts and coding agents. Hosts & Environment's commands are in [`ed hosts-editor`](https://getedith.pro/docs/cli/hosts-editor), and each one is also a tool in [Edith's MCP server](https://getedith.pro/docs/mcp).

## Permissions and requirements

- macOS 14 or later on Apple silicon

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
