8000 GitHub - xh/herdr-mods: XH mods and helpers for the Herdr desktop app · GitHub
[go: up one dir, main page]

Skip to content

About

XH mods and helpers for the Herdr desktop app

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

26 Commits

Folders and files

Repository files navigation

herdr-mods

Herdr mods that XH devs share and improve together: a tab bar, an agents tree, a spaces sidebar, a code review panel, a docs reader and more. The core mods make up the XH setup. The extras are small sidebar add-ons you opt into. Pick the mods you want. Your own settings live outside the repo, in ~/.config/herdr-app/user/<mod>/, so updating a mod never touches them. See AGENTS.md before changing a mod, and docs/design.md for the why.

Mods

Agents: ask before you install. Show the developer the core and extras lists below, one line per mod, and let them choose. A multi-select question works well. Link the core mods they keep, and an extra only if they picked it. Never install an extra by default. examples/mods.txt lists all of them with the extras turned off, ready to edit.

Windows* means the Windows app with a remote core. Only macOS has been run so far: the rest comes from a code audit. Each mod's README has the details.

Core

The XH setup. The example layout expects all of these. Any of them can be left out: the notes say what goes with what, and each mod's README says what it replaces.

Mod What it does Works on Notes
xh-tabs Tab bar with space colors, recent-tab history and a Review button macOS, Linux, Windows*
xh-picker Go to any tab, most recent first macOS, Linux, Windows* Needs a key: see examples/keys.md.
xh-pane Pane header with space color bar and a remote-machine badge macOS, Linux, Windows*
xh-spaces Spaces sidebar with colors, icons, groups and worktrees under their checkout macOS, Linux, Windows* Spaces bundle: these six go together.
xh-menu Context menus with Icon, Next color, Group and worktree items macOS, Linux, Windows* Spaces bundle.
xh-icon-picker Pick a space's icon macOS, Linux, Windows* Spaces bundle.
xh-group-picker File a space under a group macOS, Linux, Windows* Spaces bundle.
xh A806 -space-folder Ask for a folder for a new space on another machine macOS, Linux, Windows* Spaces bundle.
xh-new-menu The + menu: terminal, agent, space, worktree macOS, Linux, Windows* Spaces bundle.
xh-agents Agents tree with branches, sub-terminals and Hoist servers under their agent macOS, Linux, Windows*
xh-reader Markdown reader pane with doc tabs and line comments for agents macOS, Linux, Windows* Goes with xh-md-picker.
xh-md-picker Pick a repo's markdown file and open it in xh-reader macOS, Linux, Windows* Goes with xh-reader.
review Code review panel: changed files, diffs, comments sent to the agent macOS, Linux, Windows* xh-tabs' Review button opens it.
xh-chrome Sidebar header with the XH mark, search and the collapse toggle macOS, Linux, Windows* Without it, use Herdr's own workspace-chrome in the layout's brand block.
xh-servers Status bar block for the space's Hoist dev servers macOS, Linux For Hoist work. Needs @xh/hoist-cli.
xh-worktree Worktree and stack dialog, set up by Hoist's setup-worktree macOS, Linux For Hoist work. Needs the xh@hoist-ai plugin.

Extras

Small sidebar add-ons, off unless the developer asks for one. Each needs its block added to the layout: see "Layout" in its README.

Mod What it does Works on
xh-sun Day and night bar macOS, Linux, Windows*
xh-moon Lunar cycle bar macOS, Linux, Windows*
xh-oracle A small daily oracle macOS, Linux, Windows*
xh-photo A photo a day from a folder you pick macOS only

Quick start: the XH setup

