The Problem
Terminal emulators force a choice: either a feature-rich but slow option like WezTerm, or a fast but bare-bones alternative. For AI coding workflows, that trade-off means either waiting on startup and rendering, or giving up integrated AI assistance, shell integrations, and polished defaults.
What This Does
Kaku is a deeply customized fork of WezTerm, rebuilt in Rust for speed and out-of-the-box usability. It keeps full Lua config compatibility with WezTerm while adding AI-assisted command recovery and natural-language-to-command conversion. The core lives in crates/ (416 Rust files), with a separate GUI layer in kaku-gui/ and shell integration scripts in assets/shell-integration/.
The repo is a portfolio of 11 self-contained projects, not a single codebase. Substantial ones include config/ (Lua config parsing and defaults), termwiz/ (terminal widget library), mux/ (multiplexer), and crates/wezterm-font/ (font rendering with FreeType and HarfBuzz bindings).
How It Is Wired
Execution starts in crates/kaku-relay/src/main.rs:144 (main), which reaches 400 functions and spawns a relay process. The run function in crates/promise/src/spawn.rs:250 reaches 407 functions and is the central execution hub. The AI panel and command injection flow through crates/kaku-remote/src/lib.rs:975 (start).
The most-connected functions carry the widest blast radius: map (called from 221 places), is_empty (157), and Err (137). config/src/keyassignment.rs is the most-imported file (70 callers), defining key bindings and actions. config/src/config.rs handles file and database I/O for settings persistence.
External effects: 41 functions read/write files, 3 touch a database, 11 spawn subprocesses, and 2 call inference models. The traced path main -> run exits via cmd.run for subprocess execution. The module graph shows 8 internal modules with no circular dependencies—clean structure for a fork this size.
How To Use It
Setup: Build from source with make (Makefile present) or cargo build --release (Cargo.toml at root). Dockerfile exists at crates/kaku-relay/Dockerfile for containerized relay deployment.
Configuration: Use WezTerm's Lua config format directly—no migration needed. The config loader is in config/src/lib.rs. AI provider settings (OpenAI, Claude, etc.) are configured via the kaku ai command.
Running it: Launch the kaku binary from kaku/ or install via Homebrew: brew install tw93/tap/kakuku. The README documents macOS DMG installation and first-launch shell setup.
Real-World Use
A developer running a failing build command gets an AI-suggested fix inline. Press Cmd + Shift + E to apply it, or type # deploy to staging and Kaku converts that to the actual command. The relay crate handles remote sessions, and shell integration scripts (zsh, fish) auto-configure prompt, diff, and navigation tools.
Code Health & Issues
Static analysis found 607 findings (264 high, 308 medium, 35 low), all one kind: deep nesting (max depth 8) in assets/macos/Kaku.app/Contents/Resources/kaku.lua, config/derive/src/attr.rs, and config/src/config.rs. Fix: flatten with early returns and extract inner blocks.
SDLC observations from the structure:
- Med - No Dependabot/Renovate across 69 manifests
- Med - Docker base images (
rust:1.85-slim,debian:bookworm-slim) unpinned by digest - Med - No dependency vulnerability scan in CI
- Med - Large binaries in repo (14.4MB
libGLESv2.dylib, 7.6MB test data) - Med -
persist-credentials: falsemissing on checkout in.github/workflows/ci.yml - Med - No non-root
USERin relay Dockerfile - Low - No job timeouts in workflows; missing
.editorconfig,.gitattributes
The Bottom Line
Kaku delivers a genuinely fast, well-integrated terminal with AI features that work out of the box. The WezTerm fork lineage means mature terminal internals with a cleaner, more opinionated surface. The deep nesting and missing dependency hygiene are real but fixable; the architecture is sound for a production tool.