# Tuimark > Tuimark is a view language for terminals: UI as .tui markup, .tcss styles and JSON data, interpreted by a small Go runtime that lays out a cell grid and dumps every frame as JSON for coding agents. Drive it from Go, TypeScript, or any language. Tuimark is a closed vocabulary: structure in `.tui` (XML), style in `.tcss` (a reduced CSS), data as JSON, behavior as named actions. Never invent a tag, attribute or property; the reference pages list every one. The authoring loop is `tuimark validate`, then `tuimark dump --format json` at 80 and 120 columns, then `tuimark play` for interactions. `tuimark agents` prints a full briefing (AGENTS.md) generated from the installed binary, and `tuimark mcp` serves the loop as MCP tools. Install: `brew install --cask abdul-hamid-achik/tap/tuimark`, `go install github.com/abdul-hamid-achik/tuimark/cmd/tuimark@latest`, or `npm i -g @thelacanians/tuimark` (or run `npx @thelacanians/tuimark version`); for a TypeScript project, `bunx @thelacanians/tuimark new my-app --ts`. Every page below is linked as Markdown; drop the `.md` for the HTML page. ## Guide - [Getting started](https://tuimark.dev/guide/getting-started.md): Install the tuimark CLI, write a first document, check it with validate, dump, preview and play, and try it live with tuimark run. - [Use Tuimark with AI agents](https://tuimark.dev/guide/agents.md): How a coding agent such as Claude Code or Cursor builds terminal UIs with Tuimark - the AGENTS.md briefing from tuimark agents, the tuimark mcp server, the validate, dump and play loop, and the rules that keep it on track. - [The .tui language](https://tuimark.dev/guide/language.md): How a Tuimark document is structured, the closed set of tags, common attributes, text, screens and modals, and document versions. - [TCSS](https://tuimark.dev/guide/tcss.md): Tuimark's cell CSS - selectors, specificity, colors and theme tokens, dark, light and auto themes, and @media queries on columns, rows and theme. - [Layout](https://tuimark.dev/guide/layout.md): How Tuimark lays out a frame on an integer cell grid - units, the box model, fr and percent sizing, docks, scrolling, auto-fit and grids. - [Bindings and data](https://tuimark.dev/guide/bindings.md): How Tuimark markup reads a JSON store - {path} interpolation, bind, each, if, truthiness and class:NAME guards - and why it has no expressions. - [Keymap, actions and focus](https://tuimark.dev/guide/interaction.md): How keys, clicks and focus become named actions in Tuimark - the keymap, when selectors over the focus chain, built-in actions, key dispatch, event payloads and the mouse. - [Widgets](https://tuimark.dev/guide/widgets.md): Tuimark's built-in widgets - list, input, button, progress, sparkline, table, tabs, hints and modal - with rendered examples, their events and the keys they take. - [The kit](https://tuimark.dev/guide/kit.md): A copy-paste component kit for Tuimark - design tokens, k- component classes and 21 small documents you copy into your project and own, with a gallery app that shows them all. - [Dumps and tools](https://tuimark.dev/guide/tools.md): The Tuimark dump format and the CLI tools around it - dump, --cells, --styles, play, inspect, validate, preview, fmt, ir - plus the TUIMARK_* environment variables and the session log. - [Running a document](https://tuimark.dev/guide/run.md): tuimark run shows a document live in the terminal with no host program - an event strip, an NDJSON event log, fixed mock writes, and reload on save. - [Go API](https://tuimark.dev/guide/go-api.md): The Tuimark Go package - load a document (from disk or an embedded file system), bind and read data, handle actions, dump frames, test with Play and run in the terminal, with a context, an error policy, timers (Every) and derived values (Derive) since 0.4. - [Testing](https://tuimark.dev/guide/testing.md): Testing Tuimark views with golden dumps and tuimark test, Go tests on Dump, Validate and Play, fixtures for live data, and end-to-end terminal specs with Glyphrun. - [Host protocol](https://tuimark.dev/guide/host-protocol.md): tuimark host (0.3b) - running a Tuimark document in the terminal for a parent process written in any language, over a JSON line protocol on file descriptors 3 and 4. - [TypeScript client](https://tuimark.dev/guide/typescript.md): @thelacanians/tuimark (0.4): drive a Tuimark view from a Bun program. spawnHost starts tuimark host, and the client writes data, reads it back, and answers the actions the document fires. - [MCP server](https://tuimark.dev/guide/mcp.md): tuimark mcp (0.3b) - a Model Context Protocol server that gives a coding agent the validate/dump/play authoring loop as five tools, over stdin/stdout. - [Editors](https://tuimark.dev/guide/editors.md): Editor support for .tui and .tcss (0.4) - the VS Code extension (highlighting, snippets, and the tuimark lsp client) and how to use tuimark lsp from Neovim, Helix, or any other LSP client. ## Reference - [Reference](https://tuimark.dev/reference.md): Exact tables for the Tuimark CLI, tags and attributes, CSS properties, key tokens and diagnostic codes, generated from the runtime. - [CLI](https://tuimark.dev/reference/cli.md): The tuimark command-line interface, its commands, flags and exit codes. - [Tags and attributes](https://tuimark.dev/reference/tags.md): Every Tuimark tag and the exact attributes it accepts, and what older version="1" and version="2" documents leave out. - [CSS properties](https://tuimark.dev/reference/css.md): Every TCSS property Tuimark accepts and the values it takes. - [Key tokens](https://tuimark.dev/reference/keys.md): The key names a Tuimark keymap accepts in keys="…". - [Diagnostic codes](https://tuimark.dev/reference/diagnostics.md): Every diagnostic code Tuimark reports, grouped by the pass that finds it. - [Getting started](https://tuimark.dev/guide/getting-started.md): Install the tuimark CLI, write a first document, check it with validate, dump, preview and play, and try it live with tuimark run. - [Use Tuimark with AI agents](https://tuimark.dev/guide/agents.md): How a coding agent such as Claude Code or Cursor builds terminal UIs with Tuimark - the AGENTS.md briefing from tuimark agents, the tuimark mcp server, the validate, dump and play loop, and the rules that keep it on track. ## Examples - [Examples](https://tuimark.dev/examples.md): Complete Tuimark apps from the repository - six games (Snake, chess, Tetris, Minesweeper, Sudoku, 2048), a CI pipeline runner, a music player, a Pomodoro timer, a container-engine dashboard, a system monitor studio, a live log viewer, a kanban board, a git client, an HTTP client, an inbox, a deploy dashboard, a coding-agent chat, Unicode text and the phase-0 spike - with screenshots rendered from tuimark play. - [Getting started](https://tuimark.dev/guide/getting-started.md): Install the tuimark CLI, write a first document, check it with validate, dump, preview and play, and try it live with tuimark run. - [Widgets](https://tuimark.dev/guide/widgets.md): Tuimark's built-in widgets - list, input, button, progress, sparkline, table, tabs, hints and modal - with rendered examples, their events and the keys they take. - [The kit](https://tuimark.dev/guide/kit.md): A copy-paste component kit for Tuimark - design tokens, k- component classes and 21 small documents you copy into your project and own, with a gallery app that shows them all. - [Go API](https://tuimark.dev/guide/go-api.md): The Tuimark Go package - load a document (from disk or an embedded file system), bind and read data, handle actions, dump frames, test with Play and run in the terminal, with a context, an error policy, timers (Every) and derived values (Derive) since 0.4. ## Blog - [tuimark.dev is live, and Tuimark is on npm](https://tuimark.dev/blog/tuimark-dev-and-npm.md) (2026-10-19): Tuimark has a home at tuimark.dev, and @thelacanians/tuimark puts the tuimark command and the TypeScript client in one npm package. What is on the site, and what the package does when you run it. - [Why terminal UIs as documents](https://tuimark.dev/blog/terminal-uis-as-documents.md) (2026-10-19): Tuimark describes a terminal screen as markup, a stylesheet, and JSON data instead of layout code, and hands every frame back as JSON. Why that split helps people, and why it helps coding agents even more. - [The Tuimark kit: components you copy and own](https://tuimark.dev/blog/the-tuimark-kit.md) (2026-10-19): Twenty-one terminal UI components for Tuimark, from buttons and alerts to a data table, dialogs, and a command palette, as plain documents and two stylesheets you copy into your project. How the kit is built, and the host helpers that come with it. ## Optional - [Everything above in one file](https://tuimark.dev/llms-full.txt): every page of the guide, the reference and the examples, and every post, as Markdown - [Kit components](https://tuimark.dev/kit): every component of the kit, pictured, with its markup - [Source code](https://github.com/abdul-hamid-achik/tuimark): the Go runtime, the CLI, the kit, and the examples - [Changelog](https://github.com/abdul-hamid-achik/tuimark/blob/main/CHANGELOG.md): release history