$ duck β€” the local CLI

The duck CLI is the fast way to work a course: pull its challenges into a local directory, run the same tests with your own toolchain (no Docker needed), and submit without waiting. duck submit runs the tests locally and your result β€” points included β€” lands instantly; the server re-runs your solution in the background as an audit and badges the submission β€œverified” when it agrees (or shows both outputs when it doesn't).

Tutorial

Install

Prebuilt binary (recommended)

Every release ships static binaries for Linux, macOS, and Windows on the releases page. On Linux/macOS:

# pick your platform: duck-linux-amd64, duck-linux-arm64,
#                     duck-darwin-amd64, duck-darwin-arm64, duck-windows-amd64.exe
curl -fsSL https://github.com/michael-duren/rubber-duck/releases/latest/download/duck-linux-amd64 -o duck
chmod +x duck && sudo mv duck /usr/local/bin/

With Go

With Go 1.26+ installed (the binary lands in $(go env GOPATH)/bin β€” make sure that's on your PATH):

go install github.com/michael-duren/rubber-duck/cmd/duck@latest

Either way, verify:

duck version

Log in once

duck submit needs a personal CLI token. The easy way β€” prompts for your username and password, mints a token, and saves it to ~/.config/duck/token:

duck login

Or mint one by hand on your profile page ("Create CLI token") and either export it as DUCK_TOKEN or save it to ~/.config/duck/token. Everything about tokens β†’

Work a course

duck pull intro-to-concurrency/go
cd intro-to-concurrency-go

# edit <challenge-slug>/solution file with your editor, then:
duck test concurrent-sum      # run that challenge's tests locally
duck test                     # or run every challenge's tests
duck submit concurrent-sum    # run tests + submit; points land instantly

duck pull scaffolds one directory per challenge, each containing the starter code and the course's real test suite, plus a .duck-course.json that remembers the server URL β€” so test and submit work from anywhere inside the course tree with no flags.

duck test uses your own toolchain, so you need the course language installed locally: go (Go courses), python3 + pytest (Python), or a C compiler like cc (C).

Command reference

CommandWhat it does
duck pull <course>/<language>Scaffold the course's challenges into ./<course>-<language>/ from https://duckgc.com.
duck test [challenge-slug]Run one challenge's tests locally β€” or every challenge's, with no slug. No submission, no points.
duck submit <challenge-slug> [--remote]Run the tests locally and submit solution + result; the score is immediate and the server audits in the background. --remote skips the local run and waits for server grading instead (also the automatic fallback when the language toolchain isn't installed).
duck loginPrompt for credentials, mint a CLI token, save it to ~/.config/duck/token.
duck versionPrint the CLI version.