How kovidgoyal/kitty works
kitty is a GPU-based terminal application with a Python application layer, native terminal and windowing code, and a suite of companion “kittens.” The principal workflow is launch, configure and create a session, run child processes, interpret their terminal output, and render the resulting screen. The tree also shows separate workflows for remote control and file, text, and terminal utilities. The README excerpt only identifies the product, and sampled sources are incomplete; the graph therefore omits uncertain internal call wiring rather than implying a complete call map.
Main entry points: runner.py Kitten runner · child.py Child process · boss.py Application controller · main.py Application startup
Components 25
Startup and configuration
- Native launcher
kitty/launcher/main.c - Application startup
kitty/main.py - Options and config
kitty/options/parse.py - Session setup
kitty/session.py
Terminal runtime
- Application controller
kitty/boss.py - Tabs and layouts
kitty/tabs.py - Terminal window
kitty/window.py - Child process
kitty/child.py - Child monitoring
kitty/child-monitor.c - VT parser
kitty/vt-parser.c - Screen state
kitty/screen.c
Rendering and input
- Graphics rendering
kitty/graphics.c - Font rendering
kitty/fonts.c - Window and input
glfw/window.c - GPU display
kitty/gl.c
Control and integration
- Remote control
kitty/remote_control.py - Command client
tools/cmd/at/main.go
Kitten utilities
- Kitten runner
kittens/runner.py - File chooser
kittens/choose_files/main.go - Command palette
kittens/command_palette/main.go - File and image diff
kittens/diff/main.py - SSH integration
kittens/ssh/main.go - File transfer
kittens/transfer/main.go
Other components
- Terminal user
- External programs
Connections 26
- Terminal user → Native launcher: starts
- Native launcher → Application startup: starts Python
- Application startup → Options and config: loads settings
- Application startup → Session setup: creates sessions
- Session setup → Application controller: configures runtime
- Application controller → Tabs and layouts
- Tabs and layouts → Terminal window
- Terminal window → Child process: runs process
- Child monitoring → Child process: monitors
- Child process → VT parser: writes terminal data
- VT parser → Screen state: updates screen
- Screen state → Graphics rendering: provides screen state
- Font rendering → Graphics rendering: provides glyphs
- Graphics rendering → GPU display: renders
- Window and input → Application controller: delivers input
- Terminal user → Kitten runner: invokes utility
- Kitten runner → File chooser: dispatches
- Kitten runner → Command palette: dispatches
- Kitten runner → File and image diff: dispatches
- Kitten runner → SSH integration: dispatches
- Kitten runner → File transfer: dispatches
- Terminal user → Command client: issues command
- Command client → Remote control: sends request
- Remote control → Application controller: controls runtime
- SSH integration → External programs: runs SSH
- Child process → External programs: executes program