A bidirectional template generator. Copy a directory and rewrite placeholder tokens in file names, directory names, and file contents — in either direction:
- generate — template → real code (substitute placeholders with values).
- templatize — real code → template (replace concrete values with ready-to-replace placeholder spots).
Config layers: built-in defaults → TOML file → CLI flags (CLI wins).
# template -> code
deno run -A jsr:@kindkitchen/plopper generate \
--input=<template-dir> --output=<dst-dir> \
--start-replacement=_place_ --end-replacement=_holder_ \
--dictionary some-feature=auth --dictionary SomeFeature=Auth
# code -> template (dictionary direction is inverted)
deno run -A jsr:@kindkitchen/plopper templatize \
--input=<real-code-dir> --output=<template-dir> \
--start-replacement=_place_ --end-replacement=_holder_ \
--dictionary auth=some-feature --dictionary Auth=SomeFeature
# write a starter TOML config
deno run -A jsr:@kindkitchen/plopper initWhen overwriting an existing config from an agent or script, use init --force;
add --reuse-existing to load the current file as the base before applying CLI
overrides.
Run deno run -A jsr:@kindkitchen/plopper --help for the full flag list.
plopper ships a self-contained Agent Skill so an agent
(Claude Code, the Agent SDK, etc.) can discover and drive it. Install it into a
project in one command — --dest is required so you choose where it lands:
# project-local (committable, discovered by agents working in the repo)
deno run -A jsr:@kindkitchen/plopper install-skill --dest=./.claude/skills/plopper
# or per-machine, for every project
deno run -A jsr:@kindkitchen/plopper install-skill --dest=~/.claude/skills/plopperThis copies SKILL.md, the reference docs, and a ready-to-use starter template
into the destination. Add --force to overwrite an existing install.
The typical agent flow it enables: point templatize at real codebase fragments
to turn them into a template with common, ready-to-replace spots, then
generate new code from that template.
import { process_template } from "jsr:@kindkitchen/plopper/process-template";
import { load_config_file } from "jsr:@kindkitchen/plopper/load-config";
import { install_skill } from "jsr:@kindkitchen/plopper/install-skill";- Marker mode — pass both
--start-replacementand--end-replacement(required together).generatereplaces<start><key><end>with the dictionary value. - Literal mode — omit both markers. Each dictionary key is replaced wherever it appears as a substring (single pass, longest key first, no cascade).
skill/SKILL.md— the shippable skill.skill/reference/config-schema.md— every option, type, default, and exit code.skill/reference/template-authoring.md— the_place_X_holder_convention, ignore blocks, and the round-trip.
MIT