Skip to main content

ojkit

A lightweight CLI toolkit for competitive programming on Codeforces.

ojkit lets you quickly find or import Codeforces problems, create a C++ workspace, fetch sample test cases, and run your solution against them — all from the terminal.

Features

  • Browse Codeforces problems by rating
  • Fuzzy-search problems directly from the terminal
  • Import problems directly from a Codeforces URL
  • Supports problemset and contest problem URLs
  • Automatically creates a C++ workspace
  • Fetches sample test cases
  • Compiles C++ solutions using g++
  • Runs solutions against all sample tests
  • Works on Linux

Installation

pip install ojkit

Requires Python 3.10+.

A C++ compiler is required to use ojkit run.

Usage

Find a problem

Run:

ojkit

By default, ojkit shows problems rated 800.

To search for a specific rating:

ojkit -r 1200

Select a problem using the fuzzy finder and ojkit will create a workspace and download its sample tests.

Import a problem from a URL

You can import a Codeforces problem directly:

ojkit https://codeforces.com/problemset/problem/2264/F

Contest URLs work too:

ojkit https://codeforces.com/contest/2264/problem/F

This is especially useful during contests — just copy the problem URL and pass it to ojkit.

Workspace

Problems are created inside your Codeforces directory:

~/codeforces/
└── 2264/
    └── F/
        ├── F.cpp
        └── tests/
            ├── input1.txt
            ├── output1.txt
            ├── input2.txt
            └── output2.txt

ojkit will not overwrite an existing solution file.

Running Tests

Enter the problem directory:

cd ~/codeforces/2264/F

Then run:

ojkit run

ojkit will compile your C++ solution and run it against the downloaded sample tests.

Example:

✓ Compiled successfully
Test 1: PASS
Test 2: PASS

If a test fails, ojkit displays the expected and actual output.

Development

Clone the repository:

git clone https://github.com/Aditya1770/ojkit.git
cd ojkit

Install it in editable mode:

pip install -e .

Changes to the source code will then be reflected immediately when running:

ojkit

Requirements

  • Python 3.10+
  • g++
  • Internet connection for fetching Codeforces problems

License

ojkit is licensed under the MIT License.

Metadata

Release files for ojkit 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ojkit 0.1.1
File Size Uploaded Provenance Actions
ojkit-0.1.1.tar.gz 7.5 kB Without provenance Details for ojkit-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ojkit 0.1.1
File Interpreter ABI Platform Actions
ojkit-0.1.1-py3-none-any.whl Python 3 none any Details for ojkit-0.1.1-py3-none-any.whl

Total release size: 15.4 kB

Release files / ojkit-0.1.1.tar.gz

Download URL ojkit-0.1.1.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
433fc0fa9a08c21cf4d7b46dcd928c578a99a8ea196221f299523d20c29efc3f
BLAKE2b-256 checksum
How to use checksums
2874b7c57514540811f5e3e30e65b6b6917b8437a6c6eb426799773864af5e5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / ojkit-0.1.1-py3-none-any.whl

Download URL ojkit-0.1.1-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
766ea9afb96ec148eb8199397a7c995c0cc7e9cbf47c52f9d4012e59729e2e60
BLAKE2b-256 checksum
How to use checksums
74c7596726e7d3a4c1b12a28ab2a90b4d6bc8800131583252576d0b717af61d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for ojkit 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page