DocumentationInstallation

Start here

Installation

Install the cstudy command, then the toolchains of the languages you want to practise. uv and Python are required; everything else depends on your languages.

On this page
  1. Install cstudy
  2. What you need
  3. Python and uv
  4. Node.js and pnpm
  5. JDK 21, for Java and Kotlin
  6. Go
  7. Rust
  8. git
  9. Check everything

Install cstudy

Install cstudy once; the problems, tracks and runners ship with it. With Homebrew:

shell
brew install bkuberek/tap/cstudy
cstudy --version

Homebrew also installs the Python that cstudy runs on. Upgrade with brew upgrade cstudy. Homebrew 7 asks you to trust a third-party tap before commands such as brew info cstudy read it: run brew trust bkuberek/tap once. Installing by the full name, as above, works on a fresh machine without it.

Or install with uv or pipx, from the repository:

shell
uv tool install git+https://github.com/bkuberek/coding-study
# or: pipx install git+https://github.com/bkuberek/coding-study

Upgrade those with uv tool upgrade coding-study or pipx upgrade coding-study. Keep one install: when several exist, the cstudy whose directory comes first on PATH runs, and which -a cstudy lists them.

What you need

cstudy builds and runs your solutions with the real toolchain of each language, and you install those yourself: neither Homebrew nor uv pulls them in. You need only the toolchains of the languages you practise.

Toolchains and the versions cstudy doctor accepts
ToolchainVersion cstudy doctor acceptsNeeded for
uv and Pythonuv, any version (0.10 or newer recommended); Python 3.13Required
Node.js and pnpmNode 24 or newer; any pnpm (9 or newer recommended)TypeScript
JDK 21Exactly major version 21Java and Kotlin
GoGo 1.24 or newer; Delve for --debugOptional: --lang go
Rustrustc 1.80 or newer and cargo, through rustup; LLDB’s debug server for --debugOptional: --lang rust
gitAnyOptional: versioning your workspace

cstudy doctor reports a missing Node.js, pnpm or JDK as FAIL even when you do not use that language. Go and Rust are optional, so a missing or old one is a WARN, and so are their debuggers, which only cstudy test --debug needs.

Python and uv

uv installs Python 3.13 and manages the workspace’s Python project. Install uv with its standalone installer, or with Homebrew on macOS:

shell
curl -LsSf https://astral.sh/uv/install.sh | sh   # macOS and Linux
brew install uv                                  # macOS, alternative

cstudy looks for Python 3.13 with uv python find 3.13, which also finds interpreters on your PATH, such as the one Homebrew installs with cstudy. If it finds none, install one through uv, then check both:

shell
uv python install 3.13
uv --version            # uv 0.10.0 or newer
uv python find 3.13     # prints the path of a Python 3.13 interpreter

The Python project also lists debugpy for cstudy test --debug; cstudy doctor --fix installs it with the rest of the project.

Node.js and pnpm

The TypeScript runner runs your .ts files directly with Node’s type stripping, which needs Node 24 or newer. pnpm installs the workspace’s TypeScript project. The recommended setup is fnm for Node and Corepack, which ships with Node 24, for pnpm.

  1. Install fnm:
    shell
    brew install fnm                                  # macOS
    curl -fsSL https://fnm.vercel.app/install | bash  # Linux
  2. Load fnm in your shell by adding this line to ~/.zshrc (for bash, use --shell bash in ~/.bashrc), then open a new terminal:
    shell
    eval "$(fnm env --use-on-cd --shell zsh)"
  3. Install Node 24, make it the default, and enable pnpm. If corepack is not found, run npm install --global corepack first.
    shell
    fnm install 24
    fnm default 24
    corepack enable pnpm
check
node --version   # v24.0.0 or newer
pnpm --version   # 9.0.0 or newer

nvm (nvm install 24) works as well as fnm, and on macOS brew install node pnpm installs both without a version manager.

JDK 21, for Java and Kotlin

