SohamAggarwal's blog

By SohamAggarwal, history, 4 hours ago, In English

Title: CPOS: a local terminal + VS Code workflow for Codeforces/CSES practice

Content:

Hi everyone,

I built CPOS, a local-first tool for competitive programming.

The main idea is to have one place for the parts of CP practice that usually get scattered across browser tabs, notes, extensions, and memory.

Tools like CPH are already very good for the editor-side workflow: capture a problem, create a file, run samples, submit, etc. CPOS is partly inspired by that workflow, but the goal is a bit broader.

CPOS has a terminal UI where you can manage practice, contests, submissions, and progress from one place. From the TUI, you can:

  • browse Codeforces and CSES problems
  • connect your Codeforces and CSES accounts locally
  • open problems
  • run samples
  • submit solutions
  • view upcoming and live contests
  • track rating changes
  • see an activity heatmap
  • analyze weak tags
  • get 30 recommended unsolved problems around your level

The TUI is the main workflow. You can run samples and submit directly from the terminal.

I also made a VS Code extension for people who prefer a simpler button-based interface while coding. It gives a CPH-style panel where you can capture a problem from the browser, create the solution file, run tests, and submit.

So there are two ways to use it:

  1. Use the TUI as the main keyboard-first workflow.
  2. Use the VS Code extension for the simpler editor workflow.

You can also use both together: capture the problem from the browser, code in VS Code, run/submit from either VS Code or the terminal, and track everything in CPOS.

For browser capture and editor integration, you need the Chrome extension and the VS Code extension installed along with the terminal app.

Everything runs locally.

  • no CPOS account
  • no cloud backend
  • no hosted database

Currently supported:

  • Codeforces
  • CSES
  • 13 programming languages
  • macOS/Linux/Windows support depending on setup

Links:

GitHub: https://github.com/Soham109/cpos

VS Code extension: https://marketplace.visualstudio.com/items?itemName=sohamaggarwal.cpos-vscode

Chrome extension: https://chromewebstore.google.com/detail/gjnbapmjonegeeamdeahcoojgokeogmm

I would really appreciate feedback, especially from people who regularly use CPH or similar tools.

Some things I am currently thinking about:

  • AtCoder support
  • contest mode
  • better recommendations
  • better syncing of verdicts/progress
  • improving the setup flow

If you try it and something feels confusing, missing, or badly designed, please let me know. Issues and feature requests are welcome on GitHub.

  • Vote: I like it
  • +1
  • Vote: I do not like it

»
55 minutes ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Great work. I was also working on a similar project, more like a feature with which you can submit solutions from your local editor directly to codeforces but i was unable to fetch requests due to Cloudflare. I tried using cookies but failed. Reading your ARCHITECTURE.md is very interesting. Can you tell me in simple terms how you managed to make this underrated feature?

  • »
    »
    52 minutes ago, hide # ^ |
     
    Vote: I like it +1 Vote: I do not like it

    I tried the cookie / direct HTTP route too and kept running into Cloudflare too, so I stopped fighting it.

    What CPOS does instead is that when I hit Submit in VS Code (or the terminal app), it doesn’t send anything to Codeforces from my editor. It just saves my code locally on localhost, copies it to my clipboard, and opens the Codeforces submit page in Chrome.

    I have a small Chrome extension that watches that local queue. When it sees a pending submit, it goes to the submit page in my already logged-in browser, pastes the code into the form, picks language/problem if needed, and clicks Submit — basically what I’d do manually, but automated.

    So Cloudflare is fine with it because it’s a real browser session, not a script pretending to be one with stolen cookies. I never pull passwords or session cookies into the editor; the browser handles auth like normal.

    Same idea for samples — the extension reads them off the problem page I already have open and sends them to my editor over localhost. No scraping from outside the browser.

    Tradeoff: you need the Chrome extension and to be logged in on Codeforces in that browser.

    • »
      »
      »
      29 minutes ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      Nice. I will try this in my project too. About the automation, is that like a script or just API calls?