Skip to content

feat(gojnimer6553): add herdr module - #1060

Open
gojnimer6553 wants to merge 4 commits into
coder:mainfrom
gojnimer6553:add-herdr-module
Open

feat(gojnimer6553): add herdr module#1060
gojnimer6553 wants to merge 4 commits into
coder:mainfrom
gojnimer6553:add-herdr-module

Conversation

@gojnimer6553

@gojnimer6553 gojnimer6553 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a herdr module: runs Herdr — a terminal/agent-session manager that detects and drives coding agents (Claude Code, Codex, OpenCode, and others) in persistent background panes — inside a Coder workspace, and optionally installs Herdr plugins non-interactively via herdr plugin install <spec> --yes.

Herdr has no documented headless/daemon startup mode, so this module gives it one via a detached tmux session, so the server keeps running independent of the coder_script that launched it.

Key design points:

  • plugins (opt-in list(string), default []) — each entry is an owner/repo spec installed non-interactively on every start. Installing a plugin only registers it; most plugins still need their own one-time interactive setup from a workspace terminal afterwards (documented in the README).
  • app_port (optional) — exposes a plugin's own local web UI as a coder_app tile.
  • post_start_script (optional) — runs after Herdr and all configured plugins are up, so callers can work around plugin-specific gaps (e.g. a plugin's setup wizard assuming infrastructure the workspace doesn't have) without the module itself needing to know about any specific plugin.

Type of Change

  • New module
  • New template
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/gojnimer6553/modules/herdr
New version: v1.0.0
Breaking change: [ ] Yes [x] No

Testing & Validation

  • Tests pass (terraform test: 14/14, bun test main.test.ts: 10/10 against real Docker containers)
  • Code formatted (bun run fmt, shellcheck clean)
  • Changes tested locally, including against the real herdr CLI and a real Herdr plugin (AltanS/collie) in a live Coder workspace template

Related Issues

None

Runs Herdr (herdr.dev) in a Coder workspace, giving it a real
pseudo-terminal via a detached tmux session the same way the happy
module does for the happy CLI (Herdr has no documented headless/daemon
startup mode). Adds an opt-in `plugins` list that installs Herdr
plugins non-interactively via `herdr plugin install <spec> --yes`,
plus an optional `app_port` to expose a plugin's own local web UI as a
Coder app tile, and a `post_start_script` hook so callers can work
around plugin-specific gaps (e.g. a plugin's setup wizard assuming
infrastructure the workspace doesn't have) without baking
plugin-specific logic into the module itself.

Validated locally: terraform init/test (14/14 passed), bun test
main.test.ts against real Docker containers (10/10 passed), shellcheck
clean, prettier/terraform fmt clean. Also validated in production use
against the real herdr and herdr-mobile-relay/collie plugin binaries
in a Coder workspace template.
Rewrites the tmux-usage explanations (README, install script comment,
main.tf comment) to stand on their own instead of pointing at the
happy module for context. Also fixes a stale README line along the
way: tmux installs from the install script, not the start script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant