百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

cf-tool

> 数据库
开源

:bar_chart: Codeforces CLI (提交、解析、测试等)。支持比赛、体育馆、组、acmsguru、Windows、macOS、Linux,7 MB

1.4K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

:bar_chart: Codeforces CLI (提交、解析、测试等)。支持比赛、体育馆、组、acmsguru、Windows、macOS、Linux,7 MB

Codeforces Tool

Codeforces Tool is a command-line interface tool for Codeforces.

It's fast, small, cross-platform and powerful.

Installation | Usage | FAQ | 中文

Features

  • Support Contests, Gym, Groups and acmsguru.
  • Support all programming languages in Codeforces.
  • Submit codes.
  • Watch submissions' status dynamically.
  • Fetch problems' samples.
  • Compile and test locally.
  • Clone all codes of someone.
  • Generate codes from the specified template (including timestamp, author, etc.)
  • List problems' stats of one contest.
  • Use default web browser to open problems' pages, standings' page, etc.
  • Setup a network proxy. Setup a mirror host.
  • Colorful CLI.

Pull requests are always welcome.

Installation

You can download the pre-compiled binary file in here.

Then enjoy the cf-tool~

Or you can compile it from the source (go >= 1.12):

$ go get github.com/xalanq/cf-tool
$ cd $GOPATH/src/github.com/xalanq/cf-tool
$ 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

Let's simulate a competition.

cf race 1136 or cf race https://codeforces.com/contest/1136

To start competing the contest 1136!

If the contest has not started yet, cf will count down. If the contest have started or the countdown ends, cf will use the default browser to open dashboard's page and problems' page, and fetch all samples to the local.

cd ./cf/contest/1136/a (May be different from this, please notice the message on your screen)

Enter the directory of problem A, the directory should contain all samples of the problem.

cf gen

Generate a code with the default template. The filename of the code is problem id by default.

vim a.cpp

Use Vim to write the code (It depends on yourself).

cf test

Compile and test all samples.

cf submit

Submit the code.

cf list

List problems' stats of the contest.

cf stand

Open the standings' page of the contest.

…

Template Example

The placeholders inside the template will be replaced with the corresponding content when you run cf gen.

$%U%$   Handle (e.g. xalanq)
$%Y%$   Year   (e.g. 2019)
$%M%$   Month  (e.g. 04)
$%D%$   Day    (e.g. 09)
$%h%$   Hour   (e.g. 08)
$%m%$   Minute (e.g. 05)
$%s%$   Second (e.g. 00)
/* Generated by powerful Codeforces Tool
 * You can download the binary file in here https://github.com/xalanq/cf-tool (Windows, macOS, Linux)
 * Author: $%U%$
 * Time: $%Y%$-$%M%$-$%D%$ $%h%$:$%m%$:$%s%$
**/

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    return 0;
}

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

How to add a new testcase

Create two extra testcase files inK.txt and ansK.txt (K is a string with 0~9).

Enable tab completion in terminal

Use this Infinidat/infi.docopt_completion.

Note: If there is a new version released (especially a new command added), you should run docopt-completion cf again.

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •Support Contests, Gym, Groups and acmsguru.
  • •Support all programming languages in Codeforces.
  • •Submit codes.
  • •Watch submissions' status dynamically.
  • •Fetch problems' samples.
  • •Compile and test locally.
  • •Clone all codes of someone.
  • •Generate codes from the specified template (including timestamp, author, etc.)
  • •List problems' stats of one contest.
  • •Use default web browser to open problems' pages, standings' page, etc.

> 标签

Goclicodeforcescross-platformgolang

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库