A sleek, terminal-based typing speed test built entirely in Bash. Challenge yourself, improve your WPM, and master the keyboard with this minimalist yet powerful typing tutor.
- Real-time Feedback: See your typing accuracy instantly with color-coded characters
- Comprehensive Stats: Track WPM, CPM, accuracy, and more
- Customizable Tests: Adjust the number of words to type
- Error Handling: Optional "stop on error" mode for focused practice
- Backspace Support: Correct mistakes as you go (when enabled)
- Auto-restart: Keep practicing without manual restarts
- Terminal Optimized: Clean, distraction-free interface
DTT displays a random selection of words for you to type. As you type:
- ✅ Green = Correct character
- ❌ Red = Incorrect character
- 🔵 Blue = Current character to type
The script calculates your typing speed and accuracy in real-time, providing detailed statistics upon completion.
-
Clone the repository:
git clone <repository-url> cd dtt
-
Make the script executable:
chmod +x dtt
-
Run the typing test:
./dtt
Customize your typing experience with these environment variables:
# Set number of words (default: 15)
export NUMWORDS=20
# Enable stop-on-error mode (default: 0)
export STOPONERROR=1
# Use custom word list (default: 1000-words.txt)
export WORDSLIST=/path/to/your/words.txtDTT automatically finds word lists in this order:
1000-words.txtin the same directory as the script (portable!)1000-words.txtin the current working directory- System dictionary:
/usr/share/dict/words(fallback)
You can also:
- Provide your own word list via the
WORDSLISTenvironment variable - The script comes with a curated
1000-words.txtfile of common English words
| Key | Action |
|---|---|
| Type | Enter characters |
| Backspace | Delete previous character (when stop-on-error is off) |
| Ctrl+Z | Toggle stop-on-error mode |
| Escape | Exit and restart |
After completing each test, DTT displays:
- WPM: Words Per Minute (raw)
- CPM: Characters Per Minute (raw)
- WPM accurate: Words Per Minute (accounting for errors)
- CPM accurate: Characters Per Minute (accounting for errors)
- Accuracy: Percentage of correct characters
- Correct chars: Number of correct characters typed
- Elapsed time: Total time taken
Toggle with Ctrl+Z during a test:
- Disabled (default): You can backspace to correct mistakes
- Enabled: Must type each character correctly before proceeding
This mode is perfect for building muscle memory and accuracy!
- Bash (tested with Bash 4+)
- Standard Unix utilities:
tput,shuf,grep,tr,awk - Python 3 (for terminal clearing calculations)
- Terminal with color support
$ ./dtt
the quick brown fox jumps over lazy dog
[You type here...]
WPM: 45
CPM: 225
WPM accurate: 42
CPM accurate: 210
Accuracy: 93.33%
Correct chars: 14 / 15
Elapsed: 2.000 seconds- Start slow: Focus on accuracy first, speed will follow
- Use stop-on-error: Build perfect typing habits
- Practice daily: Consistency is key to improvement
- Monitor progress: Track your WPM and accuracy over time
- Proper posture: Sit straight and keep wrists neutral
Found a bug or have a feature idea? Feel free to:
- Open an issue
- Fork the repository
- Create a feature branch
- Submit a pull request
MIT License - feel free to use, modify, and distribute!
Happy typing! 🎹
