burgee

Gallery

Every component and every registered plugin, rendered by running them — the static projection beside the animation, in all five modes.

Generated by npm run gallery:page from what flagstaff has registered. Do not edit by hand.

Every cell on this page is produced by running the component, through the same hoist() a program uses and the same code path as flagstaff check — not by describing it. Escapes are shown as ␛, carriage returns as ␍ and newlines as ⏎, so what a terminal would swallow is visible.

The five modes

One component, five answers. The tty row is the animation; every other row is the static projection, and it is the artifact — what a pipe, a CI log, an agent and a screen reader all read. Notice that no other row contains an escape sequence.

spinner

The running glyph and the text, then the settled glyph — never a frame.

modewhat it writes
tty␛[?25l␛[?2026h⠋ building␛[?2026l␛[?2026h␛[1G␛[0J⠙ building␛[?2026l␛[?2026h␛[1G␛[0J⠹ building␛[?2026l␛[?2026h␛[1G␛[0J⠸ building␛[?2026l␛[?2026h␛[1G␛[0J✔ built␛[?2026l⏎ ␛[?25h
pipe… building⏎ ✔ built⏎
ci… building⏎ ✔ built⏎
json{"event":"spinner","state":{"text":"building"}}⏎ {"event":"spinner","state":{"text":"built","status":"ok"}}⏎
accessible… building⏎ ✔ built⏎

progress

The count and the percentage; a bar of blocks says nothing in a log.

modewhat it writes
tty␛[?25l␛[?2026h█████░░░░░░░ 12/30 files␛[?2026l␛[?2026h␛[1G␛[0J30/30 files · 100%␛[?2026l⏎ ␛[?25h
pipe12/30 files · 40%⏎ 30/30 files · 100%⏎
ci12/30 files · 40%⏎ 30/30 files · 100%⏎
json{"event":"progress","state":{"done":12,"total":30,"label":"files"}}⏎ {"event":"progress","state":{"done":30,"total":30,"label":"files"}}⏎
accessible12/30 files · 40%⏎ 30/30 files · 100%⏎

tasks

Only what has settled, so a pipe is not told twice that a step is running.

modewhat it writes
tty␛[?25l␛[?2026h✔ install⏎ ⠋ build␛[?2026l␛[?2026h␛[1G␛[0J⠙ build␛[?2026l␛[?2026h␛[1G␛[0J⠹ build␛[?2026l␛[?2026h␛[1G␛[0J⠸ build␛[?2026l␛[?2026h␛[1G␛[0J✔ build␛[?2026l⏎ ␛[?25h
pipe✔ install⏎ ✔ build⏎
ci✔ install⏎ ✔ build⏎
json{"event":"tasks","state":{"tasks":[{"title":"install","status":"ok"},{"title":"build","status":"running"}]}}⏎ {"event":"tasks","state":{"tasks":[{"title":"install","status":"ok"},{"title":"build","status":"ok"}]}}⏎
accessible✔ install⏎ ✔ build⏎

box

The title and the text; a border is noise a screen reader reads character by character.

modewhat it writes
tty␛[?25l␛[?2026h╭─ dev ──────────────────────────╮⏎ │ starting │⏎ ╰────────────────────────────────╯␛[?2026l␛[?2026h␛[1G␛[2A␛[0Jdev: ready on :3000␛[?2026l⏎ ␛[?25h
pipedev: starting⏎ dev: ready on :3000⏎
cidev: starting⏎ dev: ready on :3000⏎
json{"event":"box","state":{"text":"starting","title":"dev"}}⏎ {"event":"box","state":{"text":"ready on :3000","title":"dev"}}⏎
accessibledev: starting⏎ dev: ready on :3000⏎

table

One line per row of header-and-value pairs, parseable without knowing the drawing.

modewhat it writes
tty␛[?25l␛[?2026h┌──────┬───────┐⏎ │ host │ tests │⏎ ├──────┼───────┤⏎ │ ora │ 99 │⏎ └──────┴───────┘␛[?2026l␛[?2026h␛[1G␛[4A␛[2Khost: ora, tests: 99␛[1G␛[1B␛[0Jhost: log-update, tests: 99␛[?2026l⏎ ␛[?25h
pipehost: ora, tests: 99⏎ host: log-update, tests: 99⏎
cihost: ora, tests: 99⏎ host: log-update, tests: 99⏎
json{"event":"table","state":{"rows":[["ora","99"]]}}⏎ {"event":"table","state":{"rows":[["ora","99"],["log-update","99"]]}}⏎
accessiblehost: ora, tests: 99⏎ host: log-update, tests: 99⏎

A whole screen, in five modes

controlroom's reference dashboard, examples/dashboard — four tabs, a checklist with progress, a log tail and a status line that collapses, in the shape of PostHog's setup wizard — run to the end in every mode over a manual clock. The tty screens are its bytes replayed onto a terminal grid; every other block is what it wrote, escapes shown as ␛. Off a terminal no pane is hidden behind a tab, and the tab bar and the key hints, which only mean something to a person at a keyboard, are not printed.

tty

The screen a terminal shows, 80 × 24: mid-run on the Status tab, with the second step running,

[Status] · Tail logs · Visualizer · HN
Progress: 1/4 completed
The wizard installs the SDK   ◼ Detect the framework
and checks the first event.   ▷ Install the SDK
                              ◻ Write the config
                              ◻ Check the setup

















←→ switch tab  s toggle status  q/^C quit

and after →, on the Tail logs tab:

Status · [Tail logs] · Visualizer · HN
Progress: 1/4 completed
◆ Detect the framework
┊ found package.json
┊ framework: next
◆ Install the SDK
┊ npm install posthog-js
┊ added 1 package















←→ switch tab  s toggle status  q/^C quit

pipe

Status
Progress: 0/4 completed
Learn
The wizard installs the SDK
and checks the first event.
Tasks

Log

HN
Your own tab: put your app’s content here.
◆ Detect the framework
┊ found package.json
┊ framework: next
◼ Detect the framework
◆ Install the SDK
┊ npm install posthog-js
┊ added 1 package
Progress: 1/4 completed
◼ Install the SDK
◆ Write the config
┊ wrote posthog.config.js
Progress: 2/4 completed
◼ Write the config
◆ Check the setup
┊ sent a test event
┊ event received
Progress: 3/4 completed
◼ Check the setup
Progress: 4/4 completed
Done: Progress: 4/4 completed

ci

Status
Progress: 0/4 completed
Learn
The wizard installs the SDK
and checks the first event.
Tasks

Log

HN
Your own tab: put your app’s content here.
◆ Detect the framework
┊ found package.json
┊ framework: next
◼ Detect the framework
◆ Install the SDK
┊ npm install posthog-js
┊ added 1 package
Progress: 1/4 completed
◼ Install the SDK
◆ Write the config
┊ wrote posthog.config.js
Progress: 2/4 completed
◼ Write the config
◆ Check the setup
┊ sent a test event
┊ event received
Progress: 3/4 completed
◼ Check the setup
Progress: 4/4 completed
Done: Progress: 4/4 completed

json

{"event":"status","state":"Progress: 0/4 completed"}
{"event":"learn","state":"The wizard installs the SDK\nand checks the first event."}
{"event":"tasks","state":{"tasks":[{"title":"Detect the framework","status":"pending"},{"title":"Install the SDK","status":"pending"},{"title":"Write the config","status":"pending"},{"title":"Check the setup","status":"pending"}]}}
{"event":"log","state":{"lines":[]}}
{"event":"hn","state":"Your own tab: put your app’s content here."}
{"event":"tasks","state":{"tasks":[{"title":"Detect the framework","status":"running"},{"title":"Install the SDK","status":"pending"},{"title":"Write the config","status":"pending"},{"title":"Check the setup","status":"pending"}]}}
{"event":"log","state":{"lines":[{"step":"Detect the framework"},"found package.json","framework: next"]}}
{"event":"status","state":"Progress: 0/4 completed"}
{"event":"tasks","state":{"tasks":[{"title":"Detect the framework","status":"ok"},{"title":"Install the SDK","status":"running"},{"title":"Write the config","status":"pending"},{"title":"Check the setup","status":"pending"}]}}
{"event":"log","state":{"lines":[{"step":"Detect the framework"},"found package.json","framework: next",{"step":"Install the SDK"},"npm install posthog-js","added 1 package"]}}
{"event":"status","state":"Progress: 1/4 completed"}
{"event":"tasks","state":{"tasks":[{"title":"Detect the framework","status":"ok"},{"title":"Install the SDK","status":"ok"},{"title":"Write the config","status":"running"},{"title":"Check the setup","status":"pending"}]}}
{"event":"log","state":{"lines":[{"step":"Detect the framework"},"found package.json","framework: next",{"step":"Install the SDK"},"npm install posthog-js","added 1 package",{"step":"Write the config"},"wrote posthog.config.js"]}}
{"event":"status","state":"Progress: 2/4 completed"}
{"event":"tasks","state":{"tasks":[{"title":"Detect the framework","status":"ok"},{"title":"Install the SDK","status":"ok"},{"title":"Write the config","status":"ok"},{"title":"Check the setup","status":"running"}]}}
{"event":"log","state":{"lines":[{"step":"Detect the framework"},"found package.json","framework: next",{"step":"Install the SDK"},"npm install posthog-js","added 1 package",{"step":"Write the config"},"wrote posthog.config.js",{"step":"Check the setup"},"sent a test event","event received"]}}
{"event":"status","state":"Progress: 3/4 completed"}
{"event":"tasks","state":{"tasks":[{"title":"Detect the framework","status":"ok"},{"title":"Install the SDK","status":"ok"},{"title":"Write the config","status":"ok"},{"title":"Check the setup","status":"ok"}]}}
{"event":"log","state":{"lines":[{"step":"Detect the framework"},"found package.json","framework: next",{"step":"Install the SDK"},"npm install posthog-js","added 1 package",{"step":"Write the config"},"wrote posthog.config.js",{"step":"Check the setup"},"sent a test event","event received"]}}
{"event":"status","state":"Progress: 4/4 completed"}
{"event":"commit","state":"Done: Progress: 4/4 completed"}
{"event":"status","state":"Progress: 4/4 completed"}
{"event":"learn","state":"The wizard installs the SDK\nand checks the first event."}
{"event":"tasks","state":{"tasks":[{"title":"Detect the framework","status":"ok"},{"title":"Install the SDK","status":"ok"},{"title":"Write the config","status":"ok"},{"title":"Check the setup","status":"ok"}]}}
{"event":"log","state":{"lines":[{"step":"Detect the framework"},"found package.json","framework: next",{"step":"Install the SDK"},"npm install posthog-js","added 1 package",{"step":"Write the config"},"wrote posthog.config.js",{"step":"Check the setup"},"sent a test event","event received"]}}
{"event":"hn","state":"Your own tab: put your app’s content here."}

accessible

Status
Progress: 0/4 completed
Learn
The wizard installs the SDK
and checks the first event.
Tasks

Log

HN
Your own tab: put your app’s content here.
◆ Detect the framework
┊ found package.json
┊ framework: next
◼ Detect the framework
◆ Install the SDK
┊ npm install posthog-js
┊ added 1 package
Progress: 1/4 completed
◼ Install the SDK
◆ Write the config
┊ wrote posthog.config.js
Progress: 2/4 completed
◼ Write the config
◆ Check the setup
┊ sent a test event
┊ event received
Progress: 3/4 completed
◼ Check the setup
Progress: 4/4 completed
Done: Progress: 4/4 completed

Spinner styles

What the registry holds right now. static is what every mode but tty prints; a style without one is refused at register().

stylestaticframesinterval
dots…⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧80 ms
line…- \ | /130 ms

Two, because two is what the package ships. The corpus everyone already has is one line away and is not bundled — fromCliSpinners(cliSpinners) adds 88 more (dots2, dots3, dots4, dots5, dots6, dots7, …), each with … as its static projection unless you say otherwise:

import cliSpinners from 'cli-spinners';
import { fromCliSpinners } from 'flagstaff/import';
import { register } from 'flagstaff/plugin';

register(fromCliSpinners(cliSpinners));

Borders

Drawn by box(), from the same registry. fromCliBoxes(cliBoxes) adds the rest of that corpus the same way.

round
╭────────────────────────────────╮
│ box('…', { border: 'round' })  │
╰────────────────────────────────╯
single
┌────────────────────────────────┐
│ box('…', { border: 'single' }) │
└────────────────────────────────┘
double
╔════════════════════════════════╗
║ box('…', { border: 'double' }) ║
╚════════════════════════════════╝
bold
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ box('…', { border: 'bold' })   ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
classic
+--------------------------------+
| box('…', { border: 'classic'   |
| })                             |
+--------------------------------+
none
 box('…', { border: 'none' })     

Writing one of your own

A plugin is one plain object, validated against schema.json — the same file that ships in the tarball:

export default {
  name: 'pulse',
  contract: 1,
  spinners: {
    pulse: { frames: ['◜', '◝', '◞', '◟'], interval: 90, static: '…' },
  },
};
npx flagstaff check ./pulse.mjs

check prints exactly the table at the top of this page for whatever you wrote, and exits 1 with the code and a fix if the schema refuses it. Leave the static off and it says so:

E_NO_STATIC_PROJECTION: pulse has no static projection
  fix: give it a `static`: the text a pipe, an agent or a screen reader gets instead of the animation

On this page