A lightweight cross-platform terminal app based on Alacritty, inspired by Windows Terminal.
More details can be found at wiki
Kazeterm loads kazeterm.toml as the base config and can merge extra TOML files listed in imports.
Imported files have higher priority than the base file, and later imports override earlier ones.
imports = ["~/kazeterm.windows.toml"]Relative import paths are resolved from the file that declares them, and nested imports are supported.
Theme files in assets/themes/*.toml are seed-based. Most UI colors are derived from:
backgroundforegroundaccentborder- ANSI
black..whiteplus optionalbright_*
Kazeterm also supports a small set of optional semantic overrides when the derived defaults are not enough:
cursoroverlayselectionsearch_matchsearch_highlight
Terminal backends are selected through the terminal kernel abstraction:
[terminal]
kernel = "alacritty"Supported values are alacritty (default), ghostty, and vte. Unsupported kernels fail explicitly instead of silently falling back.
Enable the bottom-right shortcut inspector with:
[window]
key_debug_mode = trueMSVC target is required for release build.
dnf install -y \
clang \
llvm \
libxcb-devel \
libxkbcommon-devel \
libxkbcommon-x11-devel
apt install -y \
clang \
llvm \
libxcb1-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev
XCode is needed for metal sdk
xcode-select --switch /Applications/Xcode.app/Contents/Developer
xcodebuild -runFirstLaunch
xcodebuild -downloadComponent MetalToolchain
For debug build, run:
cargo build
For release build, run:
cargo build --release
On Windows, debug symbols are stored in PDB files, and on Linux they are in the binary. To strip symbols from the binary, run:
llvm-objcopy --strip-all ./target/release/kazeterm
Run all unit and integration tests:
cargo test --workspace
Kazeterm's GPUI-based UI is exercised headlessly via gpui's test-support
feature (enabled as a dev-dependency on the kazeterm crate):
- Component tests live next to the components they exercise
(
crates/kazeterm/src/components/*_dialog.rs,search_bar.rs, …) and use#[gpui::test]with a shared helper incrates/kazeterm/src/test_support.rsthat installs a defaultConfig+SettingsStorefor each test window. - Keybinding regression tests in
crates/config/tests/default_keybindings.rslock down the default bindings shipped withKeybindingConfig::default(). - Event-protocol tests in
crates/kazeterm-event-system/tests/json_event_protocol.rsguard the stdin/socket JSON wire format. - Headless terminal tests in
crates/terminal/tests/headless_terminal.rsdrive an in-memoryalacritty_terminal::Termthrough the ANSI parser — no PTY, no child process — and assert on the resulting grid. This is the foundation for behavioural testing of escape-sequence handling. - Snapshot tests in
crates/terminal/tests/snapshot_grid.rsuseinstato snapshot rendered grids for a set of canned ANSI scenarios. Runcargo insta review --workspaceto accept intentional changes; setINSTA_UPDATE=alwayswhen bulk-regenerating. - End-to-end tests in
crates/kazeterm/src/components/main_window_e2e_tests.rsboot a realMainWindowagainst a fake terminal-session factory (terminal::test_support::fake_terminal_session). They verify thatinsert_new_tabwires through to the factory and thatMainWindow.itemsis updated. No child process is ever spawned.
Running just the UI-level tests:
cargo test --package kazeterm --bin kazeterm
cargo test --package config --test default_keybindings
cargo test --package kazeterm-event-system --test json_event_protocol
cargo test --package terminal --test headless_terminal
cargo test --package terminal --test snapshot_grid
cargo test --package terminal --test fake_session
End-to-end tests now boot MainWindow against a fake session factory (see
crates/kazeterm/src/components/main_window_e2e_tests.rs). The only remaining
layer is optional GPU visual snapshots, which are deliberately not shipped
(documented in plan.md under "Still not shipped").
Generate coverage (requires cargo-llvm-cov):
cargo llvm-cov --workspace --all-features --lcov --output-path coverage/lcov.info
This produces coverage/lcov.info.
-
Some code is derived from Zed; this code inherits Zed's GPL-v3 license.
-
The bundled Cascadia Code fonts follow the SIL Open Font License.
-
The bundled lucide icons follows original MIT license.