These steps set up a Mac or Linux machine with the mods the developer picks, the XH layout and theme. An agent can follow them as written. It needs Herdr installed and opened once, so ~/.config/herdr-app exists. The mods were last checked on Herdr 0.1.18.

  1. Clone the repo:

    git clone https://github.com/xh/herdr-mods.git ~/dev/herdr-mods
  2. Ask the developer which mods they want (see Mods above): all the core mods or only some, and which extras, if any. Then copy the list, turn lines on or off to match, and link. If a mods.txt already exists, merge into it, don't overwrite it.

    mkdir -p ~/.config/herdr-app/user/herdr-mods
    cp ~/dev/herdr-mods/examples/mods.txt ~/.config/herdr-app/user/herdr-mods/mods.txt
    # edit mods.txt to match the developer's picks
    ~/dev/herdr-mods/bin/herdr-mods link

    skip <name> means a mod folder with that name is already in ~/.config/herdr-app/mods/. Ask the person before you move it aside, then run link again.

  3. Copy the layout and theme. Ask first if layouts/xh.json or themes/xh.json already exist.

    cp ~/dev/herdr-mods/examples/layouts/xh.json ~/dev/herdr-mods/examples/layouts/xh.svg ~/.config/herdr-app/layouts/
    cp ~/dev/herdr-mods/examples/themes/xh.json ~/.config/herdr-app/themes/

    The layout has blocks for the core mods only. Fit the copy in ~/.config/herdr-app/layouts/xh.json to the picks:

    • For each extra picked, add the block from its README. xh-sun, xh-moon and xh-oracle go in the sidebar-upper column after agents. xh-photo goes last in the sidebar-lists column.
    • For each core mod left out, remove its block (xh-servers, review), or swap in Herdr's own mod: tabs for xh-tabs, spaces for xh-spaces, agents for xh-agents, workspace-chrome for xh-chrome, pane for xh-pane (the pane header). Without xh-reader, remove it from the root's link_handlers.

    Then switch to it: herdr-app do layout.switch --name xh.

  4. Keys: show the person examples/keys.md and add the ones they want to keys.json by hand. Never replace keys.json.

  5. Programs for the Hoist mods. Without them these mods show a quiet message and the rest work.

    • xh-servers: @xh/hoist-cli (npm install -g @xh/hoist-cli@next), with xh-server and xh-checkouts linked into ~/.local/bin.
    • xh-worktree: Claude Code with the xh@hoist-ai plugin at user scope, and node 22.7 or later on the login shell's PATH.
  6. Personal settings are optional and live in ~/.config/herdr-app/user/<mod>/. Each mod's README lists them. If the developer picked xh-photo, set its photo folder: props.folder on its block in layouts/xh.json (default ~/Pictures/Herdr).

  7. Verify:

    • ~/dev/herdr-mods/bin/herdr-mods status shows every picked mod linked, and the rest available.
    • herdr-app status shows "errors": [].
    • herdr-app shot saves a picture of the window to check.

To update later: git -C ~/dev/herdr-mods pull --ff-only && ~/dev/herdr-mods/bin/herdr-mods link. Only the mods that changed reload.

To add or drop a mod later, edit mods.txt, run link again, and add or remove its block in the layout.

Windows app with a remote core

