Skip to main content

📊 sort-tui

A high-performance, purely terminal-based educational visualizer for 149 sorting algorithms.

PyPI Version Python Version License: MIT

sort-tui Demo


[!NOTE] sort-tui is built entirely on standard libraries (curses), meaning zero dependencies and instant execution on any POSIX system.

✨ Features

Feature Description
📚 Massive Catalog Over 149 unique sorting algorithms, from QuickSort to Bogosort.
🚀 High Performance O(1) latency frame-by-frame rendering using Python generators.
🎵 Audio Mapping Hear the arrays sort with dynamic PCM audio pitch mapping.
🆚 Comparison Mode Run multiple algorithms side-by-side in split panes.
📊 Benchmarking Headless execution mode for gathering raw computational metrics.
🎨 Rich Visuals 7 different rendering modes (Bars, Dots, Spiral, Circular, etc.).
🧩 Extensible Drop-in community plugin support for custom algorithms.

📦 Installation

Install sort-tui directly from PyPI. A Python 3.10+ environment is required.

pip install sort-tui

[!TIP] For Windows users, curses is not natively supported by cmd. We recommend running sort-tui inside WSL, or manually installing windows-curses (pip install windows-curses).

🚀 Quick Start

Launch an interactive visualization immediately:

# Visualize a standard Bubble Sort
sort-tui --algorithm bubble

# Test TimSort on a nearly sorted array of 100 elements
sort-tui --algorithm timsort --distribution nearly_sorted --size 100

# Compare Quicksort, Merge Sort, and Heapsort side-by-side
sort-tui --compare quicksort merge heapsort

# Run a headless benchmark suite
sort-tui --benchmark bubble insertion quicksort --size 500

⌨️ Interactive Hotkeys

sort-tui is fully interactive during playback.

Key(s) Action Key(s) Action
SPACE Pause / Resume A Toggle Ascending / Descending
→ / ← Step forward / backward 1 frame V Cycle Visualization Mode
Shift+→/← Jump forward / backward 10 frames H Toggle Heatmap Overlay
Ctrl+→ Jump to next swap M Toggle Audio
R Reload with new random array D Cycle Input Distribution
Shift+R Restart exact same array C Toggle Comparison Mode
+ / - Adjust simulation speed S Toggle Stability Tracking
1 - 9 Speed presets (1=slow, 9=fastest) E Export replay as JSON
G Toggle Algorithm Genome panel ? Toggle Help Panel
Q / ESC Quit application

📚 Documentation

Dive deeper into the inner workings, advanced configuration, and data science metrics of sort-tui:

🏗 Tech Stack

Technology Rationale
curses Chosen for its zero-dependency footprint. Ensures instant execution without bloated TUI libraries.
Python Generators Yielding SortFrame objects natively preserves the function call stack and local state for O(1) rewinding.
tomllib Standard library configuration parsing (no external toml or yaml packages required).
argparse Native CLI argument parsing allowing rich help texts and subcommands.

🤝 Contributing & Community

We welcome contributions of all sizes! Whether it's adding a new esoteric sorting algorithm, fixing a bug, or improving the visuals.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for sort-tui 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sort-tui 0.1.7
File Size Uploaded
sort_tui-0.1.7.tar.gz 130.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sort-tui 0.1.7
File Interpreter ABI Platform
sort_tui-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 298.2 kB

Release files / sort_tui-0.1.7.tar.gz

Download URL sort_tui-0.1.7.tar.gz
Size 130.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d0d1f0c3a8c9ebf3ba91960cec877c6e7ac04822c9a307a0be8e017340785ffa
BLAKE2b-256 checksum
How to use checksums
7c412c147bc4921a6690cf306a59550b1f221e1c43b821d1a207904bf9474040
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / sort_tui-0.1.7-py3-none-any.whl

Download URL sort_tui-0.1.7-py3-none-any.whl
Size 168.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e4eec0811ad978b1232613457ddfd98e3da81dee5ccb357c5289ec68ada47c7
BLAKE2b-256 checksum
How to use checksums
c881142a337343e7dcd325449dfda1d4d3cb33d369564cd40ba13b1909f3665b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page