Skip to content
 
 

Repository files navigation

CfScripts - Codeforces & AtCoder CLI tools

A collection of competitive programming tools for Codeforces and AtCoder, using the Codeforces API and the Kenkoooo AtCoder API.

Preview

Commands

Command Description
cfscripts whatif What if virtual/unofficial participations were official? Simulates rating history.
cfscripts vperf Calculate rank/delta/performance of recent contest participations.
cfscripts unsolved Find unsolved problems from contests you've participated in.
cfscripts account Cumulative AC count since each date.
cfscripts dailyacs Problems solved per day with ratings.
cfscripts rangerank Your rank among nearby-rated contestants in a contest.
cfscripts pick Pick an unsolved Codeforces Div. 2 problem by rating level or index.
cfscripts dist Rating distribution of Div. 2 problems.
cfscripts stats Solved problem stats by rating (bar chart).
cfscripts atcpick Pick an unsolved AtCoder ABC problem by task letter.

Run cfscripts --help or cfscripts <command> --help for full usage details.

Installation

Clone and install as a Python package:

git clone https://github.com/rrogerc/cfscripts.git
cd cfscripts
pip install -e .

Then run:

cfscripts --help

Configuration

Set your Codeforces handle (stored in ~/.config/cfscripts/config.json):

cfscripts config handle YourCodeforcesHandle
cfscripts config cpp_dir ~/competitive/Codeforces
  • handle (required): Your Codeforces username.
  • cpp_dir (optional): Directory for C++ file stubs created by pick.

The handle can also be overridden per-invocation with --handle.

Development

Prerequisites

  • Python >= 3.9
  • pip

Directory Structure

src/cfscripts/
    cli.py              # CLI entry point (argparse)
    config.py           # Config loader (~/.config/cfscripts/)
    lib/                # Codeforces/AtCoder API clients, rating calculator
    scripts/            # Individual command implementations
devtools/               # PyInstaller build scripts

Building

Build a standalone executable with PyInstaller:

pip install pyinstaller
./devtools/build.sh

The bin/ directory will contain the cfscripts executable.

Credits

Originally created by William Bille Meyling (cf: WillTheBill, github: willthbill).

About

CfScripts - a collection of scripts for CodeForces

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages