Conversation
dl --herdr-setup now writes, besides the pane shell, the status segment and the agent-queue plugin (then links it and runs its startup hook), merges the packaged keymap/theme into Herdr's config (managed keys always set, default keys only when absent), installs herdr's Claude integration when it is missing or outdated, merges a tab-title Stop hook into settings.json (foreign hooks kept, only our entries and herdr's duplicates deduped, backed up once), writes herdr's skill (old one kept when --skill fails), writes kitty's F-key fix with an include line, and links ~/.local/bin/herdr to ~/.pixi/bin/herdr. Every asset is include_str!'d so the conda package and the wheel carry it. --dry-run, --no-claude and --no-kitty modify it. A chezmoi-managed file is skipped with the line to add; the other steps still run. The config merge moves from devlaunch-core (flows::herdr_environment::configure) into dl's herdr_kit, so the rest snapshot loses that one row.
Isolated HOME and XDG dirs, a fake herdr that records its argv, and the release binary: one run installs everything, a second writes nothing, and a dry run leaves the disk as it was.
Reviewer's Guide
Sequence diagram for an idempotent Herdr kit installationsequenceDiagram
participant User
participant DL as dl
participant FS as Filesystem
participant Herdr
participant Chezmoi
User->>DL: --herdr-setup
DL->>FS: Install embedded assets when content or mode differs
DL->>Herdr: plugin list --json
alt Plugin is not linked
DL->>Herdr: plugin link
DL->>FS: Run agent-queue view.sh set
else Plugin already linked elsewhere
DL-->>User: Skip plugin link
end
DL->>Chezmoi: source-path Herdr config
alt Config unmanaged
DL->>FS: Merge managed and default config keys
else Config managed
DL-->>User: Report skipped with source path
end
opt Claude enabled and config directory exists
DL->>Herdr: integration status
alt Missing or outdated
DL->>Herdr: integration install claude
end
DL->>FS: Merge settings.json and write skill from --skill
end
opt Kitty enabled and config directory exists
DL->>FS: Write devlaunch-herdr.conf and include line
end
DL-->>User: Report outcomes and reload hint
Flow diagram for the Herdr kit setup commandflowchart TD
A["dl --herdr-setup"] --> B["Parse setup options"]
B --> C["Install pane shell and embedded kit assets"]
C --> D["Link agent-queue plugin and run startup hook"]
D --> E["Probe chezmoi and merge Herdr config"]
E --> F["Optionally install Claude integration, hooks and skill"]
F --> G["Optionally install kitty F-key fix"]
G --> H["Report changed, current, skipped or failed"]
H --> I["Print reload-config hint when config changed"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report❌ Patch coverage is
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
herdr appends its current SessionStart entry, so the last copy is the one to keep.
herdr_config built terminal.default_shell and the status.sh segment from the paths it meant to install, not from what this run installed. When the pane shell (or status.sh) could not be written, the config still pointed every new pane at a missing file. The install steps now hand back the installed path, and the config step is skipped when either is absent.
…ings.json `herdr integration install claude` rewrote ~/.claude/settings.json even when chezmoi managed it and the settings step had skipped it, so the next `chezmoi apply` reverted the change. The integration step now asks chezmoi first and reports skipped, with the hooks to add to the dotfiles source.
With [keys] zoom = "f6", setup added rename_tab = ["prefix+shift+t", "f6"]; with a [[keys.command]] on f7, it added f7 to next_agent. A filled default action or command now drops every key string the user's [keys] already binds, and an action left with no key is not added.
…action With [keys] zoom = "prefix+a", setup still added a [[keys.command]] on prefix+a, because it checked the key only against other [[keys.command]] entries. It now checks every key the user's [keys] binds, and reports the toggle skipped as it does for a command.
…stered tab-title hook settings() returned false both for "no other tab-title hook" and for "could not read settings.json", so a settings.json with invalid JSON failed the settings step and still got ~/.claude/hooks/devlaunch-herdr-tab-title.sh, which nothing runs. settings() now says Ours, Other or Unknown, and the script is installed only on Ours.
… is no longer reported as needing no change The chezmoi branch said "it needs no change" whenever another herdr-tab-title.sh hook was registered, using that as a stand-in for the merge changing nothing. A file with that hook beside devlaunch's own, or with two herdr SessionStart copies, still needs entries removed. The report now follows the merge: no change only when it would write nothing, otherwise the steps it would take.
…er run refuses, or re-ask for a hook already added report() spelled the home directory ~ across the whole line, so the herdr config instruction told the user to paste default_shell = ~/.local/bin/dl-herdr-shell, which the next run's set_default_shell refuses as a custom shell; the same ~ in the Stop hook command would sit in single quotes and never expand. Text to paste is now in backticks and kept verbatim. The chezmoi settings report also asked to add the Stop hook on every run, even after the user had added it with devlaunch's exact command, because the merge counts a hook without the timeout as needing a correction. It now asks only when no Stop hook runs that command.
# Conflicts: # CHANGELOG.md
The packaged herdr config predates [session] resume_agents_on_restore and startup_per_agent_delay_ms, so dl --herdr-setup never turned auto-resume on. Ship both as default keys: a new config gets them, and a user's value wins.
The suite clears the child's environment, which dropped LLVM_PROFILE_FILE, so every counter the 37 tests produced went to a stray default_*.profraw that cargo llvm-cov never reads. Forward it through KeepingCoverage, as the other binary-boundary suites do.
It runs in the rust job but was missing from the coverage suite list, so herdr_kit and herdr_environment.rs reported only what the unit tests reach.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
dl --herdr-setupnow installs the whole Herdr kit, so a new machine gets a working Herdr + devlaunch setup from devlaunch alone, with no dotfiles:dl-herdr-shell), as beforestatus.sh(CPU, memory, disk for the tab bar) and the agent-queue plugin under$XDG_DATA_HOME/devlaunch/herdr/, thenherdr plugin linkand the plugin's startup hook (linking does not fire it)$HERDR_CONFIG_PATH, else$XDG_CONFIG_HOME/herdr/config.toml)herdr integration install claude, only whenherdr integration statussays missing or outdated~/.claude/hooks/devlaunch-herdr-tab-title.sh) and itssettings.jsonentry~/.claude/skills/herdr/SKILL.md, fromherdr --skilldevlaunch-herdr.conf, plus anincludeline inkitty.conf~/.local/bin/herdr->~/.pixi/bin/herdr, only when the first is absent and the second existsNew modifiers:
--dry-run(print every planned change, write nothing),--no-claude,--no-kitty.Why
devlaunch ships as a conda package and a wheel that hold only binaries, and the glue lived only in one user's chezmoi source. Every asset is now
include_str!'d intodland written at setup time.How it behaves
changed/current/skipped/failedwith a reason. Files are written only when their content (or a script's mode) differs, by rename from a temp file in the same directory, through a symlink when the path is one. A second run writes nothing.terminal.default_shell, theprefix+a->local.agent-queue.togglebinding, thestatus.shsegment inui.tab_bar_right, the· herdrend ofui.window_title. Each stops at a value that is plainly the user's (customdefault_shellfails the step as before; a user's ownstatus.shkeeps its segment;prefix+abound elsewhere stays bound). Default keys (the rest of the packaged keymap, theme, sidebar, toasts) are added only when absent. An empty or missing config gets the packaged file verbatim.settings.json: only devlaunch's Stop hook is added or corrected, and duplicates of it and of herdr'sherdr-agent-state.shSessionStart hook are removed. Every other key and hook stays, in order. Backed up once tosettings.json.devlaunch-backup. If a dotfilesherdr-tab-title.shhook is registered, devlaunch adds neither its entry nor its script.settings.jsonandkitty.confare probed with the existingchezmoi source-pathcheck. A managed file is skipped with the line to add; the other steps still run (before, the whole command refused). A chezmoi that cannot answer still fails.herdr server reload-configwhen the config changed, and namesDEVLAUNCH_HERDR=1as an opt-in (its default is unchanged).devlaunch_core::flows::herdr_environment::configureintodl's newherdr_kitmodule, sopublic-api.rest.txtloses that one row.requires = "herdr_setup"is met by any member of thewhatgroup, sodl --prune --dry-runparsed. The three modifiers are refused explicitly on other commands, as a usage error with exit 2. (--prune --jsonhas the same pre-existing gap; not touched here.)Try it
Use a scratch HOME as above, and unset
CLAUDE_CONFIG_DIR, or it writes your real Claude settings.Tests
settings.json(foreign hooks kept in order, our and herdr's duplicates removed, dotfiles hook respected).rust/dl/tests/herdr_environment.rs: end-to-end runs of the binary in an isolated HOME with a herdr stub that records its argv (full install then no-op second run, dry run writes nothing,--no-claude/--no-kitty, backup once, failing--skillkeeps the old skill, plugin linked elsewhere, chezmoi-managed files, herdr missing).test/unit/test_herdr_setup_kit.py: the same, from the pytest harness against the release binary.🤖 Generated with Claude Code
Summary by Sourcery
Make
dl --herdr-setupinstall and safely maintain the complete Herdr integration kit without requiring dotfiles.New Features:
dl --herdr-setupinto a complete, self-contained Herdr and devlaunch installation kit, including configuration, plugins, Claude Code integration, skills, and kitty support.--dry-run,--no-claude, and--no-kittymodifiers for controlling setup behavior.Bug Fixes:
Enhancements:
dlsetup flow with managed-key updates, default-key preservation, atomic writes, and reload guidance.dlbinary so packaged installations no longer depend on dotfiles.Build:
dlpackage for Herdr kit installation.Documentation:
Tests:
Chores: