toha

Generate projects and files from templates.

Toha uses one interview for terminal users, scripts, agents, and Rust callers.

Install with Homebrew (macOS, Linux)

brew install wyrd-company/tools/toha
Terminal recording of toha asking for a note title and topic and writing the note, then staging the same interview with JSON output.
Toha applies its bundled demo template, then runs the same interview as a staged script.

More

  1. 02 Toha records an application, then updates the project from it.

What it does

  1. Runs one interview from a terminal, a script, an agent or the Rust crate.

  2. Resumes an interview later, or takes its answers from a JSON file, including whole documents.

  3. Renders file paths and contents with typed Jinja values, conditions and loops, and previews the plan before it writes.

  4. Injects bounded regions and typed JSON values into files that already exist.

  5. Records each application in .toha.json, and updates generated projects while it keeps your edits.

  6. Runs template hooks only after you trust the template.

Install

brew install wyrd-company/tools/toha

Documentation

Releases

Latest 0.4.1 Release notes on GitHub

Features

  • Preserve named user sections inside generated files on apply and update.
  • Create empty directories from rendered template paths with optional each and when rules. Preserve existing directories and their contents, preview missing directories, and create them during apply, baseline and update.

Fixes

  • Allow applying templates into unborn worktrees of bare repositories and honor their working-tree attributes.
  • Validate the locked public-library consumer in hosted CI and document refreshing both release lockfiles.
All releases