Skip to content
CAI
Software that uses CAICheck a score

Textualize/textual

54.0

Adequate · 14 November 2026

77.9k

lines of production code

Python

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Textual is a Python framework for building terminal-based user interfaces, providing a comprehensive set of widgets, layouts, and styling capabilities. It features a modern CSS-like engine for design, syntax highlighting via tree-sitter, and robust support for reactive state and asynchronous workflows. The system includes extensive tooling for development, testing, and documentation, ensuring reliable and performant terminal applications.

How it got here

2021 — Core architecture and CSS engine rewrite

10 changes.

This period focused on establishing the foundational architecture of the Textual framework, marked by a complete rewrite of the CSS parsing and styling engine to support modern features like variables and nested rules. Significant performance improvements were achieved through lazy-loading of widgets, while a new layout system and comprehensive test suite were introduced to ensure stability and extensibility.

2022–2024 — renderables, testing, and syntax highlighting

28 changes.

This period focused on expanding the visual toolkit with new renderable components like bars and gradients, while significantly enhancing the TextArea widget with wrapping-aware navigation and syntax highlighting for 15 languages. A massive effort was dedicated to stabilizing the codebase through comprehensive unit and snapshot testing across nearly all widgets and core subsystems.

Features

Add demo app and ANSI theme support

Users can now run a built-in demo application by executing \python -m textual\, which launches the DemoApp and displays a sponsorship message upon exit. Additionally, the framework introduces a new ANSI theme system via \textual.\_ansi\_theme\, providing default color palettes (Monokai and Alabaster) that can be used for terminal styling and syntax highlighting.

src/textual · high confidence

Added internal tools for generating easing test data and widget documentation

This change introduces two new helper scripts in the tools directory to support development workflows. The first, gen\_easings\_tests.ts, implements standard easing function formulas (such as sine, cubic, and bounce) to generate test data points for validating easing implementations. The second, widget\_documentation.py, is a Python utility that iterates through the textual widgets to print scaffolding tables for BINDINGS and COMPONENT\_CLASSES, aiding in the creation of widget documentation.

tools · high confidence

New Textual demo application with interactive screens and GitHub star tracking

The demo application has been replaced with a new structure featuring a main entry point and four distinct screens: Home, Widgets, Projects, and Game. The Home screen now includes a live GitHub star counter for the Textual repository (using httpx) and a feature to view the source code of the current page. The Projects screen displays a curated list of Textual projects with their GitHub star counts, which are now fetched via a dedicated updater script and cached in a local data file. The Widgets screen provides an interactive showcase of built-in components like buttons, data tables, and inputs, while the overall app supports mode switching and widget maximization.

src/textual/demo · high confidence

New and updated example applications

The examples directory now includes a comprehensive set of demonstration applications, including a calculator, a 5x5 puzzle game, a code browser, a dictionary lookup tool, a markdown viewer, a clock, a JSON tree viewer, a sidebar animation demo, a splash screen, a theme sandbox, and an LLM chat interface. These examples showcase core Textual features such as reactive state, CSS styling, widget composition, key bindings, and async workflows.

examples · high confidence

New layout system with Grid, Horizontal, Vertical, and Stream layouts

The application now supports a new layout engine with four distinct layout types: Grid, Horizontal, Vertical, and Stream. Users can now arrange widgets in a grid structure with configurable columns, rows, and gaps, or use the new Horizontal and Vertical layouts for linear arrangements. A new Stream layout is also available, optimized for performance with long lists of widgets, such as chat interfaces, by simplifying layout calculations. These layouts are registered in a factory and can be selected via CSS or programmatic configuration.

src/textual/layouts · high confidence

New renderable components for bars, gradients, sparklines, and opacity

The \src/textual/renderables\ module now exposes a suite of new visual primitives: \Bar\ for horizontal progress indicators with optional gradients and clickable ranges, \Sparkline\ for compact data visualization with configurable height and summary functions, \Digits\ for rendering numbers in a 3x3 unicode font, and \Gradient\ classes (\VerticalGradient\, \LinearGradient\) for smooth color transitions. Additionally, \TextOpacity\ allows blending foreground text into the background with adjustable opacity, \Tint\ applies a color overlay to renderables, \BackgroundScreen\ tints the entire screen background, \Blank\ renders a solid color background, \Styled\ enables layering pre- and post-styles, and \\_blend\colors\ provides the underlying color mixing logic. These are exported via the \\\init\\_.py\ module.

