A professional Rubik's Cube speedcubing timer for your terminal.
WCA-compliant scrambles Β· ANSI cube color preview Β· Braille progress charts Β· OLL/PLL trainer Β· Full stats engine
Installation Β· Quick Start Β· Features Β· Screenshots Β· Contributing
Most speedcubing timers live in your browser. CubeCLI lives in your terminal β where it belongs.
- Zero browser required β 100% offline, keyboard-driven, distraction-free
- The only CLI timer with a real-time ANSI color cube preview showing your exact scramble state
- WCA-equivalent scrambles powered by the same engine that drives csTimer
- Data you own β stored locally in SQLite, exportable to CSV/JSON anytime
- Deep analytics β sparklines, braille charts, heatmaps, CFOP split tracking
Requirements: Python 3.11+
pip install cubecliOr install from source (recommended for development):
git clone https://github.com/Axzo001/CubeCLI.git
cd CubeCLI
pip install -e ".[dev]"# Launch the timer (3x3 by default)
cubecli
# Start with a specific puzzle
cubecli --puzzle 2x2
cubecli --puzzle pyraminx
# Open the stats dashboard
cubecli stats
# Open the OLL/PLL trainer
cubecli train --set OLL
# Generate and print scrambles
cubecli scramble --count 10 --puzzle 3x3
# Import from csTimer
cubecli import --from cstimer --file export.json| Feature | Details |
|---|---|
| Stackmat-style input | Hold SPACE β₯ 0.5s β green light β release to start |
| Precision | Microsecond accuracy via time.perf_counter() |
| WCA Inspection | Configurable 15s countdown with audio warnings at 8s and 12s |
| Penalties | +2, DNF, delete, undo delete |
| Multi-phase | CFOP split timing: tap SPACE after Cross β F2L β OLL β PLL |
| BLD mode | Separate Memo + Execution timers |
| Manual entry | Type a time directly with m |
| Feature | Details |
|---|---|
| Library | pyTwistyScrambler β wraps csTimer's JS engine |
| Events | All 17 WCA events: 2x2, 3x3, 4x4, 5x5, 6x6, 7x7, Pyraminx, Megaminx, Skewb, Square-1, Clock, FTO + BLD variants |
| Training | OLL (57), PLL (21), F2L (41), ZBLL subset filters |
| Utilities | Copy to clipboard, view history, batch print |
Real-time ANSI 2D net β the scrambled cube state rendered with colored blocks:
βββββ
β W β β U face (White)
βββββΌββββΌββββ¬ββββ
β O β G β R β B β β L F R B
βββββΌββββΌββββ΄ββββ
β Y β β D face (Yellow)
βββββ
Each sticker is rendered as ββ with WCA-standard ANSI background colors.
- Averages: Mo3, Ao5, Ao12, Ao50, Ao100, Ao1000
- Records: Session best, all-time best per puzzle, best Ao5/Ao12/Ao50/Ao100
- Advanced: Standard deviation, consistency score, sub-X count, PB streaks
- CFOP splits: Average Cross, F2L, OLL, PLL times (with multi-phase mode)
- Sparkline β inline last-12-solves bar chart:
βββββββββ βββ - Full line chart β solve times + Ao5/Ao12 trend overlays (braille-resolution via
textual-plot) - Distribution histogram β solve time bucketing
- Heatmap calendar β GitHub-contribution-style daily solve frequency
- CFOP split bar chart β compare phase averages
- OLL Trainer β all 57 cases with name, ASCII diagram, algorithm
- PLL Trainer β all 21 cases
- F2L Trainer β 41 cases
- Case picker β select specific cases to drill
- Spaced repetition β harder cases appear more often
- Per-case stats β track your average for every case individually
- Storage: SQLite (
~/.cubecli/solves.db) with daily JSON backup - Import: csTimer JSON, TwistyTimer CSV, CubeDesk JSON, NexusTimer
- Export: CSV, JSON
- Sessions: Create, rename, split, merge, delete
| Main Timer | Stats Dashboard |
![]() |
![]() |
| OLL Trainer | Progress Chart |
![]() |
![]() |
| Key | Action |
|---|---|
SPACE |
Hold to ready β release to start/stop |
d |
Mark DNF |
p / + |
Add +2 penalty |
r |
New scramble |
c |
Copy scramble to clipboard |
v |
Toggle cube preview |
Del |
Delete last solve |
z |
Undo delete |
m |
Manual time entry |
n |
Add note to last solve |
s |
Full stats screen |
g |
Full graph screen |
S |
Session manager |
P |
Puzzle picker |
T |
Training mode |
i |
Toggle inspection countdown |
M |
Metronome settings |
e |
Export session to CSV |
I |
Import solves |
? |
Help overlay |
q |
Quit |
CubeCLI/
βββ cubecli/
β βββ core/
β β βββ timer.py # Timer logic, precision timing
β β βββ scramble.py # Scramble generation (pyTwistyScrambler)
β β βββ cube_sim.py # 3x3 Rubik's Cube state simulator
β β βββ stats.py # Statistics engine (Ao5, Ao12, PB, etc.)
β βββ ui/
β β βββ app.py # Main Textual app
β β βββ app.tcss # Global Textual stylesheets
β β βββ screens/
β β β βββ timer_screen.py # Main timer TUI screen
β β β βββ stats_screen.py # Statistics dashboard screen
β β β βββ train_screen.py # OLL/PLL training screen
β β β βββ case_picker.py # Training case picker modal screen
β β βββ widgets/
β β βββ cube_preview.py # ANSI cube net widget
β β βββ timer_display.py # Big digit timer widget
β β βββ scramble_panel.py # Scramble text rendering panel
β β βββ solve_list.py # Solve history list widget
β β βββ stats_panel.py # Stats sidebar widget
β βββ training/
β β βββ trainer.py # Training mode logic (inversion, weights)
β β βββ data/
β β βββ oll.json # 57 OLL cases with algorithms & diagrams
β β βββ pll.json # 21 PLL cases with algorithms & diagrams
β βββ data/
β β βββ db.py # SQLite database interface & CRUD
β β βββ models.py # Solve and Session data models
β βββ config.py # Config loader (~/.cubecli/config.json)
β βββ __init__.py
βββ tests/
β βββ test_timer.py
β βββ test_scramble.py
β βββ test_stats.py
β βββ test_cube_sim.py
β βββ test_package.py
β βββ test_trainer.py
β βββ test_ui.py
βββ assets/
β βββ preview.png
βββ docs/
β βββ FEATURES.md
β βββ KEYBOARD.md
βββ .github/
β βββ ISSUE_TEMPLATE/
β β βββ bug_report.md
β β βββ feature_request.md
β βββ workflows/
β β βββ ci.yml
β βββ PULL_REQUEST_TEMPLATE.md
βββ CHANGELOG.md
βββ CODE_OF_CONDUCT.md
βββ CONTRIBUTING.md
βββ LICENSE
βββ pyproject.toml
βββ README.md
| Component | Library | Why |
|---|---|---|
| TUI Framework | Textual | on_key/on_key_release for hold-to-start, async, modern |
| Styling/Rendering | Rich | Panels, tables, sparklines, markup |
| Scramble Generation | pyTwistyScrambler | csTimer-source, WCA-equivalent, all puzzles |
| Charts | textual-plot | Braille-resolution line/bar charts in TUI |
| Storage | SQLite (stdlib) | Fast queries, no server needed |
| Clipboard | pyperclip | Cross-platform scramble copy |
| Audio (Planned) | beepy | Inspection beeps, metronome |
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
Quick start for contributors:
git clone https://github.com/Axzo001/CubeCLI.git
cd CubeCLI
pip install -e ".[dev]"
pre-commit install
pytest tests/See CONTRIBUTING.md for a detailed guide on:
- Setting up your dev environment
- Code style (Ruff + Black)
- Writing tests
- Submitting pull requests
- Project scaffold & GitHub setup
- Phase 1: Core timer + scrambles + basic stats
- Phase 2: ANSI cube color preview
- Phase 3: Advanced stats + braille charts
- Phase 4: OLL/PLL training mode
- Phase 5: Multi-puzzle + BLD mode + metronome
- Phase 6: Import/export + theme system
- Phase 7: Smart cube Bluetooth (GAN/MoYu)
Track progress on the Projects board.
MIT License β see LICENSE for details.
- pyTwistyScrambler β scramble generation
- csTimer β scramble algorithm source & inspiration
- Textual β the TUI framework that makes this possible
- cubing.js β protocol reference for smart cube integration
- The WCA speedcubing community β€οΈ
β Star this repo if CubeCLI helps your training!