Typing Trainer¶
Visible-string typing practice for commands and code snippets. The trainer displays the exact text on screen — you retype it for muscle memory and syntax familiarity. It repeats until your input matches. Nothing is executed.
Quick Start¶
Or from the repo root:
Practice¶
# All cards, shuffled
python3 trainer.py
# Filter by category (positional — no flag needed)
python3 trainer.py kubectl
python3 trainer.py git,python
# Filter by tag
python3 trainer.py -t k8s-daily
python3 trainer.py -t systemd-debug
# Filter by difficulty (1=easy, 2=medium, 3=hard)
python3 trainer.py -d 1
python3 trainer.py kubectl -d 1,2
# Limit to N cards
python3 trainer.py kubectl -n 10
# Practice missed cards first
python3 trainer.py --review
# In order (no shuffle)
python3 trainer.py --ordered
# Disable color
python3 trainer.py --no-color
Info Commands¶
# List matching cards
python3 trainer.py list
python3 trainer.py list kubectl
python3 trainer.py list -t k8s-debug
# Show categories with counts
python3 trainer.py categories
# Show tags with counts
python3 trainer.py tags
# Full category x difficulty breakdown
python3 trainer.py stats
# Your missed-card history
python3 trainer.py progress
In-Session Commands¶
| Command | Action |
|---|---|
:quit |
End session, show summary |
:skip |
Skip current card, move to next |
:show |
Re-display the target text |
:hint |
Re-display the target text |
How Matching Works¶
- Leading and trailing whitespace is stripped
- Multiple spaces between tokens are collapsed to one
- Otherwise, exact match is required (token order, options, arguments)
- Partial text is not accepted
- On mismatch, the trainer shows where the first difference is
Dataset: cards.tsv¶
A flat TSV file with one typing card per row. Columns:
| Column | Description |
|---|---|
id |
Stable readable identifier |
category |
kubectl, git, linux, python, etc. |
difficulty |
1, 2, or 3 |
text |
The exact text to type |
what_it_does |
One-line purpose |
details |
Brief background or usage context |
source_hint |
Where the card came from |
tags |
Comma-separated tags |
Tags for Workflow-Based Practice¶
Tags enable practice by real usage patterns, not just broad categories:
| Tag family | Examples |
|---|---|
k8s-daily |
Common kubectl commands for daily use |
k8s-debug |
kubectl debugging and troubleshooting |
git-daily |
Everyday git operations |
git-history |
Log, rebase, cherry-pick, show |
systemd-daily |
Service management basics |
systemd-debug |
Dependency trees, properties, journal |
linux-searching |
find, grep, sort, cut, xargs |
linux-network |
ss, curl, dig, ip, lsof |
linux-processes |
ps, pstree, kill |
linux-files |
tar, chmod, chown, head, tail, df, du |
containers-daily |
docker and helm commands |
terraform-daily |
init, plan, apply, state, workspace |
ansible-daily |
playbook, vault, galaxy, ping |
python-basics |
print, variables, loops, functions |
python-collections |
lists, dicts, sets, comprehensions |
python-files |
pathlib, json, csv, subprocess |
python-testing |
pytest, ruff, make test |
Use python3 trainer.py tags to see all available tags with counts.
Adding Cards Manually¶
Edit cards.tsv directly. Use tabs between fields. Keep all content on one line per row (no embedded tabs or newlines in field values).
Repo Command Miner¶
build_commands.py scans the repo for shell commands and optionally Python snippets.
# Show stats on what it finds
python3 build_commands.py --stats
# Include Python snippets
python3 build_commands.py --python --stats
# Write candidates to a file for review
python3 build_commands.py -o candidates.tsv
# Only items appearing 2+ times
python3 build_commands.py --min-count 2 -o candidates.tsv
Review the output and merge useful rows into cards.tsv.
Progress State¶
Missed-card counts are stored in:
$XDG_STATE_HOME/command-typing/progress.tsv(default:~/.local/state/command-typing/progress.tsv)
This file is never committed. Use --review to prioritize cards you've struggled with, or trainer.py progress to see your history.
Categories¶
kubectl, git, systemd, journalctl, linux, docker, helm, terraform, ansible, python, make