This is a new CLI tool succeeding xalanq/cf-tool. It is designed for average (neo)vim enjoyers by saving you several seconds wasted on the browser.
Why another CLI tool?
Codeforces added bot detection recently, and AFAIK all the existing CLI tools are blocked. ref1 ref2
Features
- Parse sample testcases.
- Test your solution with parsed testcases.
- Submit code.
- Generate code from templates.
- Start a contest (parse sample testcases for all problems and optionally gen template).
Platform and requirements
Linux, Mac and Windows. python>=3.10
Installation
pip install pyforces-cli
(recommend using a virtual environment managed by conda)
Usage
pyforces configto login and configure your tool. Please follow the video tutorial on github to login.pyforces race 2092to start the contest2092.pyforces testin the problem folder, like~/pyforces/contest/2092/a, to test your solution against parsed sample testcases.pyforces submitin the problem folder, to submit your solution.pyforces parsein the problem folder to parse sample testcases.pyforces genin the problem folder to generate a file from template.
Vim config
Example neovim config (vim users need to replace term by !):
" test, and submit on success"
au FileType cpp nnoremap <buffer><F5> :w<CR>:term pyforces test -f % && pyforces submit -f %<CR>
" test"
au FileType cpp nnoremap <buffer><F6> :term pyforces test<CR>
" submit"
au FileType cpp nnoremap <buffer><F7> :w<CR>:term pyforces submit -f %<CR>
For more details like the login video tutorial, please see README in github. Leave a star if you find this tool helpful!








