npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cf-recommend

v0.1.0

Published

Codeforces practice recommender: analyses your submission history and recommends problems to solve next, focused on your weak topics. Ships a prebuilt native binary — no C++ compiler needed.

Readme

cf-recommend

Know exactly what to practice next on Codeforces.

A fast, local-first CLI that analyses your Codeforces submission history and recommends the best problems to solve next — laser-focused on your weak topics.

npm version npm downloads license platforms PRs welcome

npm install -g cf-recommend

No browser. No account linking. No C++ compiler. Just your handle.


Why cf-recommend?

Every competitive programmer hits the same wall: "what should I solve next?" Existing tools are web-based and generic. cf-recommend is built for people who live in the terminal and want personalised, data-driven practice.

  • Weak-topic targeting — it finds the tags you actually struggle with.
  • Adaptive difficulty — recommendations centre on a solving level inferred from the problems you really solve, not a static rating.
  • Explains itself — every suggestion comes with a reason.
  • Local-first — cached in SQLite, instant, works offline.
  • Zero-friction install — prebuilt binary via npm.

🎬 Demo

$ cf analyze

  tourist  —  616 problems solved across 683 attempted
  Adaptive solving level: ~1650 (from your solve history)

  Problem-Solving Breakdown  (success rate · solved/attempted)
    Math                  92%   291/315
    Greedy                90%   300/334
    DP                    84%   75/89
    Binary Search         82%   54/66
    Graphs                69%   11/16
    Divide And Conquer    63%   5/8     (weak)

  Weak areas (below 50%) ...

$ cf next --weak-topics-only --count 1

  1. 1167B  rating 1400  ·  Divide And Conquer [weak area]
     Lost Numbers
     Why: You're only 63% proficient in Divide And Conquer — focused practice on a weak area.
     For you: Medium  (feels like ~1475)   Est. 25-40 min
     https://codeforces.com/problemset/problem/1167/B

Install

npm install -g cf-recommend

Installs the cf command (plus a cf-recommend alias). Prebuilt binaries ship for Windows x64, Linux x64, and macOS x64 & arm64 — no compiler needed. Prefer to build it yourself? See Build from source.

Heads up: the command is cf. If you also use the Cloud Foundry CLI (also cf), use the cf-recommend alias instead.

Quick start

cf login <your-handle>     # download & cache your history (public data)
cf analyze                 # see your per-topic breakdown
cf next                    # get problem recommendations
cf weak-topics             # focus areas with insights
cf progress                # recent activity, improvements, streak

Commands

| Command | Description | |---|---| | cf login <handle> | Verify a handle and download its full history | | cf sync | Re-fetch submissions & the problem set | | cf analyze | Per-topic success-rate breakdown | | cf next [options] | Recommend problems to solve next | | cf weak-topics | Your weakest topics, with insights | | cf progress | Recent activity, improvements, and streak | | cf config [key value] | View or change settings (e.g. max-rating) | | cf help | Show usage |

next options

| Flag | Meaning | |---|---| | --count N | How many problems to show (default 10) | | --topic NAME | Filter by topic — dp, greedy, binsearch, graphs, … | | --difficulty A-B | Rating range, e.g. 1400-1600 (single value also works) | | --rating-range A-B | Alias for --difficulty | | --max-rating N | Cap this run's problem rating at N | | --weak-topics-only | Only problems that touch your weak topics |

Topic names are flexible: binsearch, binary-search, and binary search all resolve to the same Codeforces tag.

Set a permanent rating cap

cf config max-rating 1700   # cap every recommendation at 1700
cf config max-rating off    # remove the cap
cf config                   # show current settings

Precedence for next: explicit --difficulty / --rating-range → one-off --max-rating → saved config max-rating default.

Examples

cf next --weak-topics-only --count 10
cf next --topic dp --difficulty 1400-1600 --count 5
cf weak-topics
cf progress

How it works

Adaptive solving level

Recommendations centre on a solving level rather than your raw contest rating. Once you have at least 12 rated solves, it's the 80th percentile of the ratings you've solved, blended 50/50 with your Codeforces rating:

solving_level = round(0.5 * cf_rating + 0.5 * p80(solved problem ratings))

With less history it falls back to your Codeforces rating (or 1400 for a new account). Both cf analyze and cf next show it.

Proficiency

Submissions are aggregated per problem (not per submission), so retries and upsolves don't distort the numbers. A problem counts as solved if it ever got an OK verdict; in-progress submissions are ignored.

success_rate(topic) = solved problems in topic / attempted problems in topic

A topic needs at least 3 attempted problems before its rate is treated as reliable, and topics below 70% are considered weak.

Recommendation score

Each unsolved, rated problem gets a score in [0, 1]:

score = 0.40 * topic_weakness      // 1 - success_rate of its weakest tag
      + 0.30 * rating_fit          // Gaussian around your solving level
      + 0.20 * popularity          // log-scaled solve count (a proxy for "standard")
      + 0.10 * variety             // penalises tags you've drilled very recently

Per-user difficulty

A weak topic makes a problem feel harder, so the effective rating adds up to +200 for your weakest involved tag:

effective_rating = problem_rating + round(weakness * 200)

The Easy / Medium / Hard label and time estimate compare that effective rating to your solving level.

Data & caching

  • Data comes from the public Codeforces API (user.info, user.status, problemset.problems), with automatic retry on rate limits.
  • Cached in a SQLite database under %LOCALAPPDATA%\cf-recommend\ (Windows) or ~/.cf-recommend/ (Unix).
  • analyze, next, weak-topics, and progress read only from the cache, so they work offline. Run cf sync to refresh.

Build from source

Only needed if you're not installing via npm. Requires a C++17 compiler plus the libcurl and sqlite3 development libraries. The resulting binary is cf (cf.exe on Windows).

pacman -S mingw-w64-ucrt-x86_64-gcc \
          mingw-w64-ucrt-x86_64-curl \
          mingw-w64-ucrt-x86_64-sqlite3 \
          mingw-w64-ucrt-x86_64-pkgconf

# from a UCRT64 shell (or with C:\msys64\ucrt64\bin on PATH):
mingw32-make
# Debian/Ubuntu:  sudo apt install g++ libcurl4-openssl-dev libsqlite3-dev
# macOS:          xcode-select --install
make
sudo cp cf /usr/local/bin/   # optional: put it on PATH
cmake -S . -B build && cmake --build build

Contributing

Contributions are very welcome — see CONTRIBUTING.md for dev setup, project layout, and guidelines. Good first areas: smarter ranking heuristics, new filters, and platform testing.

Roadmap

  • [ ] Friend / rival comparison (cf compare <handle>)
  • [ ] Contest-division awareness in filtering
  • [ ] Per-tag "learning path" ordering
  • [ ] Export recommendations to a file

License

MIT © nathandemoss