📊 sort-tui
A high-performance, purely terminal-based educational visualizer for 149 sorting algorithms.
[!NOTE]
sort-tuiis 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,
cursesis not natively supported bycmd. We recommend runningsort-tuiinside WSL, or manually installingwindows-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:
- Algorithm Contract & Architecture
- Performance Benchmarks
- Advanced Features (Replay, Audio, Fingerprinting)
- Configuration & Profiles
- Plugin Guide (Write your own sorts!)
🏗 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.
- Please read our Contributing Guidelines to get started.
- Check out the Roadmap to see where the project is heading.
- Review our Code of Conduct.
📄 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sort_tui-0.1.6.tar.gz.
File metadata
- Download URL: sort_tui-0.1.6.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e44fbcd667c2d3ba986a8469e56cb534dc53079638efcf1258f7f78c84c56f6
|
|
| MD5 |
4c1f2939caf46603c7ac21c806df8bf1
|
|
| BLAKE2b-256 |
277d394c1579635f8895c790b84935b9694cb27a9bdceb1f4fae7cc0579d787f
|
Provenance
The following attestation bundles were made for sort_tui-0.1.6.tar.gz:
Publisher:
publish.yml on gaminization/sort-tui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sort_tui-0.1.6.tar.gz -
Subject digest:
3e44fbcd667c2d3ba986a8469e56cb534dc53079638efcf1258f7f78c84c56f6 - Sigstore transparency entry: 2219224299
- Sigstore integration time:
-
Permalink:
gaminization/sort-tui@804759689926ec51df3428afda773bd7399551d2 -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/gaminization
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@804759689926ec51df3428afda773bd7399551d2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sort_tui-0.1.6-py3-none-any.whl.
File metadata
- Download URL: sort_tui-0.1.6-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e48396f83838cc82dea921e9bc3e5c38fb0e9f457a367ce1379a1e0564de5c5
|
|
| MD5 |
152cbce74524ec560be37e8f917a59dc
|
|
| BLAKE2b-256 |
51ae52cf2562a63095d5be51bd50a477ce9df8223e19a47eb503322f08db3e0d
|
Provenance
The following attestation bundles were made for sort_tui-0.1.6-py3-none-any.whl:
Publisher:
publish.yml on gaminization/sort-tui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sort_tui-0.1.6-py3-none-any.whl -
Subject digest:
4e48396f83838cc82dea921e9bc3e5c38fb0e9f457a367ce1379a1e0564de5c5 - Sigstore transparency entry: 2219224330
- Sigstore integration time:
-
Permalink:
gaminization/sort-tui@804759689926ec51df3428afda773bd7399551d2 -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/gaminization
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@804759689926ec51df3428afda773bd7399551d2 -
Trigger Event:
push
-
Statement type: