Toha
Generate projects and files from templates.

Toha is a project scaffolding tool and Rust crate. A template contains an interview and files to render with Jinja. Toha plans the output before it writes, so you can inspect a dry run and handle conflicts.
The same interview engine serves terminal users, scripts, agents, and Rust callers. Scripts and agents can answer one JSON Schema batch at a time and resume a staged interview in another process.
- One interview for people, scripts, agents, and Rust callers
- Resumable async interviews and headless answers files
- Typed Jinja values and rendered file paths
eachfile generation and static files- Template hooks gated by trust
- Git template sources, short names, and aliases
- Embedded agent skills through
toha skills
Read the Toha documentation for guides and the full contract.
Install
Homebrew:
APT:
|
|
RPM:
Arch Linux (AUR):
GitHub Releases also
provides Linux and macOS tarballs, Windows zip archives, and SHA256SUMS for
direct installation.
First run
From a checkout of this repository, use the demo template:
Answer Note title and Topic. To inspect the file plan without writing
it, use toha apply ./docs/examples/demo ./preview --dry-run.
Using Toha from Rust
Add the library without the CLI dependencies:
From this repository checkout, drive the same interview with a JSON answers document:
use Path;
use ;
let template = load.unwrap;
let seed = Seed ;
let Asking = start.unwrap else ;
let answers = parse_answers.unwrap;
let Complete = pending.answer.unwrap else ;
assert_eq!;
See CONTRIBUTING.md for development and changes.