Skip to content

📊 Codeforces CLI for CP Editor. Supports submissions to Contests and Gym. Windows, macOS, Linux, 4 MB

License

Notifications You must be signed in to change notification settings

aqua4/cf-tool-cpe

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codeforces Tool CP Editor edition

Github release Go Report Card Go Version license

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

Features

  • 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.

Installation

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.

Usage

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.

Main changes

  • 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.

FAQ

I double click the program but it doesn't work

Codeforces Tool is a command-line tool. You should run it in terminal.

I cannot use cf command

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".

I want to change C++ compiler version or source file extension:

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.

About

📊 Codeforces CLI for CP Editor. Supports submissions to Contests and Gym. Windows, macOS, Linux, 4 MB

Resources

License

Stars

Watchers

Forks

Languages

  • Go 100.0%