Every table on this page is generated from the library on each build: keys, types, defaults and descriptions from
src/config/types.ts and src/tty/types.ts, and the mode each key works in from the validator itself. The guides
show these keys in use; start with Web apps or
Terminal apps.
A config file (showcase.config.ts, .mts, .mjs or .js) exports its config as the default export, usually
through defineConfig, which only adds type checking and editor completion:
target.mode decides the kind of config. 'url' and 'cdp' capture a web page (web in the tables below);
'tty' runs a terminal app (tty). A key marked web only or tty only works in that kind alone; an
unmarked key works in both.
- frame.padding: must be an integer >= 0, got "72"
Unknown keys are errors, so a typo such as viewPort is not silently ignored. The message lists the keys
that object accepts (config stands for the top level).
A key of the other mode gets its own message, such as
config.viewport: not used in tty mode (the image size comes from ...). The full list is in
Keys in the wrong mode.
Relative paths resolve against the config file’s directory, or against root when you set it (root itself
is relative to the config file’s directory). That covers the outputs paths, outputs.portfolio.dir and
gallery, target.cwd, hero.logo and the terminal.font files.
Path templates only take the tokens listed in Path templates, and must contain the ones
that keep files apart.
From code, resolveConfig(object, rootDir) runs the same checks on a config object: see the
programmatic API.
Extra environment. A function gets the language, for apps that take their locale from an env var.
inheritEnv
boolean | string[]
true
Which of your environment variables the app inherits. true: all but CI and terminal hints. false or []: only what the platform needs to start a program (PATH; on Windows also PATHEXT, SystemRoot, ComSpec). An array of names: those as well.
cols
number
120
Terminal width in columns, 10 to 500.
rows
number
32
Terminal height in rows, 5 to 200.
quitKey
string | false
'q'
Key sent to quit before the process tree is killed, parsed like keys. false just kills.
inputDelayMs
number
300
Grace after ready, before setup and the first key, for apps that enter raw mode after drawing, in milliseconds.
readyTimeoutMs
number
30000
How long to wait for the ready text, in milliseconds.
A string starting with / (but not //) or http(s):// is visited as a URL. In url mode a path resolves under the target URL's path (/docs/ with https://x.io/app/ visits https://x.io/app/docs/); in cdp mode it resolves against the captured page's origin.
Any other string is a selector to click.
{ click } and { goto } say which one explicitly.
A function receives the page and does whatever it needs.
Form
Meaning
string
A selector to click, or a path or URL to visit, told apart as above.
window: title bar with traffic lights. minimal: thin bar. none: just the rounded screenshot. browser: a browser toolbar with the address in its address bar (url and cdp mode). windows: a Windows title bar, the title on the left and the caption buttons on the right. terminal: a terminal emulator's bar, a tab with the title in a monospace font; in tty mode it takes the terminal's background, so bar and screen read as one.
theme
'light' | 'dark'
'dark'
Title bar colors.
title
string | false
'{name}'
Title bar text. Tokens: {name}, {title}, {id}, {lang}. false hides it.
address
string
'{url}'
Address bar text for style: 'browser'. Tokens: {url}, {name}, {title}, {id}, {lang}. {url} is the page the shot visits without http:// or https://: the target url, resolved with the shot's nav when that is a path or URL. In cdp mode the page is not known when framing, so write the text without {url}.
Where each kind of file is written, relative to the config root.
Key
Type
Default
Meaning
raw
string
'showcase-out/raw/{lang}/{id}.png'
Raw capture path (PNG). Tokens: {lang}, {id}, {slug}.
readme
string | false
'assets/showcase/{lang}/{id}.webp'
Framed README image path (.webp or .png). Tokens: {lang}, {id}, {slug}. false skips the README images, for configs that only export a portfolio (which renders from the raw captures).
The timeline, run once the app is ready and setup has run.
fps
number
10
Frames per second, 1 to 50.
durationMs
number
60000
Upper bound on the clip length in milliseconds.
maxFrames
number
300
Upper bound on the frames, counted after unchanged frames merge (like RecordedClip.frames). Each distinct frame stays in memory until the clip is encoded. When a recording reaches it, the kit warns, stops recording and writes the frames so far.
tailMs
number
1500
How long to keep recording after the last step, in milliseconds.
What the validator accepts in each templated key. A path with an unknown token, a missing required token or the
wrong ending is an error. {id} is required so shots do not overwrite each other, and so is {lang} once langs
has more than one language.