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

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.2
File Size Uploaded Provenance Actions
ojkit-0.1.2.tar.gz 7.5 kB Without provenance Details for ojkit-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 15.4 kB

Release files / ojkit-0.1.2.tar.gz

Download URL ojkit-0.1.2.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
43ccc1d5b1f61b242480469ce974ac8022bda7590b2ff14a5e5bb25a75e111d9
BLAKE2b-256 checksum
How to use checksums
e93002837e71c4a564935cb830c963f6da53e9e4d372fd1cea52747abee3842c
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.2-py3-none-any.whl

Download URL ojkit-0.1.2-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8584f87adee2e1c93ac15ccd03f910f563a766abf040a5df18a16acffa741a67
BLAKE2b-256 checksum
How to use checksums
bf2a1544edb42757a3fbebc904e5eae2428388280e43080e7b9c970349d98aa8
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.2

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