Codeforces Tool CP Editor edition is a command-line interface tool for Codeforces and CP Editor.
It's fast, small and cross-platform.
Simplified version of Original CF tool.
Installation | Usage | FAQ
- Supports Contests and Gym.
- Supports C++20 in Codeforces.
- Submit codes.
- Watch a submission's status dynamically.
- Setup a network proxy. Setup a mirror host.
Pull requests are always welcome.
You can download the pre-compiled binary file in here.
Or you can compile it from the source (go >= 1.17):
$ go get github.com/aqua4/cf-tool-cpe
$ cd $GOPATH/.../cf-tool-cpe
$ go build -ldflags "-s -w" cf.go
If you don't know what's the $GOPATH
, please see here https://github.com/golang/go/wiki/GOPATH.
You should run "cf config" to configure your handle and password at first.
Usage:
cf config
cf submit -f <file> <url>
Options:
-h --help Show this screen.
--version Show version.
-f <file>, --file <file>
Path to file. E.g. "a.cpp", "./temp/a.cpp"
<url> Problem URL. E.g. "https://codeforces.com/contest/180/problem/A",
Examples:
cf config Configure the cf-tool.
cf submit -f a.cpp https://codeforces.com/contest/100/A
File:
cf will save some data in some files:
"~/.cf/config" Configuration file.
"~/.cf/session" Session file, including cookies, handle, password, etc.
"~" is the home directory of current user in your system.
- Removed most of the features which are already supported by CP editor like templates, colors, etc.
- Removed most of the CLI commands which are not used by CP editor.
- Removed all programming languages support.
- Added C++20 support.
- Problem "0" is interpreted as problem "A" during a contest.
Codeforces Tool is a command-line tool. You should run it in terminal.
You should put the cf
program to a path (e.g. /usr/bin/
in Linux) which has been added to system environment variable PATH.
Or just google "how to add a path to system environment variable PATH".
Reminder: C++20 is backwards compatible with previous versions, i.e. you can submit C++11/14/17 with C++20.
Change supported languages and re-build the binary.