CLI reference
Every Terox command and flag.
This page lists every subcommand Terox ships with. Run terox <command> --help at any time for the same information from the binary itself.
terox scaffold
Render a template into an output directory.
terox scaffold <owner/repo|path> [flags]
Arguments
| Name | Description |
|---|---|
<owner/repo|path> | Either a public GitHub repository (owner/repo) or a local directory containing a template. |
Flags
| Flag | Default | Description |
|---|---|---|
-o, --output | . | Directory to write the rendered project into. |
--set key=value | — | Pre-set a variable value. Repeatable. |
--non-interactive | false | Do not prompt. Every variable must have a --set value or a default. |
--refresh | false | Re-download a remote template, ignoring the local cache. No effect on local paths. |
Examples
# Interactive, from a local template
terox scaffold ./templates/demo --output ./my-project
# Non-interactive, from a GitHub repository
terox scaffold weburz/simple-website-template \
--output ./my-site \
--set project_name=portfolio \
--set author="Sagar Kapoor" \
--non-interactive
Exit codes
| Code | Meaning |
|---|---|
| 0 | Scaffolded successfully. |
| 1 | Any error: bad template ref, missing required variable, etc. |
terox create
Create a starter template directory you can edit and publish.
terox create <template-name> [flags]
Arguments
| Name | Description |
|---|---|
<template-name> | Folder name for the new template. |
Flags
| Flag | Default | Description |
|---|---|---|
--path | . | Parent directory in which to create the template folder. |
Example
terox create demo --path ./templates
The generated folder contains:
terox.jsonwith three example variables (project_name,author,license){{.project_name}}/README.mdshowing variable usage{{.project_name}}/.gitignore
terox list
List templates that Terox has cached locally.
terox list
Templates are cached under $XDG_DATA_HOME/terox/ (typically
~/.local/share/terox/) the first time you scaffold from a remote source.
terox clean
Delete every locally cached template.
terox clean
The next remote scaffold will re-download the template from GitHub.
terox version
Print the build version, commit, build date and Go toolchain version.
terox version
Global help
Any subcommand accepts --help for the flag list.
terox --help
terox scaffold --help