
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
codeforces-cli-tool
Advanced tools
This is a command line tool for Codeforces.
There are two modes available: interactive and non-interactive mode.
To use in interactive mode:
$ codeforces
> <command> [command args]
in non-interactive mode:
$ codeforces <command> [command args]
use exit to exit in interactive mode.
Current supported commands are:
Usage: login
This command only available in non-interactive mode. Input your handle and password when it prompts.
Usage: submit </path/to/file> [--watch] [--contest <contest_id>/--gym <gym_id>/--mashup <mashup_id>]
Now only support cpp files, and default to use C++11.
Now you can run set init to setup default complier based on file extensions. More information, see Supports and set.
If watch option is provided, a real-time update will active until verdict reveal. Update rate depend on network speed. If this field is empty, the submission id will be printed.
One can add --contest options to specify which contest will be submitted to. The priority of this option is higher than file name described below. Same as --gym and --mashup.
Notice that if this command are run in interactive mode, you have to login in non-interactive mode first. In case of non-interactive mode, you can login at same time when you submit.
File should be named as problem.ext. For example, 977D.cpp is a C++ solution for problem 977D, and this is not case sensitive.
If --contest(or another two options) are provided, file can be named as *index.ext. That is, meowF.cpp will be send to problem F of the specified contest.
Usage: set <init/cookie/compiler> [compiler options]
Only set cookie are available in interactive mode. Others are only available in non-interactive mode.
Directory ~/.codeforces-cli-tool must exist when execute this command except set init.
Run set init at after install this package and follow the instruction to setup. Unless you are sure to refresh both cookie and compiler, do not run init after first time using it. This package will use ~/.codeforces-cli-tool to store some file.
The only way to logout from Codeforces currently.
If no following options, this will lead you to set all choosable compiler for each extensions, or only the specific extentions will be set. Options are c,cpp,and py.
There are some common arguments can be used:
--config-path <path>: specify the config directory. Default is $HOME/.codeforces-cli-tool.--cookie-file <file>: specify the cookie file name. Related to config-path, default is cookie.json.--compiler-file <file>: specify the compiler file name. Related to config-path, default is compiler.json.$ npm install -g codeforces-cli-tool
$ codeforces set init
You can also manually add a empty file ~/.codeforces-cli-tool/cookie.json to use default compiler settings without running init.
.c using GNU GCC C11 5.1.0.cpp and .cc default using GNU G++14 6.4.0 (changable).py default using Python 3.7.2 (changable).go using Go 1.8.pl using Perl 5.20.1.java using Java 1.8.0_131.cs using C# Mono 5.hs using Haskell GHC 7.8.3If more extensions are needed, please issue it or send a PR.
submit sol.cpp 977D will workUpdate to newer compiler options. (Not fully updated)
Fix minor problems.
Allow to set config-path, cookie-file, compiler-file in arguments.
Specify contests/gyms/mashups in options.
Allowing file name without contest id if this option is set.
Allow submit to contests/gyms. Submission in contests should work with this feature. Mashups is not tested.
Keep fixing fetch submission id issue.
Fit into new codeforces html format.
Fix bugs.
Add colors to verdict.
Live submission status are added.
Remove inquirer.
Show submission id after submit.
Prevent multiple command running at same time.
Add change log.
Add more languages (now accourding to problem status to add new language). I will add it after I saw it.
Add config command (in version 1.2.0).
Make language(compiler) chooable.
Due to inquirer's rawlist display bug, try to use enquirer.
Change config to set.
Add login command.
First time to write README.
Use ~/.codeforces-cli-tool directory to store files.
Register codeforces command.
Make this package runnable.
Modulize some function in submit.
Store cookie to prevent login everytime.
Finish basic submit feature.
Add non-interactive mode, commands which use inquirer banned in interactive mode.
Successul get CSRF token.
Readline will get inquirer input, maybe stdin confilct or something?
Project start.
FAQs
Codeforces command line tool
We found that codeforces-cli-tool demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.