A tiny Monkeytype clone for your terminal made by Claude
Shows you a line of words. You type them. Correct characters turn green, mistakes turn red. When you finish, it prints your WPM and accuracy.
- Word list:
words.txtholds ~1000 common English words, one giant space-separated blob. On startup the script reads it and splits it into a list. - Prompt generation:
gen_words(n=25)picksnrandom words from that list and joins them into one string — that's your typing prompt. - Rendering: Uses Python's built-in
curseslibrary to draw text directly to the terminal. Each character in the prompt gets colored based on whether you've typed it yet, and if so, whether it matches:- white = not typed yet
- green = correct
- red = wrong
- Input loop: Reads one keystroke at a time (
get_wch()), updates the "typed" buffer, redraws the screen, and checks for backspace / Esc. - Scoring: Once you've typed the full prompt, WPM is calculated as
(characters typed / 5) / (minutes elapsed)— the standard "5 chars = 1 word" convention — and accuracy is(correct chars / total typed) * 100.
Requires Python 3 (preinstalled on macOS/Linux; on Windows use WSL, since curses isn't native there).
git clone https://github.com/yourusername/typetest-cli.git
cd typetest-cli
python3 typetest.pyMake sure typetest.py and words.txt stay in the same folder — the script loads the word list relative to its own location.
words.txt is just plain text, space- or newline-separated. Add, remove, or swap in your own words and save — no code changes needed.
- Start typing to begin the timer
- Backspace to fix mistakes
Escto quit early
MIT — do whatever you want with it.