Skip to content

Settings

You do not need to edit the settings file. In the app, Settings (in the header, or Project → Settings… / ⌘, in the desktop app) covers all of it: adding, editing and removing environments, the API token, whether pushing is allowed, extra media, the default environment, whether to use git, commit-before-push and the folders. Allowing a push, or removing an environment, asks you to type its name.

Each change runs the matching command, so a terminal can do the same:

Terminal window
t4 env set test --label "Test" --published https://webtest.example.edu
t4 env set prod --push --require-commit yes # allow pushing to prod
t4 env set test --published "" # empty clears a value
t4 config # show project settings
t4 config set default_environment test
t4 config set use_git yes # off by default
t4 config set require_commit no

Only the marker patterns (component_markers, span_markers) are left to the file: they are regular expressions, for people who would rather write JSON.

t4 init writes only source_dir, mirror_dir and overrides_dir; the rest have defaults and are there when you want them. Nothing here is secret: tokens are kept by t4 token set, never in this file. T4_TOKEN_STORE=file keeps them in .t4/tokens/ as plain owner-only files instead, for a machine where the Keychain is not available.

{
"source_dir": "t4-source",
"mirror_dir": "site-mirror",
"overrides_dir": "overrides",
"default_environment": "test",
"use_git": false,
"require_commit": true,
"component_markers": null,
"span_markers": null,
"environments": {
"test": {
"base": "https://myweb-test.example.edu/terminalfour/rs",
"label": "TEST",
"published_url": "https://webtest.example.edu",
"push_allowed": false,
"require_commit": false,
"language": "en",
"root_section": null
}
}
}
Setting Default What it does
source_dir t4-source Where pulled layout source lands
mirror_dir site-mirror Where t4 mirror saves the published pages
overrides_dir overrides Local-only files that shadow the mirror
default_environment first alphabetically Which environment a command uses without --env
use_git false Whether the project uses git: Commit to git, the commit check before a push, and the local diff. Off, none of them apply
require_commit true With use_git on, whether t4 push refuses uncommitted files. Set per environment to override
component_markers none Extra patterns for the inspector to recognise as component boundaries. See the inspector
span_markers none Extra patterns the preview engine uses to align layout output. See Layout previews
media_ids none Media Library items to pull even though no layout references them, such as the CSV the redirects module reads. Set per environment when the instances’ ids differ
media_categories none Media Library categories to pull in full, such as the one holding a site’s modules. Each subcategory is listed by its own id
Setting Default What it does
base — The CMS Web Services endpoint, ending /terminalfour/rs
label the environment name What t4 status and the panel display
published_url none The site t4 mirror crawls and t4 serve proxies
push_allowed false Whether t4 push may write here at all
require_commit the project setting Whether a push must come from a commit
language en The language segment several API paths require
root_section none Where t4 sections starts walking
media_ids the project setting Media ids for this instance; replaces the project list rather than adding to it
media_categories the project setting Category ids for this instance; replaces the project list rather than adding to it

The two that matter most are deliberately the cautious way round: push_allowed is off until you turn it on, so a production instance cannot be written to by accident, and once git is on, require_commit is on unless you turn it off.

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.