### Serve web gallery with Trunk Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-pre/examples/README.md Serve the standalone web gallery from the hello_web example directory using Trunk. Requires Trunk installed and a browser with WebGPU or WebGL2 support. ```sh cd crates/gpui_web/examples/hello_web trunk serve ``` -------------------------------- ### Run hello_world example from Zed repository root Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-pre/examples/README.md Run the hello_world example from the Zed repository root using Cargo. ```sh cargo run -p gpui --example hello_world ``` -------------------------------- ### Run gpui-shell Example Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/shell/README.md Runs the bundled todo list example from the repository root. ```bash cargo run -p gpui-shell -- examples/js_todolist ``` -------------------------------- ### Run dock component example Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/base/examples/README.md Run the dock component example, a larger showcase component that implements the DockAreaRenderer and TabGroupRenderer traits itself. ```bash cargo run -p gpui-base dock ``` -------------------------------- ### Run without component slug to show overview Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/base/examples/README.md Run the example without a component slug to display the overview of all components. ```bash cargo run -p gpui-base-examples ``` -------------------------------- ### Run motion demonstrations Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/base/README.md Runs the five focused interactive demonstrations from the Motion guide. Requires the gpui-base-examples package. ```bash cargo run -p gpui-base-examples --bin motion ``` -------------------------------- ### Print agent guide with herdr-app --skill Source: https://github.com/herdrdev/herdr-app/blob/master/README.md Run from the command line to print the agent guide for driving the window. The herdr-core skill points agents here; use herdr-core for running and coordinating programs, and the app to change what you see. ```sh herdr-app --skill ``` -------------------------------- ### Install cargo-about and generate notices Source: https://github.com/herdrdev/herdr-app/blob/master/licenses/README.md Install cargo-about 0.9.3 and Bun, then run the notices generation command. Requires cargo-about and Bun to be installed. ```sh cargo install --locked cargo-about --version 0.9.3 just notices ``` -------------------------------- ### Run individual component natively Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/base/examples/README.md Run a specific component example natively using Cargo. Replace the slug with one of the available component names such as 'button', 'alert-dialog', or 'virtual-list'. ```bash cargo run -p gpui-base-examples -- button cargo run -p gpui-base-examples -- alert-dialog cargo run -p gpui-base-examples -- virtual-list ``` -------------------------------- ### Example mod class with View, exec, and render Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md A complete mod example showing a View subclass with init, refresh, and render. Uses cx.timer.every to poll git branches, exec to run commands on spaces, and theme() for colors. init runs for real during a check; use checking() to guard side effects. ```js import { View, div } from "gpui-kit"; import { v_flex, h_flex } from "gpui-base"; import { exec, spaces, theme, run } from "herdr"; export default class Branches extends View { init(_props, cx) { this.branch = {}; cx.timer.every(3000, (cx) => this.refresh(cx)); this.refresh(cx); } refresh(cx) { cx.spawn(async (cx) => { for (const p of spaces()) { // on: a space on another machine runs git there. const r = await exec("git", ["branch", "--show-current"], { cwd: p.folder, on: p.machine }); this.branch[p.id] = r.stdout.trim(); } cx.notify(); }); } render(cx) { const t = theme(); return v_flex().size_full().bg(t.surface).p(10).gap(4).text_size(13).children( spaces().map((p) => h_flex().id(`b-${p.id}`).gap(8).hover((s) => s.bg(t.raised)) .on_click(() => run("space.select", { id: p.id })) .child(div().text_color(p.active ? t.foreground : t.muted).child(p.name)) .child(div().text_color(t.dim).child(this.branch[p.id] ?? "")))); } } ``` -------------------------------- ### Build from source with git clone, just build, test, install Source: https://github.com/herdrdev/herdr-app/blob/master/README.md Clone the repo with submodules. Requires Rust 1.95.0 and Zig 0.16.0 (versions used in CI). Linux needs development packages listed in the workflow. Install just to use these recipes. The platform installer builds a release and adds the app to your desktop; on Linux it links to this checkout, so keep the checkout in place. Quit and reopen Herdr to use the new build. ```sh git clone --recurse-submodules https://github.com/herdrdev/herdr-app.git cd herdr-app just build just test just install ``` -------------------------------- ### Install Xcode command line tools Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-pre/README.md Installs the Xcode command line tools, required for Metal rendering on macOS. ```sh xcode-select --install ``` -------------------------------- ### Create a GPUI application with gpui_platform::application() Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-pre/README.md Starts a standalone GPUI app by creating an Application and running a callback. Inside the callback, you can open windows and register root views. ```rust use gpui::*; fn main() { gpui_platform::application().run(|cx: &mut App| { // .. }); } ``` -------------------------------- ### Run fps_monitor example Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/fps/README.md Run the example with `cargo run -p fps_monitor`. It ports three.js' `webgl_lines_colors` demo, rendering Hilbert curves smoothed with a centripetal Catmull-Rom spline, with adjustable curve count to observe the trace reacting to rendering load. ```bash cargo run -p fps_monitor ``` -------------------------------- ### terminal.open Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Opens a terminal with optional starting folder, command, placement, and name. ```APIDOC ## terminal.open ### Description Opens a terminal with optional starting folder, command, placement, and name. ### Method Command ### Endpoint `herdr-app do terminal.open` ### Parameters #### Request Body - **argv** (array) - Optional - Command to run - **folder** (string) - Optional - Starting directory - **place** (string) - Optional - Placement (e.g., right, down) - **name** (string) - Optional - Terminal name ### Response #### Success Response No explicit response schema provided. ``` -------------------------------- ### Watch and Dev Mode Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/shell/README.md Runs the example with hot reload. '--dev' implies '--watch'. Reloads give fresh instances; unchanged code and module-scope state are shared across copies. ```bash cargo run -p gpui-shell -- examples/js_todolist --watch cargo run -p gpui-shell -- examples/js_todolist --dev # implies --watch ``` -------------------------------- ### knownAgents Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Returns the agents people can start (programs.json's `run`), most picked first, each `installed` or not. Rejects if the check fails. ```APIDOC ## knownAgents ### Description Returns the agents people can start (programs.json's `run`), most picked first, each `installed` or not. Rejects if the check fails. ### Parameters #### Request Body - **on** (string) - Optional - Machine to check on. ### Response #### Success Response - **agents** (array) - List of agents with `installed` status. ### Error Handling - Rejects if the check fails (failed checks are not cached). ``` -------------------------------- ### Example settings.json with zoom and sounds Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Shows the user settings file structure. The zoom key scales the whole app (terminals, mods, layout px sizes) from 0.5 to 3; write sizes as designed at zoom 1. The sounds object enables alerts and can specify custom audio files for done and blocked events. ```json { "zoom": 1, "sounds": { "enabled": true } } ``` -------------------------------- ### Initialize gpui-kit base Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/base/README.md Calls gpui_kit::base::init(cx) once before creating windows or using foundation controls. Installs the global theme and focus-trap infrastructure required by the base layer. Do not call this again if the application already calls gpui_kit::init(cx), which includes base initialization. ```rust use gpui_kit::*; fn main() { gpui_kit::application().run(|cx| { gpui_kit::base::init(cx); // Create windows and views after initialization. }); } ``` -------------------------------- ### Layout root node with theme and colors Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Example layout root node configuration. Sets theme, colors, fonts, and terminal appearance properties. The layout's own look wins over settings.json, and the theme picker overrides both. ```json { "id": "root", "type": "row", "theme": "graphite", "colors": { "accent": "#a7b4c6" }, "font": "Geist Mono", "font_size": 15, "ui_font": "Geist", "terminal_padding": [10, 6], "terminal_opacity": 1, ... } ``` -------------------------------- ### Mod directory structure example Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Shows the layout of a mod folder under ~/.config/herdr-app/mods//, including main.js, link.js, mod.json, and additional modules. The mod.json first appears with place and size properties. ```plaintext ~/.config/herdr-app/mods// main.js the mod's view, if it has one link.js the terminal link handler, if it has one mod.json where it first appears: { "place": "right" | "left" | "top" | "bottom" | "none", "size": 320 } *.js, *.svg more modules ("./ui.js"), its own icons ``` -------------------------------- ### Declare capabilities in gpui-shell.json Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/shell/README.md System access is denied by default; this JSON declares the exact grant the CLI installs in gpui-shell.json. It includes filesystem read/write scopes, network host and HTTP rules, storage, and clipboard write access. ```json { "id": "com.example.viewer", "name": "Viewer", "version": "1.0.0", "shell-version": "0.6.0", "entry": "main.js", "dependencies": { "omarchy-ui": "huacnlee/omarchy-ui" }, "capabilities": { "fs": { "read": ["${pluginDir}"], "write": ["${dataDir}"] }, "network": { "hosts": ["stream.example.com"], "http": [{ "scheme": "https", "host": "api.example.com", "methods": ["GET"], "paths": ["/v1/profile"], "path_prefixes": ["/v1/items/"] }] }, "storage": true, "clipboard": { "write": true } } } ``` -------------------------------- ### Define actions with actions! macro Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-pre/docs/key_dispatch.md Equivalent to the previous example but uses the actions! macro to define multiple unit-struct actions in one line. ```rust mod menu { actions!(gpui, [MoveUp, MoveDown]); } ``` -------------------------------- ### Switch Xcode command line tools to new Xcode Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-pre/README.md Ensures the Xcode command line tools use the newly installed copy of Xcode. ```sh sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer ``` -------------------------------- ### Compose FpsMonitor and FpsOverlay for custom corner or frame budget Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/fps/README.md Use this Rust example to create a custom FPS monitor with a different corner or frame budget. The monitor is an ordinary view that can be embedded in a status bar or overlay. The palette is not configurable because its contrast is load-bearing. ```rust use gpui_fps::{FpsMonitor, FpsOverlay}; let monitor = cx.new(|cx| { FpsMonitor::new(window, cx) .capacity(240) // frames kept in the trace (default 120) .frame_budget(Duration::from_micros(6_944)) // pins 144Hz; unset, it follows the display .show_resources(true) // GPU, CPU and memory (default true) .resource_interval(Duration::from_millis(500)) // default 500ms }); // Embedded: div().child(monitor.clone()) // Or pinned to a corner of a relative parent: div().relative().child(FpsOverlay::new(&monitor).anchor(Anchor::BottomLeft)) ``` -------------------------------- ### space.new Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Creates a new space with optional parameters. The space can be assigned to a machine, and its terminals start in the focused terminal's folder if on the same machine. ```APIDOC ## space.new ### Description Creates a new space with optional parameters. The space can be assigned to a machine, and its terminals start in the focused terminal's folder if on the same machine. ### Method Command ### Endpoint `herdr-app do space.new` ### Parameters #### Request Body - **name** (string) - Optional - Name of the space - **folder** (string) - Optional - Starting folder for terminals - **tab** (string) - Optional - Tab identifier - **argv** (array) - Optional - Command to run - **task** (string) - Optional - Task description - **machine** (string) - Optional - Machine from `hc machine ls`; omitted means focused space's machine for keys/clicks, this computer for scripts; `""` means this computer - **focus** (boolean) - Optional - Whether to focus the new space ### Response #### Success Response No explicit response schema provided. ``` -------------------------------- ### Inspect window with herdr-app ls, status, commands Source: https://github.com/herdrdev/herdr-app/blob/master/README.md The first two commands inspect the open window. The command list also works without one. See the command reference for arguments. ```sh herdr-app ls herdr-app status herdr-app commands ``` -------------------------------- ### terminal.open Source: https://github.com/herdrdev/herdr-app/blob/master/docs/commands.md Starts a terminal in a new tab (default) or to the right or down of the focused pane. Accepts optional arguments for command, folder, placement, and name. ```APIDOC ## terminal.open ### Description Start a terminal: as a new tab (place "tab", default), or "right"/"down" of the focused pane. ### Arguments - **argv** (optional) - Command arguments. - **folder** (optional) - Working directory. - **place** (optional) - Placement: "tab", "right", or "down". - **name** (optional) - Terminal name. ``` -------------------------------- ### Run herdr-app do with pane.split Source: https://github.com/herdrdev/herdr-app/blob/master/docs/commands.md Use `herdr-app do` to run an action in the open window. Arguments can be named flags or a single JSON object. The example splits a pane to the right using both forms. ```sh herdr-app do pane.split --direction right herdr-app do pane.split '{"direction":"right"}' ``` -------------------------------- ### space.new Source: https://github.com/herdrdev/herdr-app/blob/master/docs/commands.md Make a space: its name (default: none, so it's called after where its first terminal is), the folder its terminals start in (default: the focused terminal's), its first tab's name (default: none, so it's called by its number), optionally an agent (argv) and its first message (task), and the machine it lives on (`hc machine ls`; default the focused space's machine for keys and clicks, this computer for scripts; empty string: this computer; its terminals start in that machine's home unless folder). It is shown at once; focus false keeps the shown space and tab (with no space shown, the new space is shown). ```APIDOC ## space.new ### Description Make a space: its name (default: none, so it's called after where its first terminal is), the folder its terminals start in (default: the focused terminal's), its first tab's name (default: none, so it's called by its number), optionally an agent (argv) and its first message (task), and the machine it lives on (`hc machine ls`; default the focused space's machine for keys and clicks, this computer for scripts; empty string: this computer; its terminals start in that machine's home unless folder). It is shown at once; focus false keeps the shown space and tab (with no space shown, the new space is shown). ### Method CLI ### Endpoint `space.new` ### Parameters #### Arguments - `name` (string) - Optional - The space name. - `folder` (string) - Optional - The folder its terminals start in. - `tab` (string) - Optional - The first tab's name. - `argv` (string) - Optional - The agent (argv). - `task` (string) - Optional - The first message (task). - `machine` (string) - Optional - The machine it lives on. - `focus` (boolean) - Optional - Whether to focus the new space. ``` -------------------------------- ### Default keys.json configuration Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Default keyboard shortcut bindings for global, terminal, layout, and editor mods. On upgrade, an untouched keys file gets current shortcuts; any edit keeps the entire file as yours, requiring manual addition of new defaults. ```json { "global": { "ctrl-shift-t": "tab.new", "ctrl-shift-o": "pane.split:right", "alt-1": "space.select:1" }, "terminal": { "ctrl-shift-c": "terminal.copy", "ctrl-left": "send:\u001bb", "ctrl-1": "terminal" }, "layout:terminals": { "ctrl-shift-pagedown": "space.next", "ctrl-shift-pageup": "space.prev" }, "mod:editor": { "ctrl-s": "editor.save" } } ``` -------------------------------- ### Declare key context with key_context Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-pre/docs/key_dispatch.md Adds a key context named "menu" to the element tree, enabling key bindings to target this context. The on_action handlers are the same as the previous example. ```rust impl Render for Menu { fn render(&mut self, window: &mut Window, cx: &mut Context) -> impl IntoElement { div() .key_context("menu") .on_action(|this: &mut Menu, move: &MoveUp, window: &mut Window, cx: &mut Context| { // ... }) .on_action(|this, move: &MoveDown, cx| { // ... }) .children(unimplemented!()) } } ``` -------------------------------- ### Run benchmark with python scripts/bench.py Source: https://github.com/herdrdev/herdr-app/blob/master/README.md Compare drawing changes on Windows, Linux or macOS by running the same fixed workloads against each build. The runner requires `hc` on PATH and uses the Python executable running the script. It prints a unique artifact folder with run settings, counters and results, then stops its private app, terminals and core. Keep the window visible and the display awake; inactive windows may draw at a lower rate. Windows records visibility, foreground activity and display Hz at each measurement boundary; other platforms mark these observations unavailable. ```sh python scripts/bench.py --bin --set spinners --seconds 20 ``` -------------------------------- ### mod.json link_handlers example Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Declares a link handler for PNG files in mod.json. The pattern uses Rust regex search, and file rules match decoded file: paths. Herdr adds the mod to a personal layout when it first has link rules. ```json {"place":"none","link_handlers":[{"kind":"file","pattern":"(?i)\\.png$"}]} ``` -------------------------------- ### Install Herdr on Windows via PowerShell Source: https://github.com/herdrdev/herdr-app/blob/master/README.md Installs Herdr on x64 Windows with curl and tar installed (Windows 10 1803 or newer). Adds %LOCALAPPDATA%\Programs\herdr-app to user PATH. ```powershell irm https://releases.herdr.dev/app/install.ps1 | iex ``` -------------------------------- ### Run canvas font fallback browser smoke test Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-pre/examples/README.md Run the browser smoke test for canvas font fallback. Requires Node.js 22+ and Chrome/Chromium. Set CHROME to override the executable and pass an optional server URL as the first argument. ```sh node crates/gpui_web/examples/hello_web/test_canvas_fallback.mjs ``` -------------------------------- ### Install Herdr on macOS via Homebrew Source: https://github.com/herdrdev/herdr-app/blob/master/README.md Alternative installation for Apple Silicon macOS using Homebrew. ```sh brew install --cask herdr-app ``` -------------------------------- ### Install Herdr on Linux and macOS via curl Source: https://github.com/herdrdev/herdr-app/blob/master/README.md Installs Herdr on Linux and macOS. Linux requires a desktop session and working Vulkan driver; macOS builds are for Apple Silicon. Adds the command to ~/.local/bin. ```sh curl -fsSL https://releases.herdr.dev/app/install.sh | sh ``` -------------------------------- ### app.welcome Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Opens the welcome screen. ```APIDOC ## app.welcome ### Description Opens the welcome screen. ### Method Command ### Endpoint app.welcome ### Parameters None ### Response No response body. ``` -------------------------------- ### app.help Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Opens the help overlay (closes it if already open). ```APIDOC ## app.help ### Description Opens the help overlay (closes it if already open). ### Method Command ### Endpoint app.help ### Parameters None ### Response No response body. ``` -------------------------------- ### shared Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Gets a shared value that every mod sees. ```APIDOC ## shared ### Description Gets a shared value that every mod sees. ### Parameters #### Request Body - **key** (string) - Required - The shared key. ### Response #### Success Response - **value** (any) - The shared value. ``` -------------------------------- ### Run gpui-base tests Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/base/README.md Executes the test suite for the foundation crate. ```bash cargo test -p gpui-base ``` -------------------------------- ### cx.spawn(body, opts?) Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/shell/README.md Spawns a task; the body's cx survives an await. ```APIDOC ## cx.spawn(body, opts?) ### Description Spawns a task; the body's cx survives an await. ### Method method ### Endpoint `cx.spawn(body, opts?)` ### Parameters #### Parameters - **body** (function) - Required - The async function to run. - **opts** (object) - Optional - Options for the spawn. ### Response Returns a task handle. ``` -------------------------------- ### hc Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Runs a Herdr command. For example, `hc read ` gives a terminal's text. ```APIDOC ## hc ### Description Runs a Herdr command. For example, `hc read ` gives a terminal's text. ### Parameters #### Request Body - **args** (array) - Required - Command arguments. ``` -------------------------------- ### FpsOverlay::anchor Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/fps/README.md Sets the anchor position for the overlay. The example uses `Anchor::BottomLeft`. ```APIDOC ## FpsOverlay::anchor ### Description Sets the anchor position for the overlay. The example uses `Anchor::BottomLeft`. ### Method Builder method ### Parameters - **anchor** (Anchor) - The anchor position for the overlay. ### Returns The `FpsOverlay` with the updated anchor. ### Example ```rust let overlay = FpsOverlay::new(&monitor).anchor(Anchor::BottomLeft); ``` ``` -------------------------------- ### app.palette Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Opens the command palette (closes it if already open). ```APIDOC ## app.palette ### Description Opens the command palette (closes it if already open). ### Method Command ### Endpoint app.palette ### Parameters None ### Response No response body. ``` -------------------------------- ### app.whats_new Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Opens the 'What's New' screen. ```APIDOC ## app.whats_new ### Description Opens the 'What's New' screen. ### Method Command ### Endpoint app.whats_new ### Parameters None ### Response No response body. ``` -------------------------------- ### Create a styled Button with on_click Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/base/README.md Shows how to create a Button with styling, accessibility label, and click handler. The ElementId must remain stable within a view for GPUI to preserve focus and element state. ```rust use gpui_kit::prelude::*; use gpui_kit::{Context, IntoElement, Render, Window, px, rgb}; use gpui_kit::base::Button; struct SaveButton; impl Render for SaveButton { fn render(&mut self, _: &mut Window, _: &mut Context) -> impl IntoElement { Button::new("save") .px_3() .py_2() .rounded(px(6.)) .bg(rgb(0x2563eb)) .text_color(rgb(0xffffff)) .accessibility_label("Save document") .on_click(|_, _, _| println!("save")) .child("Save") } } ``` -------------------------------- ### agent.prev Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Moves to the previous agent. ```APIDOC ## agent.prev ### Description Moves to the previous agent. ### Method Command ### Endpoint agent.prev ### Parameters None ### Response No response body. ``` -------------------------------- ### tab.new Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Creates a new tab with optional parameters. Can run an agent or create a mod pane. ```APIDOC ## tab.new ### Description Creates a new tab with optional parameters. Can run an agent or create a mod pane. ### Method Command ### Endpoint `herdr-app do tab.new` ### Parameters #### Request Body - **name** (string) - Optional - Tab name - **space** (string) - Optional - Space ID - **folder** (string) - Optional - Starting folder - **argv** (array) - Optional - Command to run (agent) - **task** (string) - Optional - First message for agent - **focus** (boolean) - Optional - Whether to focus the new tab - **mod** (string) - Optional - Mod identifier for a mod pane - **props** (object) - Optional - Properties for the mod ### Response #### Success Response No explicit response schema provided. ``` -------------------------------- ### pickFolder Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Opens the system's folder picker (here only). Resolves with the folder or null. ```APIDOC ## pickFolder ### Description Opens the system's folder picker (here only). Resolves with the folder or null. ### Parameters #### Request Body - **prompt** (string) - Optional - Prompt text for the picker. ### Response #### Success Response - **folder** (string|null) - The selected folder path, or null if cancelled. ``` -------------------------------- ### GPUI dependency for Linux/FreeBSD Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-pre/README.md For Linux/FreeBSD, enable at least one windowing backend (wayland, x11, or both). These features also compile the renderer and text system. ```toml gpui_platform = { version = "*", features = ["wayland", "x11"] } ``` -------------------------------- ### app.settings Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Opens the settings window, optionally to a specific section. ```APIDOC ## app.settings ### Description Opens the settings window, optionally to a specific section. ### Method Command ### Endpoint app.settings ### Parameters #### Body Parameters - **section** (string) - Optional - Settings section: look, machines, alerts, updates, privacy. ### Response No response body. ``` -------------------------------- ### Reproduce COLRv1 subset with pyftsubset Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-pre-wgpu/test-assets/README.md Command to generate the Noto-COLRv1-subset.ttf test fixture from the original Noto Color Emoji font using fonttools. Requires the original font file and fonttools installed. ```sh pyftsubset Noto-COLRv1.ttf --unicodes=U+2764,U+FE0F,U+1F680,U+1F525,U+1F389,U+2705,U+1F415,U+1F308,U+1F3A8 --output-file=Noto-COLRv1-subset.ttf ``` -------------------------------- ### cx.open_url(url) Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/shell/README.md Hands a URL to the system browser. ```APIDOC ## cx.open_url(url) ### Description Hands a URL to the system browser. ### Method method ### Endpoint `cx.open_url(url)` ### Parameters #### Parameters - **url** (string) - Required - The URL to open. ### Response No return value. ``` -------------------------------- ### Disable telemetry in settings.json Source: https://github.com/herdrdev/herdr-app/blob/master/docs/security.md Set the telemetry field to false in your existing settings.json to turn off usage telemetry. Turning it off deletes the local install ID and unsent reports, but cannot recall reports already sent. ```json { "telemetry": false } ``` -------------------------------- ### Create spaces, tabs, splits, and focus agents Source: https://github.com/herdrdev/herdr-app/blob/master/src/SKILL.md Use explicit, useful names for new spaces and tabs. Use IDs from `ls` rather than guessing or acting on the wrong focused pane. ```sh herdr-app do space.new --name api --folder /path/to/api herdr-app do tab.new --name "fix login" --argv '["claude"]' --task "Look at the login bug" herdr-app do pane.split --direction right --pane p12 herdr-app do agent.focus --terminal t7 ``` -------------------------------- ### Run Clippy with warnings as errors Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/base/README.md Lints the gpui-base crate and treats all warnings as errors. ```bash cargo clippy -p gpui-base -- --deny warnings ``` -------------------------------- ### layout.switch Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Switches to a named layout. ```APIDOC ## layout.switch ### Description Switches to a named layout. ### Method Command ### Endpoint layout.switch ### Parameters #### Body Parameters - **name** (string) - Optional - The layout name. ### Response No response body. ``` -------------------------------- ### Import modules from gpui-kit, gpui-base, and gpui-fps Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/shell/README.md Shows the module imports for the shell bindings. Each module carries what its own crate provides. ```javascript import { View, div, svg, image } from "gpui-kit"; import { h_flex, v_flex, Button, Link, Checkbox, Switch } from "gpui-base"; import { fps_monitor } from "gpui-fps"; ``` -------------------------------- ### window.paint_path(path, bg) Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/shell/README.md Paints a path on the window. ```APIDOC ## window.paint_path(path, bg) ### Description Paints a path on the window. ### Method method ### Endpoint `window.paint_path(path, bg)` ### Parameters #### Parameters - **path** (Path) - Required - The path to paint. - **bg** (Color) - Required - The background color. ### Response No return value. ``` -------------------------------- ### Use JSON object for pane.split Source: https://github.com/herdrdev/herdr-app/blob/master/src/SKILL.md `do` accepts `--key value` arguments (JSON for arrays/objects) or one JSON object. Unknown argument names fail and list valid names. Target IDs must be strings. ```sh herdr-app do pane.split '{"direction":"right","pane":"p12"}' ``` -------------------------------- ### terminal.select Source: https://github.com/herdrdev/herdr-app/blob/master/docs/commands.md Start a terminal selection (default: the focused one), replacing the old selection. at defaults to "cursor" or takes {row, col}: zero-based cells, rows from the top of the history including the active screen. mode is "cell" (default), "word" or "line" (like double/triple click). Mods read the inclusive endpoints from focused().selection or terminals(); selection.end is the moving end. ```APIDOC ## terminal.select ### Description Start a terminal selection (default: the focused one), replacing the old selection. at defaults to "cursor" or takes {row, col}: zero-based cells, rows from the top of the history including the active screen. mode is "cell" (default), "word" or "line" (like double/triple click). Mods read the inclusive endpoints from focused().selection or terminals(); selection.end is the moving end. ### Arguments - `terminal` (optional) - `at` (optional) - `mode` (optional) ``` -------------------------------- ### nextCommand Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Returns the next key command for this mod. Typically used in a loop with `cx.spawn`. ```APIDOC ## nextCommand ### Description Returns the next key command for this mod. Typically used in a loop with `cx.spawn`. ### Response #### Success Response - **command** (any) - The next command. ``` -------------------------------- ### app.welcome Source: https://github.com/herdrdev/herdr-app/blob/master/docs/commands.md Shows the welcome again. ```APIDOC ## app.welcome ### Description Shows the welcome again. ### Arguments No arguments. ``` -------------------------------- ### Import Git dependency as bare module Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/shell/README.md Git dependencies are fetched before the entry module is evaluated. Import the map key as a bare module. ```javascript import { label, style } from "omarchy-ui"; ``` -------------------------------- ### cx.sleep(ms) / cx.timer.after / cx.timer.every Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/shell/README.md Work on the foreground executor. ```APIDOC ## cx.sleep(ms) / cx.timer.after / cx.timer.every ### Description Work on the foreground executor. ### Method method ### Endpoint `cx.sleep(ms)` / `cx.timer.after` / `cx.timer.every` ### Parameters #### Parameters - **ms** (number) - Required for sleep - The number of milliseconds to sleep. - **after** (number) - Required for after - The delay in milliseconds. - **every** (number) - Required for every - The interval in milliseconds. ### Response Returns a promise or timer handle. ``` -------------------------------- ### layout.set Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Sets a custom layout tree. ```APIDOC ## layout.set ### Description Sets a custom layout tree. ### Method Command ### Endpoint layout.set ### Parameters #### Body Parameters - **layout** (object) - Required - The layout tree. ### Response No response body. ``` -------------------------------- ### layout.show Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Shows a layout by ID. ```APIDOC ## layout.show ### Description Shows a layout by ID. ### Method Command ### Endpoint layout.show ### Parameters #### Body Parameters - **id** (required) - The layout ID. ### Response No response body. ``` -------------------------------- ### appHome Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Returns the application's home directory path. ```APIDOC ## appHome ### Description Returns the application's home directory path. ### Response #### Success Response - **path** (string) - The application home directory path. ``` -------------------------------- ### home Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Returns the user's home directory path. ```APIDOC ## home ### Description Returns the user's home directory path. ### Response #### Success Response - **path** (string) - The home directory path. ``` -------------------------------- ### Button.new(id) Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/shell/README.md Creates a base Button with activation, focus, disabled and selected state, no styling. ```APIDOC ## Button.new(id) ### Description Creates a base Button with activation, focus, disabled and selected state, no styling. ### Method constructor ### Endpoint `Button.new(id)` ### Parameters #### Parameters - **id** (string) - Required - The identifier for the button. ### Response Returns a Button instance. ``` -------------------------------- ### svg(path) / image(path) Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/shell/README.md Creates a theme-tinted vector icon or full-colour application asset. ```APIDOC ## svg(path) / image(path) ### Description Creates a theme-tinted vector icon or full-colour application asset. ### Method function ### Endpoint `svg(path)` / `image(path)` ### Parameters #### Path Parameters - **path** (string) - Required - The path to the asset. ### Response Returns an element object. ``` -------------------------------- ### View Class Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/shell/README.md Base class for creating views. Subclass it and implement init and render methods. ```APIDOC ## View Class ### Description Base class for creating views. Subclass it and implement init and render methods. ### Methods #### `init(props)` - **Description**: Called once, when the view is created. #### `render(cx)` - **Description**: Returns one element, retained Entity, or string. ### Usage ```js export default class Counter extends View { init(props) {} // called once, when the view is created render(cx) {} // returns one element, retained Entity, or string } ``` ### Notes - `cx.notify()` requests a re-render. It is legal inside an event callback or a task; calling it during `render` throws. - `render` does not run every frame. It runs when the view has been invalidated (a `notify`, a hot reload, a theme change) and publishes a description that every frame after that replays in Rust. - Elements are single-use values. Build them in `render` and never store one on the instance; reusing a stored element throws. ``` -------------------------------- ### layout.select Source: https://github.com/herdrdev/herdr-app/blob/master/docs/commands.md Shows one child of a stack. ```APIDOC ## layout.select ### Description Shows one child of a stack. ### Arguments - **stack** (string) - Required - The identifier of the stack. - **child** (string) - Required - The identifier of the child to show. ``` -------------------------------- ### exec Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Executes a command in the user's real environment. Use this instead of `process.run`. Can run locally or on a remote machine. ```APIDOC ## exec ### Description Executes a command in the user's real environment. Use this instead of `process.run`. Can run locally or on a remote machine. ### Parameters #### Request Body - **cmd** (string) - Required - The command to execute. - **args** (array) - Required - Arguments for the command. - **cwd** (string) - Optional - Working directory. - **on** (string) - Optional - Machine to run on; `on: space.machine` runs there, omitted means local. - **timeout** (number) - Optional - Timeout in milliseconds, defaults to 30,000 and is capped at 600,000 (10 minutes). ### Response #### Success Response - Resolves with the command output. ### Error Handling - Rejects on timeout, if the program cannot start, or if the machine cannot be reached. ``` -------------------------------- ### Create TaffyTree and compute layout Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/taffy/README.md Shows how to create a TaffyTree, add leaf and container nodes with styles, compute layout, and verify results. The body node's height is computed automatically as 500.0 due to flex_grow, even though it was not set explicitly. ```rust use taffy::prelude::*; // First create an instance of TaffyTree let mut tree : TaffyTree<()> = TaffyTree::new(); // Create a tree of nodes using `TaffyTree.new_leaf` and `TaffyTree.new_with_children`. // These functions both return a node id which can be used to refer to that node // The Style struct is used to specify styling information let header_node = tree .new_leaf( Style { size: Size { width: length(800.0), height: length(100.0) }, ..Default::default() }, ).unwrap(); let body_node = tree .new_leaf( Style { size: Size { width: length(800.0), height: auto() }, flex_grow: 1.0, ..Default::default() }, ).unwrap(); let root_node = tree .new_with_children( Style { flex_direction: FlexDirection::Column, size: Size { width: length(800.0), height: length(600.0) }, ..Default::default() }, &[header_node, body_node], ) .unwrap(); // Call compute_layout on the root of your tree to run the layout algorithm tree.compute_layout(root_node, Size::MAX_CONTENT).unwrap(); // Inspect the computed layout using `TaffyTree.layout` assert_eq!(tree.layout(root_node).unwrap().size.width, 800.0); assert_eq!(tree.layout(root_node).unwrap().size.height, 600.0); assert_eq!(tree.layout(header_node).unwrap().size.width, 800.0); assert_eq!(tree.layout(header_node).unwrap().size.height, 100.0); assert_eq!(tree.layout(body_node).unwrap().size.width, 800.0); assert_eq!(tree.layout(body_node).unwrap().size.height, 500.0); // This value was not set explicitly, but was computed by Taffy ``` -------------------------------- ### space.prev Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Selects the previous space. ```APIDOC ## space.prev ### Description Selects the previous space. ### Method Command ### Endpoint `herdr-app do space.prev` ### Parameters None ### Response #### Success Response No explicit response schema provided. ``` -------------------------------- ### agent.next Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Moves to the next agent. ```APIDOC ## agent.next ### Description Moves to the next agent. ### Method Command ### Endpoint agent.next ### Parameters None ### Response No response body. ``` -------------------------------- ### app.whats_new Source: https://github.com/herdrdev/herdr-app/blob/master/docs/commands.md Shows what this release brought (it opens once by itself after an update). ```APIDOC ## app.whats_new ### Description Shows what this release brought (it opens once by itself after an update). ### Arguments No arguments. ``` -------------------------------- ### layout.show Source: https://github.com/herdrdev/herdr-app/blob/master/docs/commands.md Shows a layout node. ```APIDOC ## layout.show ### Description Shows a layout node. ### Arguments - **id** (string) - Required - The identifier of the layout node. ``` -------------------------------- ### layout.select Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Selects a child within a stack layout. ```APIDOC ## layout.select ### Description Selects a child within a stack layout. ### Method Command ### Endpoint layout.select ### Parameters #### Body Parameters - **stack** (required) - The stack identifier. - **child** (required) - The child identifier. ### Response No response body. ``` -------------------------------- ### Run cargo check on gpui-base Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/base/README.md Checks the foundation crate for compilation errors without producing a binary. ```bash cargo check -p gpui-base ``` -------------------------------- ### space.next Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Selects the next space. ```APIDOC ## space.next ### Description Selects the next space. ### Method Command ### Endpoint `herdr-app do space.next` ### Parameters None ### Response #### Success Response No explicit response schema provided. ``` -------------------------------- ### cx.read_from_clipboard() / cx.write_to_clipboard(s) Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/shell/README.md Reads from or writes to the system clipboard. ```APIDOC ## cx.read_from_clipboard() / cx.write_to_clipboard(s) ### Description Reads from or writes to the system clipboard. ### Method method ### Endpoint `cx.read_from_clipboard()` / `cx.write_to_clipboard(s)` ### Parameters #### Parameters - **s** (string) - Required for write - The string to write to the clipboard. ### Response `read_from_clipboard` returns a string; `write_to_clipboard` returns nothing. ``` -------------------------------- ### View Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/shell/README.md Base class of every view; subclass it and default-export the subclass. ```APIDOC ## View ### Description Base class of every view; subclass it and default-export the subclass. ### Method class ### Endpoint `View` ### Parameters None. ### Response Returns a View class. ``` -------------------------------- ### app.help Source: https://github.com/herdrdev/herdr-app/blob/master/docs/commands.md Toggles the keys dialog. ```APIDOC ## app.help ### Description Toggles the keys dialog. ### Arguments No arguments. ``` -------------------------------- ### Create a remote space Source: https://github.com/herdrdev/herdr-app/blob/master/src/SKILL.md Creates a space on a remote machine. The folder is on that machine; tabs and splits in the space stay there. New-space keys and clicks follow the focused space's machine. ```sh herdr-app do space.new --name "remote api" --machine vps --folder /srv/api ``` -------------------------------- ### Clone layout and mod with herdr-app do Source: https://github.com/herdrdev/herdr-app/blob/master/defaults/AGENTS.md Use these commands to clone a shipped layout and mod for customization. The default clone name is -copy; an existing name is refused. layout.clone switches to the clone. ```sh herdr-app do layout.clone '{"name":"main","as":"my-layout"}' herdr-app do mod.clone '{"name":"files","as":"my-files"}' ``` -------------------------------- ### InputState.new(options) / Input.new(state) Source: https://github.com/herdrdev/herdr-app/blob/master/vendor/gpui-kit/crates/shell/README.md Creates retained text state and its rendered input. ```APIDOC ## InputState.new(options) / Input.new(state) ### Description Creates retained text state and its rendered input. ### Method constructor ### Endpoint `InputState.new(options)` / `Input.new(state)` ### Parameters #### Parameters - **options** (object) - Required - Options for the input state. - **state** (InputState) - Required - The input state to render. ### Response Returns an InputState or Input instance. ``` -------------------------------- ### layout.resize Source: https://github.com/herdrdev/herdr-app/blob/master/docs/commands.md Sizes a layout node. ```APIDOC ## layout.resize ### Description Sizes a layout node. ### Arguments - **id** (string) - Required - The identifier of the layout node. - **px** (number) - Optional - The size in pixels. - **weight** (number) - Optional - The weight for sizing. ``` -------------------------------- ### Create a space without focusing it Source: https://github.com/herdrdev/herdr-app/blob/master/src/SKILL.md Creates a new space that the person will look at later without moving them there. Pass `--focus false` to avoid focusing the new space. ```sh herdr-app do space.new --name eng-123 --folder ~/code/app/eng-123 --argv '["claude"]' --task "Implement ENG-123" --focus false ```