Skip to content

KlixInteractive CLI Framework

Build terminal-first CLI applications with ease

Klix Documentation

Klix is a Python framework for building terminal-first CLI applications with a session model, command routing, middleware, lifecycle events, typed state, and a small UI layer built on top of prompt_toolkit and rich.

This documentation is written against the current implementation in this repository. It explains what Klix can do today, how the pieces fit together, and where the current boundaries are.

If you are new to Klix, use this path:

  1. Read Installation
  2. Work through Getting Started
  3. Build the example in Quickstart
  4. Read Architecture
  5. Use the focused guides in Guides

Documentation Map

Start here

Core concepts

Practical guides

Components

Example walkthroughs

API reference

Project docs

What Klix Gives You

  • A single App object that owns registration and runtime flow
  • Per-session state through Session
  • Slash-command parsing with schema validation
  • Middleware around command execution
  • Lifecycle and input events
  • Rich text rendering and fallback rendering
  • A UI namespace with input widgets and output widgets
  • A basic region-based layout model
  • A scaffold CLI through klix init

What Klix Does Not Try To Be

Klix is not a general terminal emulator and it is not a full-screen TUI framework in the textual sense. The current implementation favors a simple interactive command loop with composable utilities over a heavy runtime model.

That matters when you read the rest of these docs:

  • layout support exists, but redraw behavior is still coarse
  • events exist, but only some are actively emitted by the current runtime
  • persistence exists, but it is intentionally minimal
  • widgets are reusable, but not every one is a complex full-screen experience

Those details are documented explicitly in Architecture, Layout, and FAQ.

Released under the MIT License.