### Install herdr-spreader as a herdr plugin Source: https://github.com/yuk1ty/herdr-spreader/blob/main/README.md Installs the plugin by cloning the repository, running `cargo build --release`, and registering it with herdr. ```bash herdr plugin install yuk1ty/herdr-spreader ``` -------------------------------- ### Create plugin config directory Source: https://github.com/yuk1ty/herdr-spreader/blob/main/README.md Creates the plugin's config directory and prints its path. Place your layout file named `config.yaml` or `config.yml` in that directory. ```bash herdr plugin config-dir herdr-spreader # => ~/.config/herdr/plugins/config/herdr-spreader ``` -------------------------------- ### Build, test, and iterate on the herdr-spreader plugin Source: https://github.com/yuk1ty/herdr-spreader/blob/main/README.md Run the standard Rust development checks (build, test, clippy with warnings denied, and formatting) and then link the plugin to a local herdr instance and invoke the herdr-spreader.apply action for iterative testing. ```bash cargo build cargo test cargo clippy --all-targets -- -D warnings cargo fmt # Iterate on the plugin against a real herdr instance herdr plugin link ./ herdr plugin action invoke herdr-spreader.apply ``` -------------------------------- ### herdr-spreader apply usage Source: https://github.com/yuk1ty/herdr-spreader/blob/main/README.md Usage syntax for the apply command. The `--file` flag specifies a layout YAML file; if omitted, the plugin searches predefined config directories. ```bash herdr-spreader apply [--file ] ``` -------------------------------- ### Apply herdr workspace layout with herdr-spreader apply Source: https://github.com/yuk1ty/herdr-spreader/blob/main/README.md Applies the workspace layout defined in the YAML file, reproducing the configured workspaces, tabs, and panes. The command is run from the project root. ```shell $ herdr-spreader apply ``` -------------------------------- ### Invoke herdr-spreader apply action Source: https://github.com/yuk1ty/herdr-spreader/blob/main/README.md Runs the layout from within any herdr workspace. Alternatively, trigger it from herdr's action menu (`Apply layout`). ```bash herdr plugin action invoke herdr-spreader.apply ``` -------------------------------- ### Define herdr workspace layout in YAML Source: https://github.com/yuk1ty/herdr-spreader/blob/main/README.md Defines two workspaces (frontend and backend) with tabs, panes, environment variables, and focus settings. The backend workspace is marked focus: true, and the editor pane in the backend has focus: true. The cargo watch pane uses wait_for with match "Compiling" and timeout_ms 10000. ```yaml workspaces: - name: frontend root: ~/code/my-project/frontend env: NODE_ENV: development tabs: - label: editor cwd: ./src panes: - command: nvim - split: down ratio: 0.3 command: npm run dev - name: backend root: ~/code/my-project/backend focus: true env: RUST_LOG: debug tabs: - label: editor cwd: ./src panes: - command: nvim focus: true - split: down ratio: 0.3 command: cargo watch -x test wait_for: match: "Compiling" timeout_ms: 10000 - label: server panes: - command: cargo run ``` -------------------------------- ### Build and run standalone CLI Source: https://github.com/yuk1ty/herdr-spreader/blob/main/README.md Builds and runs herdr-spreader as a standalone CLI. Works outside a herdr session as long as a herdr server is running and the `herdr` binary is on `PATH`. ```bash cargo build --release ./target/release/herdr-spreader apply --file ./config.yaml # or cargo install --path . ``` -------------------------------- ### Shell prefix for first pane cwd/env override Source: https://github.com/yuk1ty/herdr-spreader/blob/main/ARCHITECTURE.md Used when a first pane needs a cwd or env beyond its workspace/tab baseline. Prefixed to the pane's run command; quoted with shell_quote (POSIX single-quote escaping). If the pane has no command but needs cwd/env, this line alone is run. ```shell cd '' && export KEY='value' && ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.