Skip to content
CAI
Software that uses CAICheck a score

Shopify/cli-ui

62.9

Adequate · 20 September 2026

4.5k

lines of production code

Ruby

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is a Ruby library, now named cli-ui, that provides a comprehensive toolkit for building interactive command-line interfaces. It offers a rewritten suite of terminal UI components, including formatted frames, interactive prompts with filtering, concurrent spinners, and status widgets, all enhanced with modern terminal capabilities like OSC sequences and reline integration. The codebase is strictly typed using Sorbet and RBS, with a development workflow centered around GitHub Actions and standardized linting.

How it got here

2017 — CLI::UI rewrite and modernization

12 changes.

The project underwent a comprehensive rewrite of its terminal UI library, migrating from the legacy Dev::UI namespace to the new CLI::UI module with Sorbet type checking and modern Ruby features. This period involved removing obsolete components, introducing advanced concurrency and prompt capabilities, and updating the development workflow to use GitHub Actions and standardized linting.

2018–2020 — CLI UI widget and styling enhancements

6 changes.

This period focused on expanding the CLI user interface library with new visual components, including a Status widget for task progress and refactored frame styling with box and bracket options. Comprehensive test coverage was added for the interactive prompt handler, spin group functionality, and the new status widget to ensure reliability. The underlying frame system was also improved for thread safety and consistency through the introduction of a centralized style management interface.

2022–2023 — Sorbet typechecking and Tapioca integration

4 changes.

This period focused on establishing a robust typechecking infrastructure by enabling Sorbet with RBS-Inline and the Prism parser. It involved configuring Tapioca for RBI generation, updating type definitions for core dependencies, and adding concurrency support to the CLI UI module.

Features

Add 'box' and 'bracket' frame styles for CLI output

Two new visual frame styles, 'box' and 'bracket', are now available for framing CLI output. The 'box' style renders a full rectangular border using Unicode box-drawing characters (e.g., ┏━━━┓) that spans the terminal width, while the 'bracket' style provides a lighter-weight frame that only draws the left-side prefix characters (┃) without extending horizontal lines across the screen. Both styles support colored text, titles, and dividers, offering users distinct aesthetic options for structuring command-line information.

_lib/cli/ui/frame/frame\style · high confidence

Add ReentrantMutex to CLI::UI module

A new ReentrantMutex class has been added to the CLI::UI module, sourced from the dotboris/reentrant\_mutex library. This allows code within the CLI::UI namespace to safely acquire locks multiple times from the same thread without causing deadlocks, supporting more complex concurrent operations in interactive prompts.

vendor · high confidence

Add Status Widget for CLI progress display

A new Status widget has been added to the CLI UI library, allowing users to display a formatted summary of task states (succeeded, failed, working, pending) with color-coded indicators and glyphs. The widget parses a colon-separated string argument (e.g., "1:23:3:404") and renders a visual representation using symbols like checkmarks, crosses, spinners, and hourglasses, with special handling for empty sets. This provides a standardized way to show real-time or final status updates in the command-line interface.

lib/cli/ui/widgets · high confidence

Initial Tapioca configuration and require setup

Added a new \sorbet/tapioca\ directory containing \config.yml\ and \require.rb\. The configuration file provides default settings for the \gem\ and \dsl\ commands, allowing users to exclude specific gems or generators and adjust worker counts. The \require.rb\ file establishes the necessary runtime dependencies for Tapioca operations, explicitly requiring standard library modules (such as \fileutils\, \open3\, \tempfile\) and internal CLI UI components.

sorbet/tapioca · high confidence

Introduce SpinGroup for concurrent task management with debriefing

Added the SpinGroup class and Async spinner to the CLI UI library, enabling users to run multiple spinner tasks concurrently with configurable limits and automatic debriefing of successes or failures. This new component supports interrupt handling, output capture to stdout or stderr, and provides detailed status information (including elapsed time and exception details) upon completion, replacing the need for manual thread management in complex CLI workflows.

lib/cli/ui/spinner · high confidence

Introduction of CLI::UI module with frame styles and text formatting

The lib/cli/ui.rb file introduces a new CLI::UI module that serves as the central interface for terminal user interface features. This includes support for customizable frame styles via a new FrameStyle interface, text formatting and color resolution, and convenience methods for prompts, printing, and text wrapping. The module also integrates a truncater to prevent overlength output cascades and supports terminal links, enhancing the overall user experience in CLI interactions.

lib/cli · high confidence

Removals

Removal of Dev::UI module and its public API

The \lib/dev/ui.rb\ file has been deleted, removing the \Dev::UI\ module and all its associated autoloads and convenience methods (such as \glyph\, \confirm\, \ask\, \frame\, and \spinner\). This eliminates the previously available high-level interface for terminal UI interactions, colors, and prompts within the \Dev\ namespace.

lib/dev · high confidence

Removal of legacy Dev::UI terminal components

The \lib/dev/ui\ directory has removed its legacy terminal UI implementation files, including \ansi.rb\, \box.rb\, \formatter.rb\, \frame.rb\, \glyph.rb\, \interactive\_prompt.rb\, \progress.rb\, \prompt.rb\, \spinner.rb\, \stdout\_router.rb\, and \terminal.rb\. This change eliminates the previous ANSI-based rendering, spinner, progress bar, and interactive prompt logic from this location.

lib/dev/ui · high confidence

Behavioural changes

Adopts Ruby 3.4, Sorbet type checking, and Shopify RuboCop style guide

The project now targets Ruby 3.4.3 and integrates Sorbet for static type checking, enforced via a new \.rubocop.sorbet.yml\ configuration and \srb\ commands in the development environment. The code style is now governed by the \rubocop-shopify\ gem, replacing the previous remote Shopify style guide URL, and the CI system has migrated from Travis CI to GitHub Actions. These changes update the development workflow to include type checking and standardized linting as part of the default test and style tasks.

