{"id":50712740,"url":"https://github.com/soham109/cpos","last_synced_at":"2026-06-14T09:01:17.091Z","repository":{"id":361569369,"uuid":"1254896844","full_name":"Soham109/cpos","owner":"Soham109","description":"CPOS — capture Codeforces \u0026 CSES problems, run tests, and submit from VS Code or the terminal. Extensions on the VS Code Marketplace and Chrome Web Store.","archived":false,"fork":false,"pushed_at":"2026-06-09T15:13:37.000Z","size":21293,"stargazers_count":53,"open_issues_count":5,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-09T17:14:08.541Z","etag":null,"topics":["cli","codeforces","competitive-programming","cses","ratatui","rust","terminal","tui"],"latest_commit_sha":null,"homepage":"https://cpos.sohamaggarwal.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Soham109.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"Soham109","custom":["https://cpos.sohamaggarwal.com"]}},"created_at":"2026-05-31T06:12:09.000Z","updated_at":"2026-06-09T15:21:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Soham109/cpos","commit_stats":null,"previous_names":["soham109/cpos"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/Soham109/cpos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soham109%2Fcpos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soham109%2Fcpos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soham109%2Fcpos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soham109%2Fcpos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Soham109","download_url":"https://codeload.github.com/Soham109/cpos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soham109%2Fcpos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34315075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","codeforces","competitive-programming","cses","ratatui","rust","terminal","tui"],"created_at":"2026-06-09T17:00:14.060Z","updated_at":"2026-06-14T09:01:17.067Z","avatar_url":"https://github.com/Soham109.png","language":"Rust","funding_links":["https://github.com/sponsors/Soham109","https://cpos.sohamaggarwal.com"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eCPOS\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\u003cb\u003eCompetitive Programming Operating System\u003c/b\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nOpen a problem in your browser. CPOS creates the file, loads the samples, and lets you run and submit — without copy-pasting anything.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cpos.sohamaggarwal.com\"\u003e\u003cimg alt=\"Website\" src=\"https://img.shields.io/badge/website-cpos-8b5cf6\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://youtu.be/5HTatBfpK5A\"\u003e\u003cimg alt=\"Demo\" src=\"https://img.shields.io/badge/demo-YouTube-red?logo=youtube\u0026logoColor=white\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://marketplace.visualstudio.com/items?itemName=sohamaggarwal.cpos-vscode\"\u003e\u003cimg alt=\"VS Code\" src=\"https://img.shields.io/badge/VS%20Code-Extension-007ACC?logo=visualstudiocode\u0026logoColor=white\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://chromewebstore.google.com/detail/gjnbapmjonegeeamdeahcoojgokeogmm\"\u003e\u003cimg alt=\"Chrome\" src=\"https://img.shields.io/badge/Chrome-Extension-4285F4?logo=googlechrome\u0026logoColor=white\"\u003e\u003c/a\u003e\n  \u003ca href=\"extensions/firefox\"\u003e\u003cimg alt=\"Firefox source install\" src=\"https://img.shields.io/badge/Firefox-source_install-FF7139?logo=firefoxbrowser\u0026logoColor=white\"\u003e\u003c/a\u003e\n  \u003cimg alt=\"license\" src=\"https://img.shields.io/badge/license-MIT-blue.svg\"\u003e\n  \u003cimg alt=\"rust\" src=\"https://img.shields.io/badge/built%20with-Rust-orange.svg\"\u003e\n  \u003ca href=\"https://github.com/sponsors/Soham109\"\u003e\u003cimg alt=\"Sponsor\" src=\"https://img.shields.io/badge/Sponsor-%E2%9D%A4-db61a2?logo=githubsponsors\u0026logoColor=white\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Demo\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://youtu.be/5HTatBfpK5A\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/▶_Full_walkthrough-FF0000?style=for-the-badge\u0026logo=youtube\u0026logoColor=white\" alt=\"Watch the CPOS full demo on YouTube\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://youtu.be/5HTatBfpK5A\"\u003e\n    \u003cimg src=\"https://img.youtube.com/vi/5HTatBfpK5A/maxresdefault.jpg\" alt=\"Click to play the CPOS demo on YouTube\" width=\"820\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003csub\u003eCapture a problem · auto-create your file · run samples · submit from VS Code\u003c/sub\u003e\u003c/p\u003e\n\n---\n\n## How it works\n\nCPOS has three parts — a **browser companion**, a **terminal app**, and a **VS Code extension**. Install all three; they share the same files and stay in sync over localhost.\n\n**The flow:**\n\n1. **Pick your folder** — open any folder in VS Code, or let the terminal app use `~/cpos`.\n2. **Open a problem in your browser** — any Codeforces or CSES problem page.\n3. **CPOS captures it** — the browser companion reads samples and sends them to CPOS on your machine.\n4. **A file appears** — e.g. `1971D.cpp`, with sample tests attached.\n5. **Write your solution** — in VS Code.\n6. **Run samples** — from the panel or with `T` in the terminal.\n7. **Submit** — CPOS autofills the judge form in your browser (log in to Codeforces/CSES first).\n\nNo copying samples. No manually creating files.\n\n---\n\n## VS Code\n\nWrite code in the editor. The CPOS panel runs samples and submits.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/img/vscode-panel-ui.png\" alt=\"CPOS VS Code panel with test cases, Run All, Submit, and a Codeforces solution open\" width=\"900\"\u003e\n\u003c/p\u003e\n\nInstall from the [Marketplace](https://marketplace.visualstudio.com/items?itemName=sohamaggarwal.cpos-vscode). Open your folder, capture a problem from the browser, then use the **CPOS panel**:\n\n- **Tests / Statement tabs** — switch between samples and the captured problem statement, rendered natively with MathJax\n- **Run All** — compile and test every sample\n- **Submit** — autofill the judge submit page in your logged-in browser\n- **Problem** — open the statement again\n- **Search** — Google search for editorials and solutions for the linked problem\n- **GitHub** — open the CPOS repository\n- **Test cases** — edit samples; multi-case inputs show linked input/output blocks when captured from Codeforces\n- **Theme** — five panel themes (see [Settings](#settings))\n\n---\n\n## Terminal\n\nBrowse the catalog, sync rating, track contests, and get recommendations — without opening Codeforces in a tab.\n\n```bash\nbrew tap Soham109/cpos https://github.com/Soham109/cpos\nbrew install cpos\ncpos\n```\n\nWindows with Scoop:\n\n```powershell\nscoop bucket add cpos https://github.com/Soham109/cpos\nscoop install cpos\ncpos\n```\n\n| Key | What it does |\n| --- | --- |\n| `o` / `Enter` | Open a problem — creates the file in your project folder when VS Code has synced a path, otherwise in `~/cpos` or your configured workspace |\n| `T` | Run against samples |\n| `s` | Submit |\n| `b` | Open problem in browser |\n| `U` | Open by URL |\n| `/` · `f` · `p` | Search · filter by rating · switch platform |\n| `Tab` | Switch between Dashboard, Problems, Contests, Analytics, Recommend, Target |\n| `r` | Sync with Codeforces and CSES |\n\nKeep the terminal running while you code in VS Code — same captures, same submits, same progress.\n\n### First run\n\nThe first time you launch `cpos` (before a Codeforces handle is set) a quick 4-step wizard runs:\n\n1. **Handle** — type your Codeforces handle.\n2. **Language** — pick your default language (`←/→` to browse).\n3. **Template** — choose how to supply your solution template:\n   - **Paste** (default): copy your template, then press **`v`** (or `Ctrl+V` / `⌘V`) to paste the whole thing — multi-line formatting is preserved.\n   - **Upload**: press **`Tab`** to switch modes, type or paste a file path, then **Enter** to load it. A live preview shows the loaded template.\n   - Leave it blank to use the built-in template.\n4. **CSES** *(optional)* — press `o` to open the CSES login, then paste your `PHPSESSID` cookie to sync solved problems. You can skip this and set it later in Config.\n\nRe-run the wizard any time by clearing your handle in `config.toml` (or deleting the config file — see [Config location](TROUBLESHOOTING.md#config-location)).\n\n---\n\n## Your folder, your files\n\nYou choose where solution files live:\n\n- **VS Code:** open a project folder before you capture. CPOS creates files such as `1982C.cpp` in that folder.\n- **Terminal:** defaults to `~/cpos/`, or uses the same project folder as VS Code when captures have been synced.\n\nConfigure the VS Code save location under **Settings → Extensions → CPOS** (`cpos.saveLocation`, `cpos.fixedDir`). Configure the terminal workspace in `config.toml` (`workspace_dir`).\n\n---\n\n## Install\n\n| What | Where |\n| --- | --- |\n| Browser companion | [Chrome Web Store](https://chromewebstore.google.com/detail/gjnbapmjonegeeamdeahcoojgokeogmm) (Chrome, Edge, Brave) |\n| Browser companion | [Firefox source install](extensions/firefox) (temporary/self-installed for now; AMO publishing later) |\n| VS Code extension | [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=sohamaggarwal.cpos-vscode) |\n| Terminal app | macOS/Linux: `brew tap Soham109/cpos https://github.com/Soham109/cpos` then `brew install cpos` |\n| Terminal app | Windows: `scoop bucket add cpos https://github.com/Soham109/cpos` then `scoop install cpos` |\n\nInstall all three for the full experience. The browser companion is required for capture and submit.\n\nThe package-manager installs use prebuilt binaries from GitHub Releases, so users do not need Rust, Cargo, Visual Studio Build Tools, or a linker. Developers can still build from source with:\n\n```bash\ncargo install --git https://github.com/Soham109/cpos\n```\n\nSee [INSTALL.md](INSTALL.md) for release assets, manual downloads, and publishing notes.\n\n## Updating\n\nWhen the terminal app starts, CPOS does a quick best-effort update check for the\nterminal app. If the terminal app is outdated, CPOS asks before running an\nupdate; it never updates silently. If the check is slow or offline, CPOS opens\nnormally.\n\nYou can also update manually:\n\n```bash\ncpos update\n```\n\nFor Homebrew installs, CPOS delegates to Homebrew. For Scoop installs, CPOS delegates to Scoop. Your config, cache, templates, and problem data are kept.\nSet `CPOS_NO_UPDATE_CHECK=1` to skip startup checks.\n\n**VS Code extension** — updates from the Marketplace automatically (or **Extensions → CPOS → Update**).\n\n**Browser companion** — Chrome/Edge/Brave update automatically from the Chrome Web Store. Firefox source installs do not auto-update yet; pull the latest repo changes, reload `extensions/firefox/manifest.json`, or rebuild/sign a new XPI.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/problems.png\" alt=\"Problems\" width=\"410\"\u003e\n  \u003cimg src=\"docs/analytics.png\" alt=\"Analytics\" width=\"410\"\u003e\n  \u003cimg src=\"docs/contests.png\" alt=\"Contests\" width=\"410\"\u003e\n  \u003cimg src=\"docs/recommend.png\" alt=\"Recommendations\" width=\"410\"\u003e\n\u003c/p\u003e\n\n---\n\n## Features\n\n- **Auto file creation** — open a problem, get a ready-to-edit solution file in your folder\n- **Sample capture** — public tests pulled from the problem page, with multi-case grouping on Codeforces when available\n- **Run \u0026 submit** — from the VS Code panel or terminal keys; submit autofills your browser\n- **Multi-language templates** — start new solutions in your configured language\n- **Progress \u0026 analytics** — rating history, topic breakdown, activity heatmap\n- **Recommendations** — personalized unsolved problems aimed at your weak topics (see below)\n- **Targeted practice** — set a rating goal and get the topics you still need plus an ordered plan to reach it (see below)\n- **Contests** — upcoming and running Codeforces contests with countdowns\n- **Private** — everything stays on your machine (`127.0.0.1`, no external servers)\n\n---\n\n## Recommendations\n\nAfter you sync (`r` in the terminal), CPOS builds a focused list of unsolved problems to practice next. Find them on the **Recommend** tab or the **Recommended Next** panel on the Dashboard.\n\n### How problems are picked\n\nCPOS only considers **unsolved** problems with a Codeforces rating in a band around your level (roughly −250 to +350 from your current rating, targeting about +100 above you).\n\nEach candidate gets a score from:\n\n| Signal | What it means |\n| --- | --- |\n| **Weak topics** | Tags where your solve rate is low get the most weight — a topic you fail 100% of the time counts more than one you're half-comfortable with |\n| **Multiple weak tags** | Problems that combine several weak areas get a small bonus |\n| **Unfinished attempts** | Problems you tried but didn't solve are boosted so you can finish what you started |\n| **Rating fit** | Problems near your target practice rating score higher |\n| **Popularity** | Well-known problems (many solves on Codeforces) are preferred — they're usually better written |\n\nThe top scorers are then **diversified**: CPOS caps how many problems share the same primary tag or exact rating so the list isn't fifteen identical DP problems.\n\n### Cold start (no solves yet)\n\nIf you haven't accepted anything yet, CPOS can't infer weak topics. It falls back to **popular problems around 1200**, spread across tags and ratings, until your submission history fills in.\n\nPress **`r`** after solving more problems to refresh recommendations.\n\n---\n\n## Targeted practice\n\nRecommend answers \"what's a good next problem.\" The **Target** tab answers the goal-shaped question: *where am I, what's left, and in what order.*\n\nSet a goal — cycle Codeforces rank milestones with `[` / `]`, or press `t` to type an exact rating (e.g. `1600`). CPOS then shows:\n\n- **Status** — your effective level, the gap to your goal, an overall **readiness %**, and how many problems you've solved in the goal band.\n- **Topics to Cover** — each prerequisite topic for the goal, labelled **Ready / Developing / Gap / Untouched** (weakest and most relevant first), with the rating it starts to matter at and your best solve so far.\n- **A step-by-step plan** — unsolved problems on rating rungs from your level up to the goal, with weak and uncovered topics front-loaded, labelled **Base → Build → Push → Target**. Press `enter`/`o` on a step to start it in the normal solve flow.\n\nThe plan is Codeforces-only, since CSES tasks don't carry ratings.\n\n---\n\n## Settings\n\n**VS Code** — `Settings → Extensions → CPOS`:\n\n| Setting | Default | What it does |\n| --- | --- | --- |\n| `cpos.saveLocation` | `workspaceFolder` | Save files in your open folder |\n| `cpos.fixedDir` | `~/cpos` | Folder when save location is `fixed` |\n| `cpos.defaultLanguage` | `cpp` | Language for new files |\n| `cpos.runTimeoutMs` | `5000` | Per-test timeout |\n\n**Panel themes** — use the theme control in the CPOS panel header. Your choice is remembered.\n\n| Theme | Look |\n| --- | --- |\n| `CPOS` | Signature purple — the default |\n| `Midnight` | Calm slate-blue |\n| `Amber` | Warm terminal / sepia |\n| `Paper` | High-contrast grayscale, minimal color |\n| `Native` | Inherits your active VS Code color theme — Run All matches VS Code button styling |\n\n**Terminal app** — `~/.config/cpos/config.toml` (Linux), `~/Library/Application Support/cpos/config.toml` (macOS), or `%APPDATA%\\cpos\\config.toml` (Windows):\n\n```toml\ndefault_language = \"cpp\"\ntheme = \"purple\"   # purple | cyan | green | amber | mono | plain | light\neditor = \"code {file}\"\n\n[handles]\ncodeforces = \"your_handle\"\n```\n\n\u003e `plain` is a neutral grayscale theme for a low-color terminal interface; `mono` is the single-accent minimal one; `light` is a bright canvas for light terminal / VS Code light-theme users.\n\n\u003e **macOS C++:** run `brew install gcc` if you need `bits/stdc++.h` — CPOS auto-detects Homebrew's g++.\n\nHaving issues? See **[TROUBLESHOOTING.md](TROUBLESHOOTING.md)** (TUI install, Run All errors, submit, source builds, and more).\n\n---\n\n## Roadmap\n\n- AtCoder \u0026 CodeChef support\n- Contest mode with per-problem timers\n- Read submission verdicts back into CPOS\n\n---\n\n## Sponsor\n\nCPOS is built and maintained by one person, in the open, for the competitive programming community. It's free, MIT-licensed, and runs entirely on your own machine — no accounts, no servers, no tracking, no paywalled features.\n\nIf CPOS saves you time on every problem, sponsoring keeps it that way and funds what's next:\n\n- **More judges** — AtCoder and CodeChef support\n- **Contest mode** — per-problem timers and a focused contest workflow\n- **Verdicts in CPOS** — read submission results back without leaving the editor\n- **Maintenance** — keeping capture and submit working as Codeforces and CSES change\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/sponsors/Soham109\"\u003e\u003cimg alt=\"Sponsor CPOS on GitHub\" src=\"https://img.shields.io/badge/Sponsor_CPOS-%E2%9D%A4-db61a2?style=for-the-badge\u0026logo=githubsponsors\u0026logoColor=white\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nNot in a position to sponsor? Starring the repo, filing a clear bug report, or sending a PR helps just as much — see [CONTRIBUTING.md](CONTRIBUTING.md).\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n\n---\n\n## Open source\n\nCPOS is fully open source. You're free to use it, fork it, and build on it.\n\nContributions are welcome and appreciated — whether that's a bug report, a doc fix, a new platform, or a polish pass on the TUI. Start with **[CONTRIBUTING.md](CONTRIBUTING.md)** for dev setup and PR guidelines.\n\n| Doc | Purpose |\n| --- | --- |\n| [INSTALL.md](INSTALL.md) | TUI binary install, update, and release publishing |\n| [TROUBLESHOOTING.md](TROUBLESHOOTING.md) | Common fixes (TUI install, Run All, submit, source builds) |\n| [CONTRIBUTING.md](CONTRIBUTING.md) | How to contribute |\n| [ARCHITECTURE.md](ARCHITECTURE.md) | How the components connect |\n| [CHANGELOG.md](CHANGELOG.md) | Version history |\n| [SECURITY.md](SECURITY.md) | Report vulnerabilities |\n\nQuestions or ideas: [GitHub Issues](https://github.com/Soham109/cpos/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoham109%2Fcpos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoham109%2Fcpos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoham109%2Fcpos/lists"}