Typing Test TUI
Typing Test TUI is a Monkeytype-inspired typing trainer that runs entirely in the terminal. Built with Go, Cobra, Bubble Tea, and Lip Gloss, it delivers responsive layouts, multilingual datasets, and analytics so you can benchmark speed and accuracy without leaving your keyboard.
Project Overview
Typing Test TUI brings the polish of modern web-based typing trainers to the command line. It offers multiple practice modes, rich languages and code corpora, and immediate performance insights. The project emphasizes ergonomic CLI design, quick startup, and the ability to run entirely offline once installed.
Built with Cobra for flag parsing and command ergonomics, the app leans on Bubble Tea for stateful TUI interactions and Lip Gloss for theming. Datasets are stored locally as JSON, enabling rapid customization for personal languages, programming stacks, or team onboarding materials.
The TUI shares the same responsive layout across macOS, Linux, and Windows terminals, making it ideal for daily drills, coding bootcamps, or developer onboarding exercises.
Key Features
Performance Analytics
- Tracks raw WPM, adjusted WPM, accuracy, and error types per session.
- Highlights streaks, mistake density, and pacing for targeted improvement.
- Exports structured JSON logs that open doors for personal dashboards.
Adaptive Practice
- Toggle punctuation, numbers, and session duration with ergonomic flags.
- Quickly swap languages or code corpora using normalized aliases.
- Smart validation catches invalid combinations before the TUI launches.
Practice Modes & Datasets
Quote
Curated quotes and programming aphorisms keep longer-form passages engaging, perfect for accuracy drills.
Words
Fixed word-count sessions with optional punctuation and numbers provide focused sprints to dial in consistency.
Time
Open-ended, duration-based streams simulate live typing tests and capture sustained performance trends.
Language Coverage
Ships with curated datasets for English, Spanish, French, and Simplified Chinese, plus code samples across Go, Rust, JavaScript, and more.
Offline First
All corpora live within the repository. No network calls are required once installed, ensuring consistent performance on flights or secure environments.
Technical Implementation
State Management
Bubble Tea models orchestrate session state, keystroke events, timers, and view rendering. The architecture isolates mode logic inside dedicated packages for maintainability.
Config & Flags
Cobra commands normalize CLI flags, handle validation, and surface actionable error messages before launching the TUI. A shared configuration layer persists defaults across runs.
Rendering Pipeline
Lip Gloss powers color themes, responsive layouts, and focused prompts, while custom components render metrics, progress bars, and result summaries with high contrast.
Usage & Installation
Install via Go
Build from Source
Recommended Workflow
Use make run with ARGS to iterate on new datasets, and run make test plus make lint before contributing.
Performance & Results
20+
Curated code and language datasets
120s
Maximum timed session out of the box
~90 WPM
Personal best sustained over a week of testing
Terminal Walkthrough
Learning Outcomes
Systems Design
Crafted a modular architecture that separates CLI flag parsing, session orchestration, and rendering, improving test coverage and maintainability.
Developer Experience
Focused on instant feedback loops, ergonomic shortcuts, and human-friendly error messages inspired by popular typing platforms.
Community Ready
Documented contribution workflows, dataset extensions, and linting pipelines so others can adopt or fork the tool with minimal ramp-up.
Testing Discipline
Hardened parsing, timing, and metric computations with targeted unit tests to ensure correctness across practice modes.