Writing software for Silkie

Silkie is a fork of the kitty terminal emulator. kitty extends the traditional VT/xterm-style terminal protocol with its own graphics, keyboard, and other protocols. Kittens are kitty’s companion tools and plugins; they use terminal capabilities and can add functionality to kitty. Silkie adds further terminal protocols and the show_pointer tool.

Silkie’s behavior is documented in several places: terminal standards, kitty’s manuals, and Silkie’s extension specifications. This guide links to each source and the relevant implementation files.

Source and version

Silkie’s source is on the silkie branch.

Upstream kitty manuals may describe behavior that differs from your Silkie build. The source for your version shows how a feature is implemented. Runtime capability queries tell your application which extensions, versions, and optional features are available.

Getting started

If you are new to kitty, the kitty overview introduces the terminal, and the kitten overview introduces its tools and plugins. The terminal foundations and inherited kitty protocols below cover the standards and protocols that Silkie builds on.

To add a Silkie feature to your application, start with Extension capabilities protocol and OSC 777 extension framing, then choose the protocols you need from the Silkie extension map. Each specification explains how to discover support, use the feature, and clean up afterward, including any platform limits. Test your application in the target terminal and provide a fallback when a feature is unavailable.

For kittens, terminal user interfaces, remote-control clients, and shell integration, see kitten and application APIs. The implementation map points to the relevant code if you want to investigate behavior or contribute a change to Silkie.

Terminal foundations

The compatibility model is a terminal receiving text and control sequences over a byte stream. The following references explain the inherited vocabulary; they are not a claim that Silkie implements every historical terminal feature.

Inherited kitty protocols

The upstream terminal protocol index is the entry point for kitty’s extensions to the traditional terminal protocol. These are inherited references, not Silkie-specific additions.

Upstream specifications

Area

Read upstream

Images and keyboard input

Graphics; keyboard

Text and screen presentation

Underlines; text sizing; multiple cursors; unscrolling

Colors and attributes

Color control; attributes in rectangular areas

Interaction and desktop integration

Pointer shapes; drag and drop; desktop notifications

Data exchange

Clipboard; file transfer

Additional controls

Miscellaneous protocols

Silkie extension map

Each link below opens a Silkie specification with wire formats, replies, and implementation details. The Silkie extension reference also lists them by category.

Silkie specifications and their prerequisites

Area

Silkie specifications

Read alongside

Discovery and common rules

Extension capabilities protocol; OSC 777 extension framing

OSC and ST control-string framing

Input

Tablet pointer protocol; Scroll protocol; Trackpad gesture protocol; Haptic feedback protocol

Shared framing and each protocol’s discovery rules

Vector rendering and ink

Vector images; Terminal-side ink; GPU surfaces (zero-copy)

kitty graphics; tablet input for ink

Color and transparency

HDR brightness protocol; Wide gamut colors; Cell background alpha

SGR, kitty graphics, display information

Image cursors

Image pointer extension

kitty pointer shapes and graphics

Display and timing

Display protocol; Low latency protocol; Frame presentation protocol

Shared framing and the clock/units defined by each protocol

Settings and tools

Silkie configuration; Show pointer; Window actions

kitty configuration, key mappings, and kitten tools

For example, a vector drawing application needs kitty’s graphics protocol for transmission and placement, Silkie’s vector format for its scene, and tablet and ink protocols for pen input and local stroke rendering. The vector specification alone does not define the whole graphics transport.

Kitten and application APIs

Implementation map

The source files below are on the silkie branch.

Source locations

Responsibility

Source

Repository and specification sources

Repository; docs

Terminal sequence parsing and screen behavior

kitty/vt-parser.c; kitty/screen.c

Graphics, vectors, and ink

kitty/graphics.c; kitty/vector.c; kitty/ink.c

Input and platform integration

kitty/mouse.c; glfw

Kitten tools and input inspector

kittens; kittens/show_pointer

Terminal application helpers

tools/tui

Configuration declarations

kitty/options/definition.py

Terminal tests

kitty_tests

Capability discovery and cleanup

Query support before enabling an optional mode, apply a timeout when no reply arrives, and keep a fallback for unsupported features. The OSC 777 capability registry covers its selector family; graphics formats, SGR additions, and other protocols have their own discovery rules in their specifications. Disable modes you enabled when exiting or suspending, as the protocol requires. Account for remote connections and multiplexers: the application’s effective capabilities depend on the whole path to the terminal.