src/textual/renderables · high confidence

New syntax highlighting support for Bash, CSS, Go, HTML, Java, JavaScript, JSON, Markdown, Python, Regex, Rust, SQL, TOML, XML, and YAML

The Text editor now provides syntax highlighting for 15 additional programming and markup languages. This change adds specific tree-sitter highlight query files (\.scm\) for Bash, CSS, Go, HTML, Java, JavaScript, JSON, Markdown, Python, Regex, Rust, SQL, TOML, XML, and YAML to the \src/textual/tree-sitter/highlights\ directory. Users will see these languages correctly colored and structured in the TextArea component, improving code readability and editing experience for these popular formats.

src/textual/tree-sitter · high confidence

Repository initialization and documentation overhaul

The repository has been initialized with a comprehensive documentation structure, including a detailed CHANGELOG, CONTRIBUTING guide, and Makefile for build and test automation. The project branding has been updated from 'rich.tui' to 'Textual', with a new README featuring badges, installation instructions, and examples. Configuration files for pre-commit hooks, coverage, and MkDocs have been added to standardize development workflows.

(repo-wide) · high confidence

Behavioural changes

3783 commits (624 fixes) modifying python

A change to existing behaviour in python — 3783 commits (624 fixs), 53 files.

python · medium confidence · unverified

Complete rewrite of the CSS parsing and styling engine

The CSS subsystem has been completely rewritten to support a modern, robust styling system. This change introduces support for HSL and HSLA color formats, CSS variables (with token-based substitution), and nested CSS rules. It adds new pseudo-classes including :first-child, :last-child, and :hover, and implements a 'did you mean' suggestion system to help users correct typos in property names. Error handling is significantly improved with structured, tree-based help text that provides context and examples when styles are invalid. The engine now supports granular spacing, border styles, and specific layout properties like dock and keyline, while also enforcing stricter parsing rules such as requiring semi-colons.

src/textual/css · high confidence

Lazy-loading of built-in widgets to reduce startup time

The \textual.widgets\ package now lazy-loads its built-in widgets (such as Button, Checkbox, Header, Footer, Markdown, etc.) on first access instead of importing them all at module load time. This change significantly reduces the initial import overhead and application startup time, as widget modules are only loaded when they are actually used. The public API remains unchanged; widgets are still imported from \textual.widgets\ as before, but the underlying implementation now uses a \\_\getattr\\_\ hook to defer imports and cache the loaded classes.

src/textual/widgets · high confidence

Refactored driver architecture with platform-specific input and background output

The driver subsystem has been restructured to improve modularity and reliability. Input reading is now handled by dedicated, platform-specific \InputReader\ classes (\\_input\_reader\_linux.py\ and \\_input\_reader\_windows.py\) that manage stdin polling, while a new \WriterThread\ component handles stdout output in a background daemon thread to prevent blocking the main event loop. This change introduces distinct driver implementations for Linux (\LinuxDriver\), Windows (\WindowsDriver\), Web (\WebDriver\), Inline (\LinuxInlineDriver\), and Headless modes, each encapsulating the specific terminal control sequences and event handling logic required for their environment.

src/textual/drivers · high confidence

Wrapping-aware cursor navigation and document view

The document module now supports visual wrapping, introducing a WrappedDocument view that splits long lines into wrapped sections and a DocumentNavigator that handles cursor movement (Home, End, Up, Down, Page Up/Down) based on these visual lines rather than raw document lines. This ensures that vertical navigation stays within the same visual column when possible and that Home/End keys respect smart-home behavior and tab widths within the wrapped context.

src/textual/document · high confidence

Test coverage

