Skip to content

Building from Source

phroun edited this page Aug 22, 2026 · 1 revision

Building this repository gives you a display host — the program your applications connect to. Applications are clients and are built separately; see the client pages.

git clone https://github.com/phroun/kittytk
cd kittytk
make

That produces bin/kittytk-tui and bin/kittytk-sdl.


Which build you want

There are two, and they are not two versions of the same thing.

The mew build is the one to use. It is the full experience — the same toolkit with the complete Editor in place of the stock placeholder — and it comes from mew's own distribution, which ships its modified copy of KittyTK. If you are here to use a KittyTK desktop, that is what you want, and this page is not the shortest way to it.

This repository is the mew-free build. Everything here is MIT-licensed and stays that way: mew's licence is more restrictive than the KittyTK base, so this tree deliberately has no mew in its module graph at all. Build from here when you need the toolkit under MIT alone, when you are working on KittyTK itself, or when you are writing a client and only need something to connect to.

The relationship is the familiar one: this repository is the base everyone can build on, and mew is the assembled product most people should run.

-tags mew here does not give you the mew build. The mew-backed editor lives in mew's tree, not this one, so the tag simply removes the placeholder and leaves nothing in its place. The build succeeds and the host comes up with no editor type registered at all — 33 types instead of 34 — and nothing says so. Get the mew build from mew.

Prerequisites

Go 1.25 or newer, and nothing else for the terminal host.

The graphical host binds SDL3 through purego, so no SDL development headers are needed and nothing is linked at build time. The library is opened at run time from the system — or embedded in the binary, if you build standalone.

Targets

make … Builds Notes
(default) both hosts tui and sdl
tui bin/kittytk-tui the terminal host; no dependencies
sdl bin/kittytk-sdl graphical, software renderer
webgpu bin/kittytk-sdl graphical with the WebGPU renderer compiled in
standalone bin/kittytk-sdl graphical with SDL3 embedded
test the suite, across both build tags
clean removes bin/

webgpu replaces the plain sdl binary rather than sitting beside it — the renderer is still chosen at run time, through kittytk.ini or --webgpu / --software. It currently links on macOS and Windows; the Linux link is blocked by an upstream goffi relocation issue, though the packages compile and vet cleanly.

standalone unpacks an embedded SDL3 at startup, so the binary runs on a machine with no SDL installed. purego resolves symbols with dlopen and cannot link statically, so this is self-contained for distribution rather than a true static link, and costs about a megabyte.

Running it

./bin/kittytk-tui

It listens on $KITTYTK_DISPLAY, or on $XDG_RUNTIME_DIR/kittytk/display-0.sock when that is unset — and on tcp://127.0.0.1:9797 on Windows, where AF_UNIX is not dependable. Point a client at the same endpoint and it connects. Transports and Security covers the endpoint forms.

Tests

make test

which is go test ./... followed by go test -tags sdl ./... — both tags, because a good deal of code differs between the two surfaces.

make increment is not for you

It bumps the per-commit build counter in core/version.go, and exists so that number tracks the third component of a release tag. It is part of making an official build, not of building one for yourself.

Running it leaves your tree differing from upstream by a version number for no reason. Leave it alone.

See also

Transports and Security — the endpoint your host listens on · Examples — programs in this repository worth reading · Application · Protocol Overview

Clone this wiki locally