DocumentationGetting started
Start here
Getting started
With cstudy and the toolchains installed, create a workspace, set it up, and take one problem from cstudy next to cstudy done. It takes a few minutes, most of them spent solving the problem.
On this page
Create a workspace
You practise in a workspace: a directory of your own for your solutions, notes and progress, separate from cstudy itself. Create one anywhere:
cstudy init ~/cstudy-workspace --git # --git runs git init; cstudy never commits
cd ~/cstudy-workspacecstudy init copies the practice projects and writes the project files for VS Code and IntelliJ IDEA. It installs nothing yet. It refuses to create a workspace inside another one.
| Path | What it holds |
|---|---|
python/ | The Python project: pyproject.toml, uv.lock and your solutions in practice/ |
typescript/ | The TypeScript project: package.json, tsconfig.json and practice/ |
jvm/ | The Gradle wrapper with the java/ and kotlin/ projects |
go/, rust/ | The Go module and the Cargo package, plus go.work at the root |
projects/ | One folder per project problem you start |
notes/ | Your answers to system design and code review prompts |
problems/ | Problems you write yourself |
.archive/ | Earlier attempts, moved aside by --fresh and by reviews |
.vscode/, .idea/ | Editor project files, yours to edit |
progress.db | Your attempts, reviews and benchmarks, in SQLite; ignored by git |
Run cstudy anywhere inside the workspace. From elsewhere, point at it with cstudy --workspace PATH or the CSTUDY_WORKSPACE environment variable.
Set it up with cstudy doctor
cstudy doctor checks every toolchain and the workspace, and cstudy doctor --fix sets up the projects: it runs uv sync in python/, pnpm install in typescript/, and a first Gradle build in jvm/. Go and Rust need no setup step.
cstudy doctor --fixEach line is ok, WARN (not blocking) or FAIL (blocks practice), with a fix: hint when there is one. Here, the Python project is not set up yet:
$ cstudy doctor
ok python 3.13.2
ok uv 0.10.11
ok node v24.18.0 (type stripping)
ok pnpm 9.15.9
ok java 21.0.2
ok content /home/me/.local/share/uv/tools/coding-study/lib/python3.13/site-packages/coding_study/content (bundled)
ok workspace /home/me/ws (created with cstudy 0.1.0)
FAIL python/.venv missing fix: cstudy doctor --fix
ok runner python answers hello: python 3.13.2, protocol 1
ok runner kotlin answers hello: jvm 21.0.2, protocol 1A missing Node.js, pnpm or JDK shows as FAIL, and a missing Go or Rust as WARN; the other languages still work. Troubleshooting lists the common rows and their fixes.
Your first problem
Pick one
cstudy next suggests what to practise and prints the command that starts it. Or start any problem by its slug; cstudy list browses the catalog.
$ cstudy next
new koko-eating-bananas (medium · binary-search) weakest pattern: binary-search (0.75)
start cstudy start koko-eating-bananas --lang kotlinStart it
cstudy start writes a stub with the right signature into the language’s project, renders the statement to .statements/, and opens both in $VISUAL or $EDITOR. Without --lang it uses your default language, Python unless you change it.
$ cstudy start two-sum --lang kotlin
two-sum · easy · arrays-hashing · kotlin
stub jvm/kotlin/src/main/kotlin/practice/two_sum/Solution.kt
statement .statements/two-sum.md
next cstudy test --watchSolve it in your editor
Open the workspace root in your editor, so its language server finds every project. In VS Code and IntelliJ IDEA every cstudy action is also a task or run configuration; see Editors and debugging.
Test it
cstudy test --watch runs your code against the cases each time you save. Visible cases are always listed. Passing hidden cases collapse into a count; a failing one shows its input, the expected answer and yours.
$ cstudy test --time-limit
two-sum · kotlin · 14 cases (2 visible, 11 hidden, 1 generated) · time limit 5x · timer 12:31 / 25:00
build 1.8s (gradle, warm)
PASS ex1 0.04ms
PASS ex2 0.03ms
FAIL h3 hidden
input nums=[-3, 8, 0, 3] target=0
expected [0, 3] (unordered)
actual [3, 3]
TLE g1 hidden · 412ms > limit 95ms (5x hash-map, calibrated)
PASS 10 hidden cases
12/14 passed · 1 failed · 1 tle · total 2.6sThis run also had a time limit, which is off unless you ask for it with --time-limit: the generated case at the largest size took longer than 5 times the reference solution. The statuses are explained in Practising.
Ask for a hint, if you want one
$ cstudy hint
two-sum · hint 1 of 2
For each value, which partner would complete the sum?Hints are counted: an attempt with a hint can be graded at most ok.
Finish it
Once every case passes, finish the attempt with how it went: easy, ok or hard. If it never passed, finish with --gave-up. cstudy computes a grade and schedules the next review.
$ cstudy done --rating ok
two-sum · kotlin · passed · 18m 40s · rating ok · hints 0
next review 2026-10-27 (in 3 days) · ease 2.50Now compare your code with the reference: cstudy solution two-sum shows the optimal approach with its explanation, and --all shows every approach on the problem’s complexity ladder. When the problem is due again, cstudy next brings it back.
Your workspace is your repository
The workspace holds your practice files, notes, previous attempts and your own problems. Version it in a git repository of your own: its .gitignore already leaves out per-machine state such as progress.db and build output.
Back up your progress with cstudy export, which writes progress-export.json at the workspace root for you to commit. On another machine, clone the workspace, run cstudy doctor --fix, and restore the progress with cstudy import.
Note
cstudy import only fills an empty progress.db; it never merges two histories.
Where to go next
- Practising: the daily loop in detail, reviews, benchmarks, mock interviews and stats.
- Problem kinds and tracks: progressive, concurrent, debugging and project problems.
- Configuration: your default language, time limits and which tracks
cstudy nextpicks from.
Written for cstudy 0.8.0. The specs in the cstudy repository are the source of truth for every detail.