Skip to main content
ansicode

Dataset — every sequence as JSON / CSV

Every ANSI / VT escape sequence documented on this site, packaged as a single JSON or CSV file. Stable schema; freely usable in tooling, linters, documentation generators, terminal-emulator test suites, and anything else that needs structured metadata about escape codes.

Downloads

Sequences included: 141

Preview — five sample rows

One sequence per major family — SGR, CSI, DEC, OSC — so you can see the byte-form vocabulary before downloading. Click a slug to open the full sequence page; click a download link below to fetch the whole corpus.

slugtitlebytes.canonicalfamilyspec
sgr-resetSGR 0 — Reset / Normal\x1b[0mSGRECMA-48 §8.3.117 (SGR)
cursor-positionCUP — Set cursor position\x1b[row;colHCSIECMA-48 §8.3.21 (CUP)
decstbmDECSTBM — Set Top/Bottom Margins (CSI r)\x1b[T;BrCSIxterm-ctlseqs (DECSTBM, CSI Ps ; Ps r)
osc-titleOSC 0 / 2 — Set window/icon title\x1b]0;TITLE\x07OSCxterm-ctlseqs (OSC 0/1/2)
csi-daDA — Device Attributes (CSI c / CSI > c)\x1b[c (primary DA) \x1b[>c (secondary DA)CSIECMA-48 §8.3.24 (DA) / xterm-ctlseqs

Schema

The JSON file is `{ schema, generatedAt, count, sequences: [...] }`. Each sequence is one object with the following fields:

FieldTypeNote
slugstringstable URL slug at /sequence/<slug>
family"SGR" | "CSI" | "DEC" | "OSC" | "ESC" | "C0"high-level grouping for the index
title.{en,zh}stringhuman-readable title per locale
shortDesc.{en,zh}stringone-sentence summary per locale
bytes.{canonical,octal,eEscape,literal,hex}stringevery common byte-form spelling for search/paste
description.{en,zh}string (markdown-ish)full-page prose description
parameters[]{ name, desc.{en,zh} }optional parameter table rows
specstringcitation to ECMA-48 § / xterm-ctlseqs section
examples[]{ lang: "bash" | "python" | "go" | "javascript" | "c", code }runnable snippet per source language
support{ [terminalId]: "yes" | "partial" | "no" }keys: xterm, linuxconsole, macterm, iterm2, wt, cmd, kitty, alacritty, wezterm, ghostty, gnometerm, konsole, tmux, screen
related[]string (slug)cross-link slugs

Usage

curl
curl -L https://ansicode.eversources.app/dataset.json | jq '.sequences[] | select(.family=="SGR") | .slug'

The dataset is offered as-is. If you use it in a product, a docs site, or a research paper, we appreciate (but do not require) a link back to ansicode.eversources.app.

See also