(repo-wide) · high confidence

Complete rewrite of CLI::UI with modern Ruby features and enhanced terminal capabilities

The CLI::UI library has been completely rewritten from scratch, introducing a modernized codebase with Sorbet type checking, RBS signatures, and frozen string literals. This update brings several user-facing improvements: better terminal width detection with caching and SIGWINCH support, enhanced prompt interactions using the \reline\ library (replacing \Readline\), new formatting capabilities via the \Formatter\ class with semantic color mappings, and improved progress reporting using OSC sequences for terminals like Ghostty and Windows Terminal. The rewrite also adds new UI components including a \Table\ printer, \Status\ widget, and \SpinGroup\ with work queue support, while fixing various compatibility issues across different operating systems and terminal emulators.

lib/cli/ui · high confidence

Enable Sorbet typechecking with RBS-Inline and Prism parser

Sorbet typechecking is now configured via a dedicated config file, enabling experimental RBS comments and switching the parser to Prism. This change allows the project to use RBS-Inline signatures for type definitions and ensures consistent typechecking behavior across the codebase.

sorbet · high confidence

Interactive prompt now supports multiple selection and filtering

The interactive prompt component has been updated to allow users to select multiple options simultaneously, with support for setting default selections. It also introduces a filtering mechanism (triggered by 'f' or '/') to narrow down long lists of choices, and handles edge cases like blank options and terminal resizing more robustly.

lib/cli/ui/prompt · high confidence

Refactored frame styling and stack management

The CLI UI frame system has been refactored to use a new \FrameStyle\ interface with autoloaded implementations (Box, Bracket) and a centralized lookup mechanism, replacing previous inline style definitions. Additionally, the frame stack is now managed via thread-local variables to ensure thread safety, and stack items are strictly typed to always include a style, improving consistency and error handling for invalid style names.

lib/cli/ui/frame · high confidence

Updated Sorbet RBI type definitions for core gems

The \sorbet/rbi/gems\ directory has been refreshed with new or updated \.rbi\ files for several dependencies, including \ast\, \benchmark\, \byebug\, \erubi\, \json\, \logger\, \minitest\, \mocha\, \netrc\, and \parallel\. These autogenerated files provide Sorbet with current type signatures for the gems, ensuring type checking accuracy. Additionally, a \.gitattributes\ file was added to mark these RBI files as linguist-generated to prevent them from cluttering code statistics.

sorbet/rbi · high confidence

Updated bin scripts for Tapioca gem and console environment

The bin/tapioca binstub has been added to properly load the Tapioca gem via Bundler, replacing the previous custom test runner (bin/testunit) which has been removed. Additionally, the bin/console script now requires 'cli/ui' instead of 'dev/ui' and enforces frozen string literals, aligning the development environment with the project's current module structure and style guidelines.

bin · high confidence

Test coverage

Added tests for SpinGroup functionality; Added tests for the Status widget; Added tests for the interactive prompt options handler; Expanded test coverage for CLI::UI components; Removed obsolete UI test suite; Updated test infrastructure and compatibility fixes.

Dependencies

Migrate to cli-ui gem with Sorbet type-checking and modernized dependencies

The project has been renamed from dev-ui to cli-ui, requiring users to update their gem references. The development environment now enforces Ruby 3.2+ and integrates Sorbet static type-checking via the sorbet-static gem and Tapioca for RBS signature generation. Rubocop configuration has been expanded to include rubocop-shopify, rubocop-sorbet, and rubocop-rake, while test coverage is now handled by SimpleCov. Additionally, the byebug debugger is restricted to MRI platforms to ensure compatibility with JRuby.

(dependencies) · high confidence

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

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 63.

Lenses

  • Code Health 96
  • Architecture 100
  • Maturity 56
  • Readiness 56
  • Security 69

Changes since last survey

  • 300 commits — 277 feature/other, 23 fixes

By area

  • (repo) — 135 commits
  • (root) — 105 commits
  • lib/cli — 53 commits
  • .github/workflows — 2 commits
  • .github/dependabot.yml — 1 commit
  • .github/release.yml — 1 commit
  • sorbet/rbi — 1 commit
  • test/cli — 1 commit
  • test/test_helper.rb — 1 commit

Notable commits

  • fix: Clean LOADED_FEATURES and use require to fix remaining test suite warnings
  • fix: Fix StdoutRouter::Writer#write
  • fix: Fix a miscalculation in the number of req. lines
  • fix: Fix build (#580)
  • fix: Fix compatibility with --enable-frozen-string-literal
  • fix: Fix frames in journald
  • fix: Fix line length calculation for interactive prompt (#613)
  • fix: Fix prompt select current with more than 9 options
  • fix: Fix running spinners inside prompt callbacks
  • fix: Fix type errors
  • fix: Fixes type errors
  • fix: Merge pull request #420 from marianosimone/marianosimone-fix-reentrant
  • fix: Merge pull request #449 from Shopify/fix-journald-frames
  • fix: Merge pull request #541 from fatkodima/fix-spinner-inside-prompt
  • fix: Merge pull request #553 from Shopify/donk/prs/fix-type-errors
  • fix: Merge pull request #590 from Shopify/bostonaholic/fix-colors
  • fix: Merge pull request #593 from trvrnrth/fix-prompt-select-current-with-more-than-9-options
  • fix: Merge pull request #609 from Shopify/feature/ansi-osc8-fix
  • fix: Merge pull request #632 from selviarora/fix/hyperlink-control-characters
  • fix: Rubocop fixes
  • …and 280 more

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

Survey your own repository

Shopify/cli-ui 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 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 30e914221af2218df7452aada72e1b16db2fe5e2 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.