Writing & reading text

KooperType kt

A text file viewer for the terminal, in the spirit of the DOS-era t.com, that formats Markdown and JSON and never changes your files.

Runs
In a terminal
Platforms
Linux, macOS, Windows, FreeBSD
Built with
Go, tcell, Chroma
Latest release
v1.0.0, 5 December 2026
Licence
Apache 2.0

Overview

Back in the DOS days, a tiny program called t.com was the quickest way to look at a text file. KooperType (kt) is that idea for today's terminal, with the white-on-blue look of KooperEdit. It shows line numbers, formats Markdown and JSON, colours JavaScript and TypeScript, and copies to the clipboard.

Most importantly, it never changes the files it shows. It's a viewer, so you can open anything with it without worrying.

Usage
kt                    # pick a file from a list
kt notes.md           # view a file
kt ~/projects         # pick a file from that folder
kt -json data.txt     # treat a file as JSON
kt +120 main.ts       # start at line 120
git diff | kt -       # view standard input

Esc goes back to where you came from. A file named on the command line closes the program; a file picked from the list goes back to the list, where Esc quits. q or F10 always quits. F1 lists the keys; from there N shows what's new and A the version and build details.

For black and white instead of colours, start with kt -bw (or set NO_COLOR), or press m in the viewer.

Download

KooperType 1.0.0 — First Release · v1.0.0 · released 5 December 2026 · release notes · all releases

Unpack the archive and put kt (kt.exe on Windows) somewhere on your PATH. SHA256SUMS has the checksum of every file: sha256sum -c SHA256SUMS --ignore-missing (shasum -a 256 -c on macOS).

The binaries aren't signed, so macOS may refuse to open one downloaded with a browser: allow it under System Settings → Privacy & Security, or run xattr -d com.apple.quarantine kt. On Windows, SmartScreen may ask you to choose More info → Run anyway.

With Go
go install github.com/colboycolinmeeks/koopertype/cmd/kt@latest

Screenshots

The file as it is

File types

KooperType picks a view from the file's extension, and a switch on the command line overrides it (before or after the file name, and for files picked from the list too).

SwitchExtensionsWhat you see
-md, -markdownmd markdown mdown mkdHeadings, lists, tables, quotes, coloured code blocks
-jsonjson jsonc jsonl ndjson geojson webmanifestRe-indented and coloured. Key order and numbers are kept as written
-js, -javascriptjs mjs cjs jsxColoured as JavaScript; layout unchanged
-ts, -typescriptts mts cts tsxColoured as TypeScript; layout unchanged
-txt, -text, -plaineverything elseThe text as it is
  • Tab switches between the formatted view and the file exactly as it is.
  • JSON that doesn't parse (comments, mistakes) keeps its own layout and colour, and the message at the bottom says which line is at fault.
  • In Markdown the line numbers are those of the source file; formatted JSON is numbered as displayed.

Reading, finding and copying

KeysAction
↑ ↓ ← → PgUp PgDn Home End, wheelScroll
g, Ctrl-GGo to line
/, Ctrl-F, F7Find. Case only matters if you type a capital
n / N, F3Next / previous match
drag, double-click, triple-clickSelect characters, a word, a line
Shift+arrowsSelect with the keyboard
v / VMark characters / whole lines, for terminals that keep Shift+arrows
a, Ctrl-ASelect everything
c, Ctrl-C, right-clickCopy the selection
Tab, F2Formatted view / file as it is
w / lWrap long lines / line numbers
mColours or black and white
o, BackspaceOpen another file
r, F5Reload

Copying uses pbcopy, wl-copy, xclip, xsel or clip.exe, whichever your system has. Over SSH, or if none is there, it asks the terminal to do it (OSC 52), so copying works on a remote machine too.

The file list

Run kt on its own, or on a folder, to pick a file. Type to filter, ← or Backspace goes up, ~ goes home, / goes to the root and . shows hidden files.

Big files and odd encodings

  • UTF-8, UTF-16 and 8-bit files all display correctly.
  • LF, CRLF and old Mac CR line endings all work.
  • Files up to 512 MB open. JavaScript and TypeScript colouring stops at 1 MB to keep things quick.
  • kt - reads standard input, so you can pipe anything into it: git diff | kt -.

Adding a file type

File types live in one list. Each entry's ID becomes a command-line switch and its extensions are recognised automatically. For any language the Chroma highlighter knows, one line is all it takes:

internal/format/format.go
{ID: "py", Name: "Python", Aliases: []string{"python"}, Exts: []string{"py"}, render: code("python")},

Building from source

make                  # builds ./bin/kt
make install          # copies kt to /usr/local/bin (PREFIX=~/.local for your home dir)
make check            # everything CI runs
make help             # every build target

Release builds are made for Linux, macOS, Windows and FreeBSD.