Terminal practice tool for building muscle memory and fluency with the syntax and idioms of a programming language. Drill methods, work through progressively harder exercises, and resume mid-session.
npx fluency-drill
or install globally with your package manager of choice:
npm i -g fluency-drill # or: pnpm add -g fluency-drill
fluency-drill
Requires Node.js ≥ 18. The Python curricula additionally need python3
on your PATH; the data-science / research curricula optionally need
numpy, pandas, scipy, or matplotlib for their exercises (the
drills work without them).
For each language, the game exposes a list of fluency entries — one per method, idiom, or quirk. For each entry you can:
-
Drill — type the entry's canonical syntax and 2–7 common variations, 10× per variation by default (5× in "quick" mode). Matching is fuzzy: whitespace, quote style, and trailing semicolons are normalized. Each variation shows an input and the resulting output, so you're not typing in the dark.
-
Exercises — a worked example, then progressively harder problems that end at "real-world repo usage". Your code is sandboxed, run, and compared to the expected output.
-
Both — drill, then exercises, in one go.
Progress saves per-curriculum after every successful rep. :quit
mid-drill and resume from the same variation + rep number next session.
Out of the box:
-
JavaScript — arrays, strings, objects, Map/Set, promises, JSON, quirks (sort default,
==vs===, closure capture, …), interview syntax drills (counter idioms, set-visited, grid init, bit tricks, binary search building blocks). -
Python — iterables / comprehensions, strings (f-strings), dicts, sequence slicing,
collections(Counter / defaultdict / deque),itertools,functools,pathlib,datetime,json,asyncio.gather, quirks (mutable defaults,isvs==, late-binding closures, …), interview syntax drills (Counter, set, grid init,bisect,heapq). -
Python · Data Science —
numpyarray basics;pandasDataFrame basics (filtering, new columns). -
Python · Data Engineering — stdlib
csv(Reader / DictWriter); stdlibsqlite3(parameterized queries, executemany, group-by). -
Python · Research —
scipy.stats/scipy.optimize;matplotlib.pyplot.
The menu detects missing prerequisites and gracefully skips exercises that need an uninstalled library (drills always work).
In drill:
:showpeek the target syntax for the current variation:skipmove on to the next variation:quitexit (state is saved — resume next session)
In exercises:
:hintshow the entry's hint, if any:solvereveal the expected output and move on:skipskip this exercise:quitexit
In menus:
Rreset all progress for the current languagex(submenu) reset progress for one methodLswitch language
Each language is one file in src/curriculum/. Drop a file and add an
import in src/curriculum/index.js — the menu auto-detects. See
CLAUDE.md for the full data shape and the requires schema for gating
exercises behind installable prerequisites.
MIT