| name | typing-trainer |
| description | Browser-based code typing practice with WPM tracking, snippet library, and progress charts. Use when you need to practice typing speed for code, measure WPM on code snippets, track typing progress over time, or build a custom snippet library. Triggers include "typing speed", "WPM", "typing practice", "code typing", or "improve typing". |
typing-trainer
Practice typing code to improve speed and accuracy. Works entirely in the browser. No account needed.
When to use
- Practicing typing speed on real code in your language of choice
- Tracking WPM improvement over time
- Building a custom snippet library for patterns you frequently write
- Setting and tracking daily practice goals
Usage
Open typing-trainer in a browser (run pnpm dev from the project root).
Start a session
- Open the app (defaults to Home page)
- Select a language (JavaScript, Python, Go, Rust, TypeScript, SQL, Bash)
- Select difficulty (Easy, Medium, Hard)
- Click "Start Practice"
- Type the displayed code snippet
- Results show automatically on completion
Keyboard shortcuts
| Key | Action |
|---|
| Any key | Start the timer (first keypress) |
| Backspace | Delete last character |
| Escape | Pause / resume |
| Tab | (disabled - all tabs are spaces in snippets) |
WPM calculation
Net WPM = (correct characters / 5) / minutes * (accuracy / 100)
The timer starts on first keypress and stops when the last character is typed correctly.
Custom snippets
- Go to Snippets -> Add Custom
- Enter a title and select a language
- Paste your code (40-200 characters recommended)
- Click Save
Custom snippets are stored in localStorage. They appear in the library with a "Custom" badge.
Goals
Set daily targets at Goals:
- Sessions per day (default: 5)
- WPM target (default: 80)
- Accuracy target (default: 95%)
Progress resets at midnight. Streak counts consecutive days where the session goal was met.
Environment Variables
| Variable | Default | Description |
|---|
VITE_APP_VERSION | dev | Version string shown in Settings |
Data storage
All data is stored in localStorage under the tt_ prefix:
| Key | Contents |
|---|
tt_sessions | Array of completed sessions (last 1000) |
tt_custom | Array of custom snippets |
tt_goals | Daily goal settings |
tt_settings | User preferences |
Clearing browser data removes all history. Use the Export CSV button in History to back up sessions first.
Troubleshooting
WPM shows 0 after completing a snippet
The timer requires at least one keypress to start. If you paste text instead of typing, the measurement is incorrect. Only keyboard input is measured.
Snippet not advancing on correct key
Check the Settings page - if "Stop on error" is on, you must correct mistakes before continuing. If off, incorrect keys still advance the cursor but count as errors.
Custom snippets disappeared
Custom snippets are stored in localStorage. Clearing your browser's site data for this origin will remove them. Export a backup from the Snippets page before clearing.