What we expect a Windows desktop with a Linux dev workspace needs. None of this has been run yet: it comes from a code audit, so treat the first install as a test and report what breaks. docs/design.md has the platform facts.

  • Where things run: the app, its mods and the app home (%USERPROFILE%\.config\herdr-app) are on Windows. Terminals, git and agents run on the Linux workspace. The workspace has no app home, and no mod folders.
  • Install by copy. Windows links need extra rights, so copy mod folders into %USERPROFILE%\.config\herdr-app\mods\. A downstream repo that vendors this one as a submodule can do the copy in its deploy step. By hand, from a clone on Windows, in PowerShell:
    $app = "$env:USERPROFILE\.config\herdr-app"
    foreach ($m in "xh-tabs","xh-picker","xh-pane") {   # the developer's picks
      robocopy "mods\$m" "$app\mods\$m" /MIR /XF jsconfig.json *.d.ts /XD .cache /NFL /NDL /NJH /NJS
    }
    /MIR also removes files a mod dropped. Run it again to update. Never copy into or over user\.
  • Which mods: ask the developer, as in Mods above. Offer the core mods marked Windows*, and the extras only as opt-ins. xh-photo and xh-servers don't apply: xh-photo is macOS only, and xh-servers runs servers on the app's own machine. xh-worktree is unchecked there. It needs its helpers, zsh, node 22.7 or later, claude with the xh@hoist-ai plugin, hc and herdr-app on the workspace. Without them it falls back to a plain git worktree add. To place the helpers, clone this repo on the workspace and copy mods/xh-worktree/xh-worktree, xh-stack.mjs and stack-model.js to ~/.local/share/herdr-mods/xh-worktree/ there.
  • Spaces: work in spaces on the workspace. A local Windows space has git but no sh or env, so review, xh-md-picker's path mode and xh-reader's clicked paths fail there.
  • Programs on Windows: review and xh-reader send comments through hc, so hc must be on the Windows PATH. Web links in xh-reader do nothing off macOS.
  • Layout: copy examples/layouts/xh.json, xh.svg and themes/xh.json as in the quick start. Remove the xh-servers block, and fit the layout to the picks as step 3 of the quick start says. The layout uses the Geist Mono and GeistMono Nerd Font Mono fonts: without them Herdr falls back to a default font. xh-tabs draws Windows-style window buttons.
  • Keys: add them by hand from examples/keys.md, with ctrl in place of cmd.
  • Locked-down desktops:
    • No GPU: the layout's panes are already square, which is cheapest to draw.
    • TLS interception can break xh-sun's location lookup, if the developer picked it: set user\xh-sun\location.json instead.
    • Only Windows PowerShell 5.1, and no unsigned .ps1 files: the mods run PowerShell inline and need neither.
    • The workspace's core can be older than the app's. Report a remote call that fails.
  • Verify: herdr-app status shows "errors": [] and herdr-app shot saves a picture, if the herdr-app command works on that desktop. Otherwise check the window by eye: tab bar, sidebar, agents list and status bar all draw.

Install

  • Link (macOS, Linux): clone the repo, list the mods you want, and bin/herdr-mods link links each into ~/.config/herdr-app/mods/.
  • Copy (Windows app, or anywhere links don't suit): copy whole mod folders into the app's mods/. Never copy or overwrite user/. A downstream repo can vendor this repo as a submodule pinned to a commit and copy chosen mods in its own deploy step. It also installs the helpers of mods that run them remotely into ~/.local/share/herdr-mods/<mod>/ on each remote machine.

Link

git clone https://github.com/xh/herdr-mods.git ~/dev/herdr-mods
mkdir -p ~/.config/herdr-app/user/herdr-mods
printf 'xh-tabs\nxh-picker\n' >> ~/.config/herdr-app/user/herdr-mods/mods.txt
~/dev/herdr-mods/bin/herdr-mods link     # link listed mods, remove links the list dropped
~/dev/herdr-mods/bin/herdr-mods status   # every mod here: linked, listed, blocked or available
~/dev/herdr-mods/bin/herdr-mods unlink xh-picker

mods.txt takes one mod name per line. # comments and blank lines are ignored. link never replaces a real folder or a link to somewhere else: it prints skip <name> and goes on. The one exception is an old copy that holds only app-written files (jsconfig.json, *.d.ts, .cache/), which is what git leaves behind when a settings repo stops tracking a copied mod. It also links each mod into ~/.local/share/herdr-mods/, where mods find helpers they run on a machine. Set HERDR_APP_HOME to use another app home.

Herdr does not notice edits inside a linked folder. link touches the link of each mod that changed, which makes Herdr reload it, so run it after every pull. After you edit a mod in the clone, touch -h ~/.config/herdr-app/mods/<name> reloads it.

About

XH mods and helpers for the Herdr desktop app

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0