A terminal session for Codeforces. Fetch a problem, write your solution, run the samples — without leaving the shell.
Requires Bun, python3, and g++.
bun install
bun run dev| Command | What it does |
|---|---|
/problem <id> |
Fetch problem from Codeforces, scaffold solution file, store samples |
/lang <py|cpp> |
Switch language (scaffolds new file if needed, never overwrites existing code) |
/test |
Run stored samples against your solution |
/status |
Show current problem, language, and file |
/help |
List commands |
/quit |
Exit |
❯ /problem 4A
ready 4A: A. Watermelon
file: 4A.py
samples: 2
❯ /lang cpp
language set to cpp
file: 4A.cpp
❯ /test
sample 1: PASS
sample 2: PASS
2/2 passed
The prompt shows your active context — [4A · CPP] ❯ — and Tab completes commands.
Bug reports and pull requests are welcome at pol-cova/cf-cli.
If you're adding a feature, open an issue first so we can agree on the direction before you spend time on it.
bun install
bun run dev # run with file watching
bun test # run tests- Problems are fetched live from
codeforces.comand parsed from HTML - Samples are stored under
.cf-cli/and reused on/test - Python runs via
python3, C++ compiles withg++ -O2then runs the binary - Solution files are created once and never overwritten on language switch
MIT — see LICENSE