Skip to main content

📊 sort-tui

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

PyPI Version Python Version License: MIT CI

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
sortui --algorithm bubble

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

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

# Run a headless benchmark suite
sortui --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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sort_tui-0.1.3.tar.gz (130.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sort_tui-0.1.3-py3-none-any.whl (168.2 kB view details)

Uploaded Python 3

File details

Details for the file sort_tui-0.1.3.tar.gz.

File metadata

  • Download URL: sort_tui-0.1.3.tar.gz
  • Upload date:
  • Size: 130.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for sort_tui-0.1.3.tar.gz
Algorithm Hash digest
SHA256 57ccb488f9ef098eedb2efa1eb2bfaf93206dd958f2f7ab68c883636dcd16d68
MD5 3e4b46f045f0eb574537d8340e112a4f
BLAKE2b-256 3529db5ee68a4644d1269c768856e9054cc48e5af9e1872324fbb266788f3fd4

See more details on using hashes here.

Provenance

The following attestation bundles were made for sort_tui-0.1.3.tar.gz:

Publisher: publish.yml on gaminization/sort-tui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sort_tui-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: sort_tui-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 168.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for sort_tui-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 122bf94dab8a7202bfd688e138b9ee546ef9b74d18c299ee3822ae0bf9d1e351
MD5 80cd6f38cdc0e4456e7be629654d01bf
BLAKE2b-256 95ae8daad67202d3190a2eaa74b7020c8a9128a61011d0cb2402bbb0957397b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for sort_tui-0.1.3-py3-none-any.whl:

Publisher: publish.yml on gaminization/sort-tui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page