Run t4 <command> --help for every option of a command. serve, status and diff have the short forms s, st and d. Most commands take --env NAME (or -e) to act on an environment other than the default.
Only push writes to T4. Everything else reads from it, or works on disk.
| Command |
What it does |
t4 init [dir] |
Set up a project in this directory: writes .t4/config.json and a .gitignore block |
t4 env |
List environments |
t4 env add NAME URL |
Add an environment. --push allows pushing to it, --published URL names the public site, --label the name shown in the app |
t4 env set NAME |
Change one: --url, --published, --label, --language, --root-section, --push / --no-push, --require-commit yes|no|inherit, --default. An empty value clears a setting |
t4 env remove NAME |
Remove an environment |
t4 config |
Show project-wide settings |
t4 config set KEY VALUE |
Change one, such as use_git yes or default_environment test |
t4 token set NAME |
Store an API token. Prompts with input hidden; --stdin reads it from a pipe |
t4 token status |
Where each token is stored, and when it expires |
t4 token check NAME |
Try the stored token against T4 with one read-only request, and say plainly why it fails if it does |
t4 doctor Pro |
Check this tool against a T4 instance. Read-only. See Checking an instance |
| Command |
What it does |
t4 pull |
Fetch layout source from T4 onto disk. --all for every environment with a token, --only ENDPOINT, --no-detail for metadata only, --binary for images and fonts, --force to overwrite local edits |
t4 sync |
Pull, then report what changed on each side |
t4 media [list|add|remove] [IDS] |
Media Library items or (--category) categories a pull fetches by id. See Pulling and pushing |
t4 mirror [URL] |
Download the published site. --include-documents keeps PDFs and Office files, --delay and --retries for a crawl that is being throttled, --limit N to stop early. --images downloads the images the mirrored pages use that are not on disk yet, without crawling the pages again |
t4 sections |
Walk the section tree, recording each page layout and the content in each section. --root ID, --limit N, --restart, --no-contents |
| Command |
What it does |
t4 serve (s) |
Serve the mirrored site at 127.0.0.1:8321 with your edits applied. See The local site for --proxy, --no-proxy, --inspect, --no-preview and the rest |
t4 app |
Open the web UI at 127.0.0.1:8320. --no-open prints the URL instead |
t4 status (st) |
What is pending, across assets and layout source. --offline skips the comparison against T4 |
t4 diff (d) [PATHS] |
Where local files differ from T4. --show for full diffs |
t4 layouts [PAGE] |
Which layout renders what, and where its source is. --all includes unused layouts |
t4 edit PATH |
Copy a mirrored file into overrides/. --list, --revert, --promote |
t4 preview [PAGE] Pro |
What a local layout edit changes in the output, as a diff. --out FILE writes the HTML. See Layout previews |
t4 fixtures [TYPE] Pro |
Render a layout or tags with sample content. --path, --tags, --values, --lorem, --css. See Sample data |
t4 compare [PAGE] Pro |
Diff the local page against the published one. See Checking the local copy |
| Command |
What it does |
t4 discard PATHS |
Put files back to what the last pull fetched, offline |
t4 save -m MESSAGE [PATHS] |
Commit the pulled source, naming the T4 record behind each file. --dry-run lists what would go |
t4 push [PATHS] |
Send local changes to T4, one confirmation per file. --dry-run, --yes, --exact, --allow-dirty, --ignore-conflicts. See Pulling and pushing |
| Variable |
What it does |
T4_TOKEN_<NAME> |
The token for environment NAME, in capitals, with anything that is not a letter or digit as _. Used instead of the token store; see Pushing from CI |
T4_TOKEN |
The token, accepted only when the project has a single environment |
T4_TOKEN_STORE=file |
Keep tokens in .t4/tokens/ as owner-only files instead of the Keychain or DPAPI |
SSL_CERT_FILE |
A PEM file of extra trusted roots, for a VPN that re-signs TLS with a root that is in no keychain |
Extensions can add commands of their own; t4 --version lists any that are installed.
An independent, unofficial tool. Not produced, endorsed or supported by TERMINALFOUR Solutions Ltd, and not TERMINALFOUR software. “T4” and “TERMINALFOUR” are their trademarks, used here only to identify the software this works with. Copyright © 2026 Small Robot Corp. Source available under the PolyForm Shield License 1.0.0.