Skip to content
dpleshakovPublic

About

A TUI tool that installs, updates, and removes agent-harness customization — skills, instruction files, plugins, config fragments — from local kit directories into a harness configuration directory. Tracks everything it writes in a lock and never touches files it doesn't own.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

penates

penates installs, updates, and removes agent-harness customization — skills, instruction files, plugins, configuration fragments — from local kit directories into a harness configuration directory such as ~/.config/opencode. It has two interfaces of equal capability: a terminal UI for people, and a command line for AI agents and automation. A per-target lock records everything penates writes, and what it did not write it never touches.

Customization kept in sync across machines faces two independent streams of change: the shared content itself evolves, and every machine needs its own paths, tools, and harness versions. When both live in the same files, each sync is a manual merge. A kit holds the shared content as installable items; each machine selects its own items and answers its own variables.

The main screen

 penates  ~/.config/opencode                                     3 pending · ? help

  ▾ personal-opencode     ●2 ↑1 ✗1      ~/kits/opencode
    ● writing                           1.0.0          Text editing skill
    ↑ done-v2             opencode-v2   1.2.0 → 1.3.0  Marks finished sessions   ✓
    ✗ git-via-gh          gh            1.2.0          AGENTS.md: heading exists
    ○ done-v1             opencode-v1   1.0.0          Marks finished sessions
  ▸ old-kit               ⊘ unreadable  ~/kits/old
  + add kit

 space unselect · d remove · enter details · / filter · a apply          q quit

Kits and items form one tree. Every state shows itself as a glyph and a color together — available, installed, update or downgrade available, modified, conflict, broken, warning, orphan (no kit provides the item anymore), and unavailable (the kit did not load); a pending action takes a separate mark at the right edge. The footer names the keys the row under the cursor answers: space toggles the default action of the status, d removes an installed item, r resets it to the kit content where the key applies, enter opens the details — beside the tree on wide terminals, as a scrolling view everywhere — and / filters by id, tags and description. a collects the pending actions into a summary that nothing is applied before: the items group by verb with a mark per path, and confirming runs the apply step by step, each item ending in a check or a cross. On exit penates prints what was applied during the session to the terminal.

The command line

The subcommands are the second, equal interface — the one AI agents, scripts, and automation drive:

penates setup --target <path>     # the first run's CLI form: attach the built-in kit, install its skills
penates status --target <path>    # the target, its kits and items, staged actions
penates show <kit/item>           # one item: status, variables, contributions, changelog
penates install <kit/item>…       # plan and apply in one run
penates update [<kit/item>…]      # every available update, or the named items
penates remove <kit/item>…        # plan and apply the removal
penates reset <kit/item>|--builtin
penates apply                     # apply what the terminal UI staged
penates pending clear             # drop the staged actions without applying
penates pending list              # the staged actions across all targets — where something waits
penates kit list|add|attach|detach|path|move …
penates target list|add|rename|forget …

--target <path> names the target the command acts on and is required wherever a command acts on one: the CLI neither reads nor writes which target the terminal UI opens — switching targets is the TUI's own state.

A mutating command prints its summary — the target line first — and asks once; --yes confirms in advance, --dry-run prints the summary and writes nothing of it, beside removing an interrupted apply's staged temp files. Without a terminal there is no asking: a command that would ask requires --yes. Variables flow through repeatable --set id=value flags; answers stored in the lock are reused.

The output is plain text with a stable skeleton: items are named kit/item, every item line opens with its state word, and every failure prints one line — Error [category]: message — naming the concrete next step. The categories never go away or get renamed; the exit code is 2 for a wrong command line alone and 1 for any other failure. The command path opens the command line, flags after it, and each command has exactly one form — so permission rules can govern the CLI by the command text. The full contract is specified in docs/concept.md (§10.3) and carried to agents by the built-in kit's operating skill.

The first run has no guard: it is usually a person's — a bare penates opens the terminal UI, which explains what a kit is and offers adding one — and an agent begins alone with penates setup: the command attaches the built-in kit to the target it names and installs the kit's skills, idempotently. One guard holds across both interfaces: one penates process works on a data directory at a time — an overlapping run, any command while the UI is open included, is refused with busy rather than silently merging state.

A minimal kit

A kit is a plain directory; an item directory holds everything one installable capability needs.

my-opencode-kit/
├── kit.yaml
└── items/
    └── writing/
        ├── item.yaml
        ├── skill/SKILL.md
        └── agents-note.md
# kit.yaml
name: my-opencode-kit            # unique among registered kits
description: Personal OpenCode customization
target_hint: ~/.config/opencode  # proposed target on first registration
shared:                          # files that section and json contributions may write to
  - AGENTS.md
# items/writing/item.yaml
id: writing
version: 1.0.0
description: Text editing skill
contributes:
  - file: skill/SKILL.md
    to: skills/writing/SKILL.md
  - section: agents-note.md
    to: AGENTS.md

The file contribution installs the skill whole under skills/writing/. The section contribution appends a marked block to the shared AGENTS.md, creating the file if it is absent; the rest of the file stays untouched, and removing the item takes the block with it. Items may also contribute json fragments into shared configuration files and declare variables that are requested at installation and substituted into templated contributions. The complete format, with the update and removal rules, is specified in docs/concept.md.

Ownership

  • Everything penates writes is recorded in a per-target lock; what is not recorded belongs to the user and is never overwritten or removed.
  • An update keeps a file the user modified when the kit content is unchanged, and reports a conflict instead of writing when it differs.
  • A removal deletes what is unchanged, keeps the content the user reshaped, and reports it.

penates keeps its own state in its configuration directory; a target receives only the declared contributions.

Running

Prebuilt binaries for Linux, Windows, and macOS — amd64 and arm64 — are on the releases page; with Go installed, go run ./cmd/penates runs the same interface from source.

With no arguments penates opens the terminal UI. The first run explains what a kit is and offers + add kit: type the kit's directory — with completion and a live preview — confirm or edit the target directory the kit's target_hint proposes, and the kit attaches there. On later runs penates opens the target that was active when it last exited.

The binary also ships its own documentation as a kit: on every start it is unpacked, registered under the reserved name penates, and kept in step with the binary's content. The first run offers attaching it; its three skills — a product reference, an operating guide for agents driving the CLI, and a kit-authoring guide — install like any other items, into skills/penates/, skills/penates-operating/, and skills/penates-kit-authoring/.

penates version prints the version and the commit the binary was built from — penates dev (unknown) on a plain go build. penates licenses prints the components included in the binary — penates, the Go standard library and runtime, and the third-party modules — with the license text of each; the third-party texts are embedded only in the release builds, and a build from source says so and points at the releases page. A first argument that names no command is rejected with one Error [usage]: line naming what to run.

Development

go build ./...
go test ./...
golangci-lint run

The stack and modules are recorded in docs/architecture.md.

License: MIT. Releases follow Semantic Versioning.

About

A TUI tool that installs, updates, and removes agent-harness customization — skills, instruction files, plugins, config fragments — from local kit directories into a harness configuration directory. Tracks everything it writes in a lock and never touches files it doesn't own.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages