Herdr Compose (herdr-compose)
herdr-compose is a declarative workspace layout manager for Herdr — the terminal workspace manager for AI coding agents and developers.
It allows you to define complex Herdr workspace configurations (workspaces, tabs, split directions, pane sizes, initial commands, and environment variables) in clean, human-readable YAML files (herdr-compose.yaml or herdrlayout.yaml).
🚀 Key Features
- 📑 Declarative Workspaces & Tabs: Define multiple workspaces and tabs in human-readable YAML.
- ⭐ Active Default Layout Selection: Set your active default configuration with
herdr-compose use <name>, allowing seamless default execution without typing file paths every time. - 💾 Save & Manage Layouts: Save your layout files into
~/.config/herdr-compose/, list them withherdr-compose list, or remove them withherdr-compose remove. - ⚙️ Starter Template Initialization: Instantly generate starter configuration files in
~/.config/herdr-compose/withherdr-compose init. - 🔍 Visual Layout Inspection: Inspect the full workspace/tab/pane hierarchy tree using
herdr-compose show. - 🪟 Explicit Split Directions & Sizes: Split panes with intuitive directions (
direction: right/vertical) and percentage sizes (size: 30%orsize: 0.3). - 🏷️ Named Pane References: Name panes (
name: main_editor) and split directly from them (from: main_editor). - ⚡ Shorthand Syntax: Concise single-line pane definitions (
- nvim) and workspace-level pane lists. - ⚙️ Command Auto-Launch: Automatically run commands in specific panes upon creation (
nvim,npm run dev,opencode). - 🔑 Environment Variables: Pass custom environment variables (
env) per workspace, tab, or pane. - 🔍 Dry-Run Mode: Preview generated
herdrCLI execution commands withherdr-compose apply --dry-run.
📦 Installation
From PyPI (Recommended)
Install herdr-compose globally as a CLI tool using uv or pip:
# Install globally as a tool using uv (recommended)
uv tool install herdr-compose
# Or standard pip installation
pip install herdr-compose
Local / Development Setup
To install herdr-compose from source for local development:
# Clone the repository
git clone https://github.com/ropali/herdr-compose.git
cd herdr-compose
# Install editable package with dev dependencies using uv
uv pip install -e ".[dev]"
# Or standard pip
pip install -e ".[dev]"
🛠️ Usage & Commands
You can run herdr-compose directly:
1. Set Active Default Layout (use)
Set the active default layout configuration file. When running herdr-compose without arguments, it automatically executes your active default layout:
# Set active default configuration (extension optional)
herdr-compose use backend
# or
herdr-compose use frontend.yaml
# Aliases
herdr-compose select backend
herdr-compose set-default backend
2. Save, List & Remove Configurations in ~/.config/herdr-compose/
# Save layout to ~/.config/herdr-compose/
herdr-compose save layout.yaml
# List all saved configurations (shows active default with ★ tag)
herdr-compose list
# Remove a saved layout configuration file (extension optional)
herdr-compose remove layout
# or aliases
herdr-compose rm layout
herdr-compose delete layout.yaml
Sample list output:
Saved configuration files in '/home/user/.config/herdr-compose':
1. backend.yaml (1 workspace) ★ [active default]
2. frontend.yaml (2 workspaces)
3. layout.yaml (2 workspaces)
3. Inspect Layout Hierarchy Tree (show)
Display an ASCII tree visualization of the workspace, tab, and pane hierarchy without executing any terminal commands.
# Inspect active default layout
herdr-compose show
# Inspect specific saved layout (extension optional)
herdr-compose show backend
# Inspect explicit file path
herdr-compose show examples/complex_multi_workspace.yaml
4. Apply Layout (apply)
Create workspaces, tabs, panes, and run configured commands:
# Apply active default layout (~/.config/herdr-compose/.active)
herdr-compose
# Apply specific layout file (extension optional)
herdr-compose apply backend
# Save to ~/.config/herdr-compose/ AND set as active default simultaneously
herdr-compose save my-layout.yaml --use
# Perform a dry-run (preview generated herdr commands without executing)
herdr-compose apply --dry-run
5. Initialize Starter Configuration (init)
Generate a starter configuration file directly inside ~/.config/herdr-compose/:
# Generates ~/.config/herdr-compose/herdr-compose.yaml & sets as active default
herdr-compose init
# Generates ~/.config/herdr-compose/my-custom-layout.yaml
herdr-compose init my-custom-layout
🔍 Search Priority Order
When no file path is specified, herdr-compose searches in the following order:
- CLI argument parameter (e.g.,
herdr-compose apply backendorherdr-compose apply path/to/file.yaml) HERDR_COMPOSE_CONFIGenvironment variable- Active default configuration (
~/.config/herdr-compose/.active) - Default candidate path:
~/.config/herdr-compose/herdr-compose.yaml
📄 Configuration Reference & Examples
Save your configuration file as herdr-compose.yaml or layout.yaml.
- For full detailed schema reference, see docs/CONFIG_SPEC.md.
- For complete sample files, see examples/:
🧪 Testing
Run unit tests using pytest or uv:
uv run pytest
📄 License
Distributed under the MIT License. See LICENSE for details.
Metadata
Release files for herdr-compose 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| herdr_compose-0.2.1.tar.gz | 19.4 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| herdr_compose-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.1 kB
Release files / herdr_compose-0.2.1.tar.gz
| Download URL | herdr_compose-0.2.1.tar.gz |
|---|---|
| Size | 19.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3c99330d374f786a5b52cb3d0533232f8e4775aab830918529db5e3f7e18716
|
|
BLAKE2b-256 checksum How to use checksums |
7d2a16b32f644ddea2af6283f7397daaa65906b6967d50b2ec1372ea41752007
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.
Transparency logRelease files / herdr_compose-0.2.1-py3-none-any.whl
| Download URL | herdr_compose-0.2.1-py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1025271cbebe37d2359e47da056e83f3084ce3618d705a25fc32053df446c685
|
|
BLAKE2b-256 checksum How to use checksums |
ff2c799f9029521fd5e7eac48e3853c3802f1b34f0190be4db273a7ea2963d7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.
Transparency logSecurity for herdr-compose 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for herdr_compose-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.