Competitive Programming Assistant: all in one bash script

Правка en3, от -739397, 2026-05-17 22:28:50

Hello Codeforces!

I would like to introduce a command-line tool I've been working on to make competitive programming more streamlined and efficient: Competitive-Programming-Assistant (CPA). Natively can install in linux and macOS and can install in windows by WSL.

Installation

Prerequisites

Before installing, make sure you have the following installed on your system:

  • g++ and gcc
  • git and curl
  • jq (Command-line JSON processor)
  • nc (netcat, used to listen to Competitive Companion)
  • Competitive Companion Extension installed in your browser.

Command

bash -c "$(curl -fsSL https://raw.githubusercontent.com/sourav739397/Competitive-Programming-Assistant/main/install.sh)"

Key Features

  • Automated Parsing (via Competitive Companion): With a single click in your browser, CPA parses the problem name, time limit, memory limit, and sample tests. It automatically creates the source file and opens it in your editor (default is VS Code).
  • Effortless Testing & Compilation: Run CPA --test sol.cpp to compile and run your solution against all sample tests. It enforces the problem's time limit and provides a beautiful, colorful summary of which tests passed or failed, including execution times. It also supports a dedicated Debug mode (-d) with sanitizers enabled to catch bounds errors and memory leaks and also a debugger.
  • Advanced Output Comparison (testlib.h Support): By default, it compares outputs by ignoring trailing spaces. However, you can seamlessly use testlib.h checkers! For example, run CPA --test -fcmp.cpp sol.cpp to use a strict checker, or use custom ones for real number comparisons (-rcmp6.cpp) or case-insensitive YES/NO (-nyesno.cpp) also can rewrite your own checkers.
  • Built-in Stress Testing: Getting a WA on test 2 and can't figure out why? Write a brute-force solution (slow.cpp) and a test generator (gen.cpp). Then run: CPA --stress sol.cpp slow.cpp gen.cpp 1000
  • Easy Custom Test Cases: Use CPA --add sol.cpp to interactively paste custom inputs and expected outputs without having to manually create .in and .out files.
  • Beautiful CLI & VS Code Integration: The tool features a gorgeous command-line interface with icons and colors. During installation, it even offers to set up VS Code keybindings for you automatically!

GitHub Repository: Competitive-Programming-Assistant

Thanks for reading <3:

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский -739397 2026-05-17 22:28:50 23
en2 Английский -739397 2026-05-17 22:14:13 2264 Tiny change: 'y WSL.\n\n' -> 'y WSL.\n\nInstallation\n------------------' (published)
en1 Английский -739397 2026-05-17 21:55:07 328 Initial revision (saved to drafts)