Thanks for your interest in contributing. Here's what you need to know.
git clone https://github.com/adxdits/zigtui.git
cd zigtui
zig build testYou'll need Zig 0.15.0 or later.
zig build run-dashboard
zig build run-kitty
zig build run-themesTry running these before and after your changes to make sure nothing breaks.
src/
lib.zig # Public API re-exports
backend/ # Terminal I/O (ANSI + Windows Console API)
events/ # Input event types
graphics/ # Kitty graphics protocol, BMP loading, Unicode fallback
layout/ # Layout primitives
render/ # Buffer, Cell, Rect
style/ # Colors, modifiers, themes
terminal/ # Terminal state management and drawing
widgets/ # Block, Paragraph, List, Gauge, Table
examples/
dashboard.zig # System monitor demo
kitty_graphics.zig # Image rendering demo
themes_demo.zig # Theme preview
- Fork the repo and create a branch off
main. - Make your changes. Keep commits focused one logical change per commit.
- Run
zig build testand make sure the examples still work. - Open a pull request.
- Follow the existing patterns in the codebase.
- No hidden allocations all allocators are passed explicitly.
- Keep doc comments short and factual. Describe what, not why it's amazing.
- Use
snake_casefor functions and variables,PascalCasefor types (standard Zig conventions).
Widgets live in src/widgets/. To add one:
- Create a new file in
src/widgets/(e.g.,sparkline.zig). - Define a struct with the widget's config fields.
- Add a
render(self, area: Rect, buf: *Buffer) voidmethod. - Re-export it from
src/widgets/mod.zig. - Optionally add an example or extend the dashboard demo.
Look at src/widgets/gauge.zig for a minimal example.
Themes are defined in src/style/themes.zig. Each theme is a Theme struct with named colors. Copy an existing one and adjust the palette.
Open an issue with:
- What you expected to happen
- What actually happened
- Your OS, terminal emulator, and Zig version
By contributing, you agree that your contributions will be licensed under the MIT license.