ogham/exa

A modern replacement for ‘ls’.

24,388 stars Rust 10 components 14 connections

Modern replacement for 'ls' command with colors, Git status, and enhanced file listing

Command-line arguments flow through options parsing, then filesystem scanning collects file metadata, which gets filtered/sorted before being rendered in the chosen output format

Under the hood, the system uses 3 data pools, 4 control points to manage its runtime behavior.

Structural Verdict

A 10-component cli tool with 14 connections. 55 files analyzed. Highly interconnected — components depend on each other heavily.

How Data Flows Through the System

Command-line arguments flow through options parsing, then filesystem scanning collects file metadata, which gets filtered/sorted before being rendered in the chosen output format

  1. Argument Parsing — Command-line arguments are parsed into Options struct containing all user preferences
  2. Path Resolution — Input paths are resolved and default to current directory if none provided
  3. Git Detection — Git repositories are detected for the input paths to enable Git status features
  4. Directory Scanning — Directories are read and File objects are created with cached metadata
  5. Filtering — Files are filtered based on visibility rules and ignore patterns
  6. Sorting — Filtered files are sorted according to the specified sort field and direction
  7. Rendering — Sorted files are rendered using the chosen view mode (grid, details, tree)
  8. Output — Formatted output is written to stdout with appropriate colors and styling

System Behavior

How the system actually operates at runtime — where data accumulates, what loops, what waits, and what controls what.

Data Pools

GitCache.repos (in-memory)
Cached Git repository information and file statuses to avoid repeated Git operations
Dir.contents (in-memory)
Cached directory file listings to avoid repeated filesystem scans
File metadata cache (in-memory)
Cached file metadata including permissions, timestamps, and extended attributes

Delays & Async Processing

Control Points

Technology Stack

ansi_term (library)
Terminal color and styling support
git2 (library)
Git repository integration and status checking
users (library)
Unix user and group name resolution
datetime (library)
Date and time formatting
glob (library)
Pattern matching for file filtering
libc (library)
System call interface for Unix operations
term_grid (library)
Terminal grid layout rendering
terminal_size (library)
Terminal dimension detection
scoped_threadpool (library)
Parallel processing for large directories

Key Components

Explore the interactive analysis

See the full architecture map, data flow, and code patterns visualization.

Analyze on CodeSea

Related Cli Tool Repositories

Frequently Asked Questions

What is exa used for?

Modern replacement for 'ls' command with colors, Git status, and enhanced file listing ogham/exa is a 10-component cli tool written in Rust. Highly interconnected — components depend on each other heavily. The codebase contains 55 files.

How is exa architected?

exa is organized into 5 architecture layers: CLI Interface, Filesystem Layer, Information Layer, Output Layer, and 1 more. Highly interconnected — components depend on each other heavily. This layered structure enables tight integration between components.

How does data flow through exa?

Data moves through 8 stages: Argument Parsing → Path Resolution → Git Detection → Directory Scanning → Filtering → .... Command-line arguments flow through options parsing, then filesystem scanning collects file metadata, which gets filtered/sorted before being rendered in the chosen output format This pipeline design reflects a complex multi-stage processing system.

What technologies does exa use?

The core stack includes ansi_term (Terminal color and styling support), git2 (Git repository integration and status checking), users (Unix user and group name resolution), datetime (Date and time formatting), glob (Pattern matching for file filtering), libc (System call interface for Unix operations), and 3 more. This broad technology surface reflects a mature project with many integration points.

What system dynamics does exa have?

exa exhibits 3 data pools (GitCache.repos, Dir.contents), 4 control points, 3 delays. These runtime behaviors shape how the system responds to load, failures, and configuration changes.

What design patterns does exa use?

4 design patterns detected: Feature Gates, Caching Strategy, Deduction Pattern, Cross-Platform Abstraction.

Analyzed on March 31, 2026 by CodeSea. Written by .