The Java and Kotlin projects build with Gradle against Java 21, and cstudy doctor requires java -version to report major version 21: JDK 17 and JDK 25 both fail. The vendor does not matter. SDKMAN! with Eclipse Temurin is the recommended install on macOS and Linux.

  1. Install SDKMAN, then open a new terminal:
    shell
    curl -s "https://get.sdkman.io" | bash
  2. List the Java builds and pick a Temurin 21 identifier: the line ending in -tem whose version starts with 21.
    shell
    sdk list java
  3. Install it and make it the default. Use the identifier from your list; the one below is an example.
    shell
    sdk install java 21.0.13.0+9-tem
    sdk default java 21.0.13.0+9-tem
    java -version   # openjdk version "21.0.13" ...

Pick 21 explicitly

A plain sdk install java installs the newest release, 25 or later, which cstudy doctor rejects.

Nothing else is needed for Java or Kotlin:

  • Gradle: each workspace ships the Gradle wrapper (jvm/gradlew), which downloads its own Gradle on first use. A missing system Gradle is only a WARN.
  • Kotlin: Gradle downloads the Kotlin compiler with the build, so kotlinc is not required.

Alternatives to SDKMAN: on macOS, brew install openjdk@21 and follow its caveats to put it on PATH; on Debian and Ubuntu, sudo apt install openjdk-21-jdk; on Fedora, sudo dnf install java-21-openjdk-devel.

Go

Go is optional: only --lang go builds with it. The workspace’s Go project needs Go 1.24 or newer. Install it with Homebrew on macOS, or with the installer or archive from go.dev/dl, which is the better choice on Linux, where distribution packages are often older than 1.24.

shell
brew install go   # macOS
go version        # go version go1.24.0 or newer
  • cstudy never downloads a Go module: the one module a solution may import, for decimals, ships with cstudy. It builds with GOTOOLCHAIN=local, so an older Go stops with an error instead of downloading a newer one.
  • cstudy pins its own build environment, so your go env -w settings never change how it builds; they still apply to the go commands you run yourself.
  • For cstudy test --debug, install Delve, the release cstudy is tested with. go install puts it in ~/go/bin, where cstudy finds it even when that directory is not on your PATH.
shell
go install github.com/go-delve/delve/cmd/[email protected]
dlv version

On macOS, Delve runs through Xcode’s debug server, so it needs the Command Line Tools and the debugging permission described under Rust.

Rust

Rust is optional: only --lang rust builds with it. Install it with rustup, which manages toolchains and components. Do not use Homebrew’s rust formula: it has no rust-src, so rust-analyzer cannot show the standard library.

shell
brew install rustup   # macOS
rustup-init           # installs the stable toolchain and puts cargo on PATH

Or, on macOS and Linux, the script from rustup.rs:

shell
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Open a new terminal so ~/.cargo/bin is on your PATH, add the standard library sources for rust-analyzer, and check:

shell
rustup component add rust-src
rustc --version   # rustc 1.80.0 or newer
cargo --version
  • The crates the Rust runner needs for decimals and dates ship with cstudy, so builds run with cargo --offline and never contact crates.io. cstudy ignores your Cargo configuration for its own builds.
  • For cstudy test --debug, cstudy uses LLDB’s debug server. On macOS that is debugserver, which the Xcode Command Line Tools ship (xcode-select --install). macOS lets members of the _developer group debug; for anyone else it asks for an administrator when a session starts, until an administrator runs sudo DevToolsSecurity -enable.
  • On Linux the server is lldb-server, from your distribution’s lldb package. This has not been tried on Linux yet.

git

git is optional: cstudy init --git runs git init in a new workspace, and cstudy never commits. macOS provides git with the Xcode Command Line Tools (xcode-select --install) or brew install git; on Linux, install your distribution’s git package.

Check everything

Run cstudy doctor to check the toolchains. It prints ok, WARN or FAIL per check, with a fix for each problem it can name. Then create a workspace and set it up, as Getting started explains.

shell
cstudy doctor

This page condenses the toolchains guide in the cstudy repository, which has every detail.

Written for cstudy 0.8.0. The specs in the cstudy repository are the source of truth for every detail.