Crossterm

A pure-Rust, cross-platform terminal manipulation library

Library
Cargo
v0.29.0
4,184stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
79/100Good
Development Activity80
Maintenance72
Community64
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
76/100Good
Architecture82
Code Quality76
Innovation70
Learning Curve75

Crossterm is a pure-Rust library for cross-platform terminal manipulation, covering cursor movement, text styling and colors, raw/alternate screen modes, and keyboard/mouse/resize event handling. It supports UNIX and Windows terminals down to Windows 7 with a single unified API, abstracting away the very different underlying terminal APIs each platform exposes.

Crossterm is one of the most widely depended-upon crates in the Rust TUI ecosystem, serving as the terminal backend for higher-level TUI frameworks like Ratatui, and is used directly by countless CLI tools that need styled output, interactive prompts, or full-screen terminal UIs without shelling out to platform-specific APIs.

What You Get

  • Cursor control: move, hide/show, blink, save/restore position
  • Styled output: 16-color, 256-color (ANSI), and RGB foreground/background colors plus text attributes (bold, italic, underline)
  • Terminal control: raw mode, alternate screen, scroll, resize, clear, and title-setting
  • A unified event system for keyboard, mouse (press/release/drag), and terminal-resize events with modifier key support
  • A command API (queue!/execute! macros) for buffered, flush-controlled output writing
  • Clipboard integration and bracketed-paste event support

Common Use Cases

  • Building full-screen terminal UIs (TUIs) as the low-level backend beneath frameworks like Ratatui
  • Adding cross-platform colored/styled output to CLI tools without shelling out to OS-specific APIs
  • Building interactive terminal applications that need mouse and keyboard event handling (editors, dashboards, games)
  • Writing portable terminal tooling that must behave identically on Windows and UNIX terminals

Under The Hood

Architecture — The crate is organized by terminal concern: src/cursor/, src/style/, src/terminal/, and src/event/ each expose a public module plus platform-specific backend implementations selected at compile time (UNIX ANSI escape-sequence writers vs Windows Console API calls), unified behind a common Command trait (src/command.rs) so callers write one line of code (execute!(stdout, MoveTo(x, y))) regardless of platform. src/tty.rs and src/ansi_support.rs handle detecting whether a stream is a real TTY and whether the terminal actually supports ANSI sequences (relevant on older Windows consoles), falling back accordingly.

Tech Stack — Pure Rust with a deliberately minimal dependency footprint (a stated design goal in the README’s ‘Dependency Justification’ section), using conditional compilation (cfg(windows)/cfg(unix)) rather than separate crates per platform. Feature flags (bracketed-paste, events, windows, derive-more) let consumers opt out of functionality they don’t need to shrink the dependency graph further, similar to other console-rs-family crates.

Code Quality — Roughly 19 source files carry inline #[test]/mod test blocks covering event parsing, cursor/style command construction, and platform-detection logic — reasonable given how much of the remaining logic is platform-specific behavior that’s difficult to unit test outside a real terminal. The crate has a long release history and is depended upon by enough downstream TUI projects (notably Ratatui) that regressions tend to surface quickly through the ecosystem.

API Design — The Command/execute!/queue! macro pair is the core ergonomic device: every terminal action (MoveTo, SetForegroundColor, Clear) implements Command, so execute!(stdout(), MoveTo(0,0), Print("hi")) composes multiple actions into one buffered write without manual escape-sequence construction. This consistency is what makes Crossterm pleasant to build directly on, though full-screen TUI application authors still typically reach for a higher-level framework (Ratatui) built on top rather than using Crossterm’s primitives directly for complex layouts.

Used by 9 apps in this directory

Rust
100%
MIT

abtop

Developer Tools · Monitoring

3,456

Like htop, but for your AI coding agents — monitor Claude Code, Codex CLI, and OpenCode sessions, tokens, context windows, rate limits, and orphan ports all from one terminal screen.

View details
77
Repo Health
79
Technical
80
Dependency
Built with
Rust100%
Updated 3 weeks ago
Rust
54%
Other

Cameleer

AI Agents

23

A local-first desktop workspace for managing AI agents in an enterprise-style workflow — agent directory, Kanban task tracking, workspace chat, and a full runtime/audit log of agent actions and tool approvals.

View details
48
Repo Health
65
Technical
76
Dependency
Built with
Rust54%
JavaScript24%
TypeScript15%
Updated 4 weeks ago
Rust
95%
MIT

claw-code

AI Agents · AI Code Assistants

195,087

A Rust-built CLI agent harness for Claude AI with persistent sessions, MCP tool integration, plugin hooks, and multi-provider support — designed to run autonomous coding workflows without human babysitting.

View details
71
Repo Health
71
Technical
77
Dependency
Built with
Rust95%
Updated 3 days ago
Rust
91%
Apache 2.0

herdr

AI Agents · Developer Tools

30,468

A terminal-native agent multiplexer that runs Claude, Codex, Gemini, and other coding agents side by side in real, persistent panes you can detach from and reattach to from anywhere.

View details
83
Repo Health
84
Technical
76
Dependency
Built with
Rust91%
Updated today
Rust
41%
Other

Hook0

Devops

1,477

Open-source Webhooks-as-a-Service: deliver events to your users with auto-retry, signed payloads, and a real-time subscriber dashboard — all without building the infrastructure yourself.

View details
83
Repo Health
82
Technical
70
Dependency
Built with
Rust41%
TypeScript17%
JavaScript15%
Updated today
Rust
72%
Apache 2.0

mesh-llm

AI Development · AI Agents

3,258

Mesh LLM pools GPUs and memory across every machine you own into one OpenAI-compatible API, so agents tap distributed compute instead of a single GPU box or a metered cloud bill.

View details
83
Repo Health
91
Technical
70
Dependency
Built with
Rust72%
TypeScript16%
Updated today
Python
74%
AGPL 3.0

OpenViking

Databases · AI Development

29,711

An open-source context database that gives AI agents a unified filesystem for memory, resources, and skills with hierarchical tiered retrieval.

View details
84
Repo Health
75
Technical
65
Dependency
Built with
Python74%
Rust14%
Updated today
Python
55%
Other

PostHog

Analytics · Monitoring · Developer Tools

37,777

The all-in-one open source product platform combining analytics, session replay, feature flags, error tracking, AI observability, and a built-in data warehouse in a single self-hostable stack.

View details
92
Repo Health
80
Technical
67
Dependency
Built with
Python55%
TypeScript36%
Updated today
Rust
77%
AGPL 3.0

Spacedrive

File Storage · Collaboration

38,790

One file manager for all your devices and clouds — powered by a Virtual Distributed File System built in Rust.

View details
60
Repo Health
84
Technical
65
Dependency
Built with
Rust77%
TypeScript20%
Updated 3 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search