Skip to main content

Crate kata

Crate kata 

Source
Expand description

kata — multi-project template applier with AI-delegated merge.

Re-exports§

pub use error::Error;
pub use error::Result;

Modules§

ai
AI agent abstraction.
applied
<pj>/.kata/applied.toml — the truth of what’s installed in a project. Owned by kata; written automatically. Should be committed by the project so teammates can kata apply and reproduce the layout.
cli
clap CLI surface.
cmd
One file per subcommand. The dispatch table itself lives in cli.rs (calling cmd::<name>::run).
config
Global config (~/.config/kata/config.toml) — tool defaults + the registry of project paths kata knows about.
error
git
Thin shell-out wrappers around the git CLI. Phase 2 chose shell-out over libgit2 / gix because Windows linking pain outweighed the benefits (yui experience). The only mandatory dependency is a working git on PATH; kata doctor checks.
interactive
Inquire-based interactive prompts. Hosts the var prompter and the chezmoi-style [a]ccept / [e]dit / [c]hat / [h]andoff / [s]kip / [d]efer AI decision dialog used by modes/ai.rs.
manifest
template.toml schema — owned by template authors. Parsed by kata when applying a template to a project.
modes
ApplyMode — one impl per how value in the manifest. With Phase 3-b2 every HowMode variant has a concrete impl, so the for_how dispatcher is exhaustive and no longer needs a Unimplemented fallback shim.
paths
preset
preset.toml — a bundle of template references. Lives in an external repo, gets resolved into a list of templates to apply.
render
Templating engine. Wraps teravars::Engine so kata can register kata-specific helpers in one place (none yet for Phase 1).
runner
Phase 1 runner — synchronous, single-PJ orchestration.
template
TemplateHandle — a resolved template, ready to be walked and applied. Local sources resolve directly against base_dir; git sources go through TemplateCache (clone-on-first-use into ~/.cache/kata/templates/...).
ui
Output formatting helpers. Phase 1 keeps this minimal — colour via owo-colors, no icon mode dispatch yet (Phase 4 polish).
updater
Background auto-update + the kata self-update subcommand, built on kaishin.
vcs
VCS-state inspection helpers for kata apply --all (#80).