Competitive Programming Booster 🡲 https://searleser97.github.io/cpbooster/
cpbooster is a cross-platform CLI tool designed to boost competitive programmer's speed during contests by automating various routine tasks like compiling and testing, debugging, cloning testcases, loading template, etc. The console command suits any coding environment (i.e. VSCode, Jetbrains IDEs, Vim, Emacs, Geany, Sublime Text, ...) and it’s very easy to use. Vim / NeoVim users can install cpbooster.vim plugin to boost their speed even more.
For Installation and Setup Instructions Visit cpbooster Website
https://searleser97.github.io/cpbooster/
-
cpboostercomes with a short alias command calledcpbto avoid writing the long command each time -
Automatically clone sample testcases files with corresponding source code files with template loaded into a desired directory
cpb clonewaits for competitive companion plugin to send parsed data for each problem
-
Test your code against sample testcases quickly
cpb test mycode.cpptest your program against all available test casescpb test mycode.cpp -t 1test your program against the test case with the given idcpb test /some/path/mycode.cpptest a program that is not located in your current location
Supported results:
- AC (Accepted)
- WA (Wrong Answer) Shows differences between accepted output and your output beautifully
- TLE (Time Limit Exceeded)
- RTE (Runtime Error)
- CE (Compilation Error)
-
Run code with your own debugging flags easily
cpb test mycode.cpp -dto use keyboard as inputcpb test mycode.cpp -t 2 -dto use a test case file as inputcpb test /some/path/mycode.cpp -ddebug a program that is not located in your current location
-
Submit your code from the terminal really quickly.
cpb submit mycode.cppsubmits your file to the corresponding judge.
-
open your preferred editor in the contest directory immediately after cloning it. See Editors
-
Create source files with corresponding template loaded
cpb create a.pycreates single file with corresponding template loaded based on file extensioncpb create {a..n}.cppcreates multiple consecutive files from "a.cpp" to "n.cpp"cpb create {a...n}.cppsame as previous command (Any amount of dots greater than 1 work)cpb create {a-n}.cppsame as previous command (Single dash also works)cpb create /some/path/a.cppcreates "a.cpp" in the specified path instead of current locationcpb create /some/path/{a-n}.cppcreates "a.cpp ... n.cpp" in the specified path instead of current location
-
Vim plugin cpbooster.vim boosts your speed even more
-
Flat File Structure. See Why Flat File Structure
- Fork this repository and clone it locally:
git clone https://github.com/{yourUsername}/cpbooster cd(change directory) tocpboosterrepo directory- Install dependencies: run
npm install - Install
cpboosterfrom source:npm run install:dev - Make code changes
- Lint your code and fix possible linting errors:
npm run lint - Verify all tests pass:
npm t
- add
--hereoption tocpb cloneto clone testcases in current directory - Add Memory Limit Exceeded Veredict (using
gnu-timeas/usr/bin/time -f '%M' ./program, can't usepsdue to lack of precision. See https://stackoverflow.com/a/131346/13079132) - Add the possibility to test interactive problems
- Add Stress tests (using brute force solution and tests generator)
- Add the possibility to test current file using test cases of another file (test --as <filename>)
- Add the possibility to debug current file using test cases of another file (test --as <filename> -d)
- Fully support windows CMD.
- Add support for
NODE_ENVin compile/debug command for debugging purposes.
- I am open to feature requests.
- Pull Requests are also welcome.
cpbooster is licensed under the GNU General Public License v3.0
