# Herdr app This folder is **the Herdr app's whole interface, as files**. The Herdr app is a desktop app for terminals and coding agents, and it redraws itself from these files while it runs: change a layout, a key or a panel here and the window follows within a second. Shipped layouts and mods are Herdr's: change settings for look, or clone before editing structure/code (see Layouts). When someone asks for something ("a sidebar of my PRs", "give ctrl+1 back to the shell", "make it warmer", "move the agents list to the right"), you do it by editing these files or writing a mod. Nothing in the default interface is special: the spaces sidebar, the agents list, the tab bar, menus, dialogs and notifications are built from the same parts you have. ## Two programs - **`herdr-app`**, the window: spaces, tabs, layouts, panels. - **herdr-core (`hc`)**, which runs every terminal and agent. They keep running when the window closes or updates. You can use `hc` yourself: start a terminal, read its screen, send it text, wait for an agent (`hc --help`). The Herdr app is one client of it. `herdr-app` controls this app; `hc` controls herdr-core. ## What you can and can't do You can: rearrange and restyle the whole window (layouts), rebind any key, write panels (mods) that list, filter and act on spaces, tabs, agents and terminals, open dialogs, popups and floating blocks, show a live terminal inside a block, run any app command, run programs (`exec`) and fetch URLs, keep state per mod or shared between mods, animate natively. You can't: use HTML, CSS, a web view, Node APIs or `setTimeout`; draw outside your block except through overlays; change how a terminal itself draws text; read or change other mods' code at run time. ## What mods are written in Mods use **gpui-kit** (its gpui-shell): JavaScript that describes **GPUI** elements, a native GPU UI (`div()`, flex, children, `.on_click`). There's no DOM: the script describes, Rust draws. Background: https://gpui-kit.com. The Herdr app carries its own copy with additions (`frames`, `loop`), so **the type files here are the truth**: `gpui-kit.d.ts` for elements and `herdr.d.ts` for the app's data and commands. They're rewritten on every start to match this version. ## Changing things safely - Edits apply at once. If a file is invalid, the app keeps the last good version and writes why to `.error` (`layout.error`, `keys.error`, `settings.error`, `programs.error`). Check after every edit. - `herdr-app check ` loads a mod once and checks its initial description and eager native elements, including virtual lists and motion. It does not lay out the mod or run deferred rows, nested renders, or later async states. Never call a mod done without a passing check; also try it in the app. - **Escape hatch:** `ctrl-alt-shift-escape` always works: it sets the shown layout and `keys.json` aside (`*.reset-