Repository navigation
Home
m4bwav edited this page Nov 28, 2026
·
3 revisions
trainwright is an agent plugin (Claude Code, Copilot, Codex, Cursor, Gemini CLI) for training your own models on a local GPU: image and video LoRAs (ai-toolkit, musubi-tuner, kohya), voice fine-tunes (VoxCPM) and small LLM fine-tunes (Unsloth, TRL QLoRA). Each run is kept as a JSON recipe you can rerun and compare.
The plugin is one skill and one script, skills/trainwright/scripts/tw.py. The script needs Python 3.9 or later and nothing outside the standard library; trainers run as subprocesses. Every verb prints JSON, and exit code 2 means a gate refused.
-
Getting started: install the plugin and walk a recipe from
newto a dry run. -
Commands: every
tw.pyverb, its options and its output. - Recipe format: the fields of a recipe and the defaults for each kind.
-
Gates: what
checkrefuses or warns about, with the messages. - FAQ and Known issues.
- Versions and upgrading and Development.
-
tw.py newwrites<name>.recipe.json, andconfignames its file after the recipe:my-style.ai-toolkit.yaml, notmy-style.yaml(Getting started). -
hash --manifesthashes caption.txtfiles as well as images, so a caption edit also counts as a dataset change (Commands). -
check --shallowskips the dataset hash check, the GPU probe and the disk floor (Gates). - In 0.1.0,
config --trainer kohya(or any trainer other than ai-toolkit) without--outoverwrites the recipe (Known issues).
This wiki describes trainwright 0.1.0 and was last updated on 2026-11-19. The plugin is MIT licensed. Report problems in the issues.
Using it
The releases
Contributing
Elsewhere