Added comprehensive test suite for TextArea widget; Added comprehensive tests for Select widget behavior; Added regression tests for ListView edge cases; Added render utility for reproducible testing; Added test coverage for animation levels; Added test coverage for layout behaviors; Added tests for DirectoryTree path changes and show\_root initialization; Added tests for Document, WrappedDocument, and DocumentNavigator; Added tests for command palette behavior and integration; Added tests for footer key binding behavior; Added tests for renderable components; Added tests for the notification system; Added tests for the suggester component; Added tests for worker decorator and manager; Added unit tests for Checkbox, RadioButton, and RadioSet widgets; Added unit tests for OptionList widget; Added unit tests for SelectionList widget behavior; Added unit tests for Tree and DirectoryTree widgets; Expanded snapshot test coverage for UI components and layout behaviors; Expanded test coverage for CSS parsing, nesting, and reloading; Expanded test coverage for Input widget interactions; Initial snapshot testing infrastructure and widget coverage; Initial test suite for Textual core components.

Dependencies

Textual 8.2.8 release with updated dependencies

This update releases Textual version 8.2.8 and refreshes the dependency lockfile. The project now requires Python 3.9 or higher and pins Rich to version 14.2.0 or newer. Development dependencies have been updated, including Black to 24.4.2, Mypy to 1.0.0 or newer, and Pytest to 8.3.1 or newer. The lockfile also introduces newer versions of core libraries such as aiohttp (3.13.1) and anyio (4.11.0) for the development environment.

(dependencies) · high confidence

Housekeeping

Added developer reference documentation

A new README file has been added to the reference directory to serve as a placeholder for private developer documentation.

reference · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 50 → 54 (+3.8)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 78 → 77 (-1.0)
  • Architecture 84 → 98 (+13.8)
  • Maturity 55 → 59 (+4.2)
  • Readiness 76 → 75 (-1.3)
  • Security 30 → 36 (+5.8)
  • Performance 85 → 85 (+0.0)

Resolved (7)

  • Duplicated block (12 lines × 2) (docs/examples/styles/grid_columns.py)
  • Duplicated block (7–15 lines × 2) (src/textual/design.py)
  • Duplicated block (9 lines × 2) (src/textual/widgets/_tabs.py)
  • Duplicated block (9–10 lines × 2) (src/textual/widgets/_markdown.py)
  • Medium CVE: [GHSA redacted] (poetry.lock)
  • Off-boarding risk: anonymized user #1
  • Projects may be oversized for their cohesion

New (57)

  • Edited copies of one member (3 members, 16+ corresponding lines) (src/textual/validation.py)
  • Edited copies of one member (3 members, 9+ corresponding lines) (src/textual/command.py)
  • Edited copies of one member (4 members, 11+ corresponding lines) (src/textual/widget.py)
  • Edited copies of one member (4 members, 3+ corresponding lines) (docs/examples/tutorial/stopwatch.py)
  • Edited copies of one member (5 members, 20+ corresponding lines) (src/textual/css/_styles_builder.py)
  • Edited copy of a member (10 corresponding lines) (docs/examples/guide/widgets/fizzbuzz01.py)
  • Edited copy of a member (10 corresponding lines) (src/textual/reactive.py)
  • Edited copy of a member (10 corresponding lines) (src/textual/widgets/_directory_tree.py)
  • Edited copy of a member (11 corresponding lines) (src/textual/css/_styles_builder.py)
  • Edited copy of a member (12 corresponding lines) (docs/examples/styles/height_comparison.py)
  • Edited copy of a member (12 corresponding lines) (src/textual/app.py)
  • Edited copy of a member (12 corresponding lines) (src/textual/css/_styles_builder.py)
  • Edited copy of a member (12 corresponding lines) (src/textual/widgets/_tabbed_content.py)
  • Edited copy of a member (13 corresponding lines) (src/textual/cache.py)
  • Edited copy of a member (14 corresponding lines) (src/textual/events.py)
  • Edited copy of a member (14 corresponding lines) (src/textual/widgets/_directory_tree.py)
  • Edited copy of a member (15 corresponding lines) (src/textual/widgets/_content_switcher.py)
  • Edited copy of a member (16 corresponding lines) (src/textual/dom.py)
  • Edited copy of a member (16 corresponding lines) (src/textual/drivers/linux_driver.py)
  • Edited copy of a member (16 corresponding lines) (src/textual/drivers/linux_driver.py)
  • …and 37 more

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

Textualize/textual was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 5e5b7ef58b8c5572c13a3ff9027d756623661495 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-36d4cd83012f.