From f74602b8813c4937dad505c60ca2f44b3e9b21a1 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Mon, 18 May 2026 01:39:39 +0300 Subject: docs: redesign website and add starlight docs --- website/src/content.config.ts | 12 ++ website/src/content/docs/agent-skill.mdx | 103 ++++++++++ website/src/content/docs/agents.mdx | 120 ++++++++++++ website/src/content/docs/cli-reference.mdx | 186 ++++++++++++++++++ website/src/content/docs/concepts.mdx | 85 +++++++++ website/src/content/docs/configuration.mdx | 238 ++++++++++++++++++++++++ website/src/content/docs/index.mdx | 104 +++++++++++ website/src/content/docs/install.mdx | 58 ++++++ website/src/content/docs/integrations.mdx | 116 ++++++++++++ website/src/content/docs/persistence-remote.mdx | 125 +++++++++++++ website/src/content/docs/quick-start.mdx | 80 ++++++++ website/src/content/docs/socket-api.mdx | 224 ++++++++++++++++++++++ website/src/pages/index.astro | 7 + website/src/styles/starlight.css | 162 ++++++++++++++++ 14 files changed, 1620 insertions(+) create mode 100644 website/src/content.config.ts create mode 100644 website/src/content/docs/agent-skill.mdx create mode 100644 website/src/content/docs/agents.mdx create mode 100644 website/src/content/docs/cli-reference.mdx create mode 100644 website/src/content/docs/concepts.mdx create mode 100644 website/src/content/docs/configuration.mdx create mode 100644 website/src/content/docs/index.mdx create mode 100644 website/src/content/docs/install.mdx create mode 100644 website/src/content/docs/integrations.mdx create mode 100644 website/src/content/docs/persistence-remote.mdx create mode 100644 website/src/content/docs/quick-start.mdx create mode 100644 website/src/content/docs/socket-api.mdx create mode 100644 website/src/pages/index.astro create mode 100644 website/src/styles/starlight.css (limited to 'website/src') diff --git a/website/src/content.config.ts b/website/src/content.config.ts new file mode 100644 index 00000000..6282421b --- /dev/null +++ b/website/src/content.config.ts @@ -0,0 +1,12 @@ +import { defineCollection } from 'astro:content'; +import { docsLoader } from '@astrojs/starlight/loaders'; +import { docsSchema } from '@astrojs/starlight/schema'; + +function docsPath({ entry }: { entry: string }) { + const slug = entry.replace(/\.(md|mdx|markdown|mdown|mkdn|mkd|mdwn)$/i, ''); + return slug === 'index' ? 'docs' : `docs/${slug}`; +} + +export const collections = { + docs: defineCollection({ loader: docsLoader({ generateId: docsPath }), schema: docsSchema() }), +}; diff --git a/website/src/content/docs/agent-skill.mdx b/website/src/content/docs/agent-skill.mdx new file mode 100644 index 00000000..65327c33 --- /dev/null +++ b/website/src/content/docs/agent-skill.mdx @@ -0,0 +1,103 @@ +--- +title: Agent skill +description: A concise guide for coding agents running inside Herdr. +--- + +This page teaches coding agents how to use Herdr while they are running inside a Herdr pane. + +Use Herdr to organize parallel work instead of stacking everything in one terminal. + +## Core model + +Herdr has four levels: + +| Level | Meaning | +| --- | --- | +| Workspace | A project or task context. | +| Tab | A view inside a workspace. | +| Pane | A terminal area inside a tab. | +| Agent | A detected coding agent running in a pane. | + +Use workspace and tab actions for layout. Use pane actions for commands and output. + +## Read the current layout + +```bash +herdr pane list +``` + +Use the pane IDs returned by Herdr for later commands. + +## Create a helper pane + +Split a pane and run a command: + +```bash +herdr pane split 1-1 --direction right +herdr pane run 1-2 "just test" +``` + +Prefer `pane run` over sending raw keys when you want to submit a full command line. + +## Read output + +```bash +herdr pane read 1-2 --source recent --lines 80 +``` + +Use `recent-unwrapped` when reading logs or matching long lines. + +```bash +herdr pane read 1-2 --source recent-unwrapped --lines 120 +``` + +## Wait for agents + +Wait for another agent to finish or become blocked: + +```bash +herdr wait agent-status 1-3 --status done +herdr wait agent-status 1-3 --status blocked +``` + +Use agent waits for recognized coding agents. Use normal output matching for ordinary commands, servers, and tests. + +## Preserve focus + +Do not steal visible focus unless the user asked for it. Create panes, submit commands, and read output without changing the user’s active view when possible. + +## Use clear pane aliases + +When your tool supports aliases, use names like `server`, `tests`, `reviewer`, or `docs`. This makes later pane operations easier to audit. + +## Good patterns + +Run long work in a separate pane: + +```bash +herdr pane split 1-1 --direction right +herdr pane run 1-2 "just check" +``` + +Watch a server until it is ready: + +```bash +herdr pane read 1-2 --source recent-unwrapped --lines 80 +``` + +Ask a reviewer agent to inspect a change: + +```bash +herdr pane split 1-1 --direction right +herdr pane run 1-2 "pi --model " +``` + +## Avoid these patterns + +Do not pile every command into the current pane. + +Do not use raw key injection for command submission when `pane run` is available. + +Do not wait for `agent-status` on a normal process that is not a coding agent. + +Do not change implementation direction without telling the user. diff --git a/website/src/content/docs/agents.mdx b/website/src/content/docs/agents.mdx new file mode 100644 index 00000000..c01e97d1 --- /dev/null +++ b/website/src/content/docs/agents.mdx @@ -0,0 +1,120 @@ +--- +title: Agents +description: See what Herdr can detect, how agent state works, and how integrations improve it. +--- + +Herdr is useful because it knows when agents are working, blocked, done, or idle. You can scan the sidebar instead of checking every pane manually. + +## Supported agents + +Automatic detection works out of the box for common coding agents. + +| Agent | Idle / done | Working | Blocked | +| --- | --- | --- | --- | +| Pi | yes | yes | partial | +| Claude Code | yes | yes | yes | +| Codex | yes | yes | yes | +| Droid | yes | yes | yes | +| Amp | yes | yes | yes | +| OpenCode | yes | yes | yes | +| Grok CLI | yes | yes | yes | + +Detected but less thoroughly tested: Gemini CLI, Cursor Agent, Cline, Kimi, and GitHub Copilot CLI. + +Unsupported agents still run normally as terminal processes. They just may not get rich state unless you add an integration or report state over the socket API. + +## How detection works + +Herdr combines three signals: + +1. foreground process detection +2. terminal output heuristics +3. integration state reports + +Process detection tells Herdr which pane owns an agent. Heuristics infer state when no hook is available. Integrations provide the most precise semantic state. + +## State rollups + +The sidebar rolls state upward. + +A blocked agent makes its pane, tab, and workspace look blocked. A working agent makes the workspace look active. A done agent stays visible until you view it. + +This lets you scan many projects quickly. + +## Direct integrations + +Install integrations for agents that expose hooks or plugins: + +```bash +herdr integration install pi +herdr integration install claude +herdr integration install codex +herdr integration install opencode +``` + +Check installed integration versions: + +```bash +herdr integration status +``` + +Show only outdated integrations: + +```bash +herdr integration status --outdated-only +``` + +## Custom agent labels + +You can rename an agent target for display: + +```bash +herdr agent rename 1-1 reviewer +herdr agent rename reviewer --clear +``` + +Targets accept terminal IDs, unique agent names, and legacy pane IDs. + +## Custom status labels + +Integrations can report a visual status label without changing semantic state. + +```bash +herdr pane report-agent 1-1 \ + --source custom:indexer \ + --agent docs-bot \ + --state working \ + --custom-status indexing +``` + +`state` controls waits, notifications, and rollups. `custom-status` is only display text. + +## Start agents from the CLI + +Spawn an agent into Herdr from a script: + +```bash +herdr agent start reviewer --cwd ~/project --split right -- pi +``` + +You can target a workspace or tab: + +```bash +herdr agent start tests --workspace 1 --tab 1-1 -- cargo test +``` + +## Attach directly to an agent + +Attach your current terminal to one agent terminal instead of the full Herdr UI: + +```bash +herdr agent attach reviewer +``` + +Detach with `ctrl+b q`. Send a literal `ctrl+b` with `ctrl+b ctrl+b`. + +Use `--takeover` if another direct attach client already owns input: + +```bash +herdr agent attach reviewer --takeover +``` diff --git a/website/src/content/docs/cli-reference.mdx b/website/src/content/docs/cli-reference.mdx new file mode 100644 index 00000000..7e42ebf9 --- /dev/null +++ b/website/src/content/docs/cli-reference.mdx @@ -0,0 +1,186 @@ +--- +title: CLI reference +description: Herdr commands for sessions, workspaces, tabs, panes, agents, waits, integrations, and status. +--- + +Herdr’s CLI talks to the running server over the same local socket API used by integrations and agents. + +Most commands print JSON responses. Use them from scripts when you want deterministic automation. + +## Launch and status + +```bash +herdr # launch or attach to the default session +herdr --session work # launch or attach to a named session +herdr --remote workbox # attach through SSH +herdr --no-session # single-process escape hatch +herdr --default-config # print default config +herdr --version # print version +``` + +Status commands: + +```bash +herdr status +herdr status server +herdr status client +``` + +## Server + +```bash +herdr server stop +herdr server reload-config +``` + +`reload-config` applies reloadable settings without restarting panes. + +## Sessions + +```bash +herdr session list [--json] +herdr session attach +herdr session stop [--json] +herdr session delete [--json] +``` + +Use `default` as the session name when you need to stop the default session explicitly. + +## Workspaces + +```bash +herdr workspace list +herdr workspace create [--cwd PATH] [--label TEXT] [--focus] [--no-focus] +herdr workspace get +herdr workspace focus +herdr workspace rename