The All-in-One Competitive Programming Workspace for VS Code & Cursor
One extension. Multiple platforms. Zero confusion. Everything you need to master competitive programmingβall in your editor.
CP Studio is a comprehensive VS Code and Cursor extension designed for competitive programmers who want a unified, distraction-free coding experience. Whether you're practicing on Codeforces, LeetCode, or GeeksforGeeks, CP Studio provides everything you need: instant problem setup, local testing, AI-powered code analysis, progress tracking, and seamless submission workflowsβall without leaving your editor.
Why CP Studio? Because competitive programming shouldn't require juggling multiple tools, browser tabs, and workflows. One extension. One workflow. One focus: solving problems.
Open Source: CP Studio is open source software (MIT License). Contributions welcome! See the Contributing section for details.
π Project Page: Visit carsonrodrigues.com/cp-studio-ai for more information, demos, and updates.
CP Studio lives in a dedicated sidebar panel with four views. Only one view is expanded at a time β when you open one, the others automatically collapse so you always have maximum screen space for content.
| View | What It Shows |
|---|---|
| Profile Stats | Your Codeforces rating, avatar, streaks, achievements, and 90-day activity heat map |
| Upcoming Contests | Live Codeforces contest schedule with one-click problem setup |
| Chat | AI chat assistant plus quick-access toolbar for tests, analysis, and problem sheets |
| Solved Problems | Searchable list of every problem you've solved, with links to reopen |
The Chat view header packs the most-used commands into a single toolbar so everything is one click away:
| Icon | Command | What It Does |
|---|---|---|
β¨ $(sparkle) |
AI Analysis | Instant code review of the active solution file |
$(play) |
Run Tests | Compile & run all test cases for the current problem |
π $(list-selection) |
A2OJ Ladders | Pull Codeforces problems organized by rating |
π $(book) |
NeetCode 150 | Pull the NeetCode 150 LeetCode list |
β
$(checklist) |
Love Babbar 450 | Pull Love Babbar's DSA sheet |
β $(star) |
Striver's Sheet | Pull Striver's curated problem list |
π $(history) |
Chat History | Browse previous AI chat sessions |
π§Ή $(clear-all) |
Clear Chat | Wipe the current conversation |
β $(add) |
New Chat | Start a fresh AI chat session |
π $(key) |
Configure API Key | Set your AI provider API key |
| Icon | Command | What It Does |
|---|---|---|
π€ $(account) |
Setup Profile | Enter your Codeforces username |
π $(refresh) |
Refresh Profile | Re-fetch rating, submissions, and stats |
| Icon | Command | What It Does |
|---|---|---|
π $(link) |
Setup from URL | Paste any problem URL to auto-scaffold |
π $(refresh) |
Refresh Contests | Reload the contest schedule |
| Icon | Command | What It Does |
|---|---|---|
$(play) |
Run Tests | Compile & run test cases |
β¨ $(sparkle) |
AI Analysis | Analyze the current file with AI |
π $(copy) |
Copy Code | Copy solution to clipboard for submission |
β $(add) |
Add Test Case | Create a new numbered inN.txt/outN.txt pair |
π $(book) |
View Problem | Open the problem statement in a side panel |
Tip: All views auto-collapse so only one is visible at a time. Click a collapsed view header to expand it and maximize its content area.
Setup problems from Codeforces, LeetCode, and GeeksforGeeks with a single command:
- β
URL-Based Setup: Paste any problem URL and get instant setup
- Codeforces:
https://codeforces.com/contest/2112/problem/A - LeetCode:
https://leetcode.com/problems/two-sum/ - GeeksforGeeks:
https://practice.geeksforgeeks.org/problems/two-sum/1
- Codeforces:
- β
Automatic Directory Structure: Organized folders for each platform
- Codeforces:
contests/{contestId}/{problem}/ - LeetCode:
leetcode/{slug}/ - GeeksforGeeks:
geeksforgeeks/{problemName}-{problemId}/
- Codeforces:
- β Test Cases Auto-Fetch: Input/output files downloaded automatically
- β Problem Statements: Saved locally for offline reference
- β C++ Template: Ready-to-code template file created instantly
How to use:
Cmd+Shift+P β "CP Studio: Setup Problem from URL"
β Paste any supported URL
β Start coding immediately!
Compile and test your solutions with one click:
- β
One-Click Testing: Click
βΆοΈ button in editor toolbar - β
Automatic Compilation: Uses
g++with optimized flags (-std=c++17 -O2) - β
Test Case Execution: Runs against
in.txtautomatically - β
Output Comparison: Compares with
out.txtand shows differences - β Detailed Results: Pass/fail status with expected vs actual output
- β Runtime Error Detection: Catches crashes and exceptions
- β Cross-Platform: Works on macOS, Linux, and Windows
How to use:
- Open
main.cppin any problem directory - Click the
βΆοΈ Run Tests button - View results instantly in the Output panel
Get intelligent feedback on your solutions using your own API key:
- β Code Review: Automated analysis of your code quality
- β Bug Detection: Identifies potential errors and edge cases
- β Complexity Analysis: Time and space complexity breakdown
- β Optimization Suggestions: Performance improvement recommendations
- β Alternative Approaches: Different solution strategies
- β Privacy-First: Uses YOUR API key (BYOK - Bring Your Own Key)
- β Multiple Providers: Supports OpenRouter, OpenAI, Anthropic, or custom APIs
- β Web Search Integration: Optional web search for latest solutions (GPT-4o:online)
Supported AI Providers:
- OpenRouter (recommended - access to multiple models)
- OpenAI (GPT-4, GPT-3.5, etc.)
- Anthropic (Claude)
- Custom API endpoints
How to use:
- Configure API key:
Cmd+Shift+Pβ "CP Studio: Configure API Key" - Click β¨ AI Analysis button for instant review
- Or use π¬ Open Chat for interactive help
Context-aware AI conversations about your code:
- β Context-Aware: Automatically includes your current code and problem statement
- β Multiple Sessions: Manage separate chats for different problems
- β
Code Insertion: Insert AI suggestions directly into your editor
- Replace entire file
- Insert at cursor
- Replace selection
- β Chat History: Access previous conversations
- β Problem-Specific: Each chat session tied to a specific problem
- β Real-Time Updates: Chat updates when you switch files
How to use:
- Click π¬ Open Chat button
- Ask questions about your code
- Get help with debugging, optimization, or understanding algorithms
Stay organized and track your progress:
- β Upcoming Contests: Browse Codeforces contests directly in sidebar
- β One-Click Setup: Setup contest problems without leaving editor
- β Profile Stats: View your Codeforces profile with avatar
- β Rating History: Track your rating progress over time
- β Recent Submissions: See your latest solved problems
- β Auto-Refresh: Contests and profile update automatically
How to use:
- Open CP Studio sidebar (left panel)
- View contests, profile stats, and solved problems
- Click any contest to setup problems instantly
Pull problems from popular curated lists:
- β A2OJ Ladders: Codeforces problems organized by difficulty
- β NeetCode 150: Essential LeetCode problems for interviews
- β NeetCode Blind 75: Core interview problems
- β Love Babbar 450: DSA sheet with GeeksforGeeks & LeetCode problems
- β Striver's Sheet: Comprehensive LeetCode problem list
- β Pattern-Based: Filter by algorithm patterns (DP, Graphs, etc.)
How to use:
- Open CP Studio sidebar
- Click problem set buttons (A2OJ, NeetCode, Love Babbar, Striver's)
- Select a ladder/problem set
- Choose a problem to setup
- Start solving!
Track your progress across all platforms:
- β Auto-Detection: Automatically detects solved Codeforces problems
- β Visual Indicators: File decorations show which problems you've solved
- β Solved Problems View: Browse all your solved problems
- β Quick Access: Click to open solved problems instantly
- β Progress Tracking: See your submission count and solve rate
- β Auto-Refresh: Background refresh keeps data up-to-date
- β Cache System: Fast access with intelligent caching
How to use:
- View solved problems in the CP Studio sidebar
- See checkmarks on solved problem files in explorer
- Refresh manually:
Cmd+Shift+Pβ "CP Studio: Refresh Solved Problems"
Essential shortcuts for competitive programming:
- β Copy Code: One-click copy to clipboard for submission
- β Setup from Contest: Browse and setup from upcoming contests
- β Refresh Data: Update contests, profile, and solved problems
- β Clear Chat: Start fresh conversations
- β Chat History: Access previous AI conversations
Keyboard shortcuts (customizable in Keybindings):
| Shortcut | Action |
|---|---|
Ctrl+Shift+T (Mac: Cmd+Shift+T) |
Run Tests |
Ctrl+Shift+A (Mac: Cmd+Shift+A) |
AI Analysis |
Ctrl+Shift+U (Mac: Cmd+Shift+U) |
Setup Problem from URL |
Ctrl+Shift+I (Mac: Cmd+Shift+I) |
Open Chat |
Status bar: When a solution file is open, the status bar shows your Codeforces rating, current problem (e.g. CF 2112A), and a quick Run button.
- β
C++, Python, Java: Choose your language in Settings (
codeforces.language). Templates and test runner adapt automatically. - β
Multiple test cases: Use
in1.txt/out1.txt,in2.txt/out2.txt, etc. Per-case pass/fail and timing are shown. - β Add Test Case: Use the + button in the editor toolbar to add new test case files.
- β Problem Statement viewer: Click View Problem Statement (or the problem label in the status bar) to open a formatted problem statement in a side panel.
- β Diff on failure: When tests fail, a side-by-side diff (expected vs actual) opens automatically.
CP Studio's logo features a cyber-professional aesthetic with electric blue, neon cyan, and dark obsidian colors. Here are theme recommendations that perfectly match this high-tech, competitive programming vibe:
- One Dark Pro β RECOMMENDED - Electric blue accents, dark obsidian base, neon highlights
- Dracula - Deep purple/blue tones with neon accents, matches the glowing aesthetic
- Cyberpunk - Neon cyan and electric blue highlights on dark backgrounds
- Tokyo Night - Dark obsidian with electric blue accents
- Shades of Purple - Dark base with vibrant blue/purple highlights
- Nord - Calming electric blue tones, professional look
- GitHub Dark - Clean dark with blue accents
- Material Theme Darker - Dark obsidian with blue highlights
- Night Owl - Dark theme optimized for blue tones
- Monokai - Classic high contrast, great for spotting errors
- Dark+ (Default Dark) - Clean and professional
- Solarized Dark - Professional dark theme with blue accents
To match CP Studio's cyber-professional aesthetic, customize your theme with:
{
"workbench.colorCustomizations": {
"[Your Theme]": {
"activityBar.background": "#0a0e1a", // Dark obsidian
"activityBar.foreground": "#00d9ff", // Neon cyan
"activityBarBadge.background": "#0066ff", // Electric blue
"statusBar.background": "#0a0e1a", // Dark obsidian
"statusBar.foreground": "#00d9ff", // Neon cyan
"titleBar.activeBackground": "#0a0e1a", // Dark obsidian
"titleBar.activeForeground": "#00d9ff" // Neon cyan
}
}
}- Electric Blue:
#0066ff/#00a8ff- Primary accent color - Neon Cyan:
#00d9ff/#00ffff- Secondary accent, highlights - Dark Obsidian:
#0a0e1a/#1a1f2e- Base background - Glow Effect: Use subtle blue/cyan glows for active elements
- Dark obsidian backgrounds reduce eye strain during long coding sessions
- Electric blue accents match the logo's lightning bolt aesthetic
- Neon cyan highlights provide clear visual feedback
- High contrast helps spot syntax errors quickly
- Cyber-professional look matches the competitive programming mindset
One Sport. No Confusion.
Competitive programming is about solving problems, not managing tools. CP Studio was built with a single vision: eliminate distractions and let you focus on what mattersβcoding.
- Unified Experience: One extension for all platforms. No switching between tools.
- Zero Friction: Setup problems in seconds. Test instantly. Submit confidently.
- Privacy First: Your code stays local. Your API keys stay yours.
- Open & Transparent: Built by a competitive programmer, for competitive programmers.
- One Workflow: From problem to solution to submissionβall in your editor.
- β Multi-Platform: Codeforces, LeetCode, GeeksforGeeksβall in one place
- β No Browser Required: Everything happens in your editor
- β Local Testing: Test before submitting, catch errors early
- β AI Integration: Get help when you need it, not when a website decides
- β Progress Tracking: See your growth, stay motivated
- β Curated Lists: Access popular problem sets instantly
- Save Time: Setup problems in seconds, not minutes
- Test Locally: Catch bugs before submitting
- Stay Focused: No browser tabs, no distractions
- Track Progress: See your solved problems at a glance
- Get Help: AI assistance when you're stuck
- LeetCode Integration: Practice interview problems seamlessly
- NeetCode Support: Access curated problem lists instantly
- Pattern Learning: Filter by algorithm patterns
- Progress Tracking: Monitor your preparation journey
- Problem Statements: Saved locally for offline study
- Test Cases: Understand edge cases with real examples
- AI Analysis: Learn from code reviews and optimizations
- Multiple Platforms: Practice across different problem styles
- β Fast: Local operations, minimal API calls
- β Reliable: Works offline for most features
- β Secure: Your code never leaves your machine (except AI analysis with your key)
- β Cross-Platform: macOS, Linux, Windows support
- β Lightweight: Minimal resource usage
- β Extensible: Easy to add new platforms and features
VS Code / Cursor:
- Press
Cmd+Shift+P(Mac) orCtrl+Shift+P(Windows/Linux) - Type:
Extensions: Install from VSIX... - Select the downloaded
.vsixfile - Or install from VS Code Marketplace
First run: CP Studio will open a Get Started walkthrough. Follow the steps to set your Codeforces username, configure your AI API key, and set up your first problem. You can also open it anytime via the Get Started view or Command Palette.
CP Studio supports C++, Python, and Java. Set your preferred language in Settings β codeforces.language (default: C++).
C++ (macOS):
xcode-select --installLinux (Ubuntu/Debian):
sudo apt update && sudo apt install build-essential g++C++ (Windows):
- Install MinGW-w64 or
- Install Visual Studio Build Tools
Python: Install python.org or python3 via your package manager.
Java: Install a JDK (e.g. Eclipse Temurin).
-
AI Features (Recommended):
- Get API key from OpenRouter.ai
Cmd+Shift+Pβ "CP Studio: Configure API Key"
-
Codeforces Profile (Optional):
Cmd+Shift+Pβ "CP Studio: Setup Profile"- Enter your Codeforces username
Cmd+Shift+Pβ "CP Studio: Setup Problem from URL"- Paste:
https://codeforces.com/contest/2112/problem/A - Code, test, and submit!
Method 1: From URL (All Platforms)
Cmd+Shift+P β "CP Studio: Setup Problem from URL"
β Paste URL (Codeforces/LeetCode/GeeksforGeeks)
Method 2: From Contest List (Codeforces)
- Open CP Studio sidebar
- Click any contest in "Upcoming Contests"
- Select a problem
Method 3: From Problem Sets
- Open CP Studio sidebar
- Click problem set button (A2OJ, NeetCode, etc.)
- Select ladder/problem set
- Choose a problem
- Open your solution file (
main.cpp,main.py, orMain.java) in any problem directory - Click
βΆοΈ Run Tests (or pressCtrl+Shift+T/Cmd+Shift+T) - View results in the Output panel; on failure, a diff view (expected vs actual) opens
What happens:
- C++: Compiles with
g++ -std=c++17 -O2, then runs - Python/Java: Runs with
python3orjava - Supports single (
in.txt/out.txt) or multiple test cases (in1.txt/out1.txt, β¦) - Per-case pass/fail and timing; failed tests show a side-by-side diff
Quick Analysis:
- Click β¨ AI Analysis button
- Get instant code review
Interactive Chat:
- Click π¬ Open Chat button
- Ask questions, get help
- Insert code suggestions directly
Configure API:
Cmd+Shift+Pβ "CP Studio: Configure API Key"- Or Settings β
codeforces.aiApiKey
- View Solved Problems: Open "Solved Problems" view in sidebar
- File Decorations: See checkmarks on solved problem files
- Refresh:
Cmd+Shift+Pβ "CP Studio: Refresh Solved Problems" - Auto-Refresh: Enabled by default (refreshes every hour)
Open Settings (Cmd+, or Ctrl+,) and search for "codeforces":
| Setting | Description | Default |
|---|---|---|
codeforces.contestsPath |
Path to Codeforces contests directory | ${workspaceFolder}/contests |
codeforces.leetcodePath |
Path to LeetCode problems directory | ${workspaceFolder}/leetcode |
codeforces.geeksforgeeksPath |
Path to GeeksforGeeks problems directory | ${workspaceFolder}/geeksforgeeks |
codeforces.language |
Preferred language for templates and tests (cpp, python, java) |
cpp |
codeforces.aiProvider |
AI provider (openrouter, openai, anthropic, custom) |
openrouter |
codeforces.aiApiKey |
Your API key for AI features | (empty) |
codeforces.aiModel |
Model to use (e.g., openai/gpt-4o:online) |
openai/gpt-4o:online |
codeforces.aiBaseUrl |
Custom API base URL (for custom providers) | (empty) |
codeforces.username |
Codeforces username for profile features | (empty) |
codeforces.autoRefreshSolved |
Auto-refresh solved problems on activation | true |
codeforces.solvedProblemsRefreshInterval |
Refresh interval in milliseconds | 3600000 (1 hour) |
- VS Code 1.80+ or Cursor (any version)
- C++ Compiler (
g++recommended, orcl.exeon Windows)
- AI API Key - For AI features (get from OpenRouter.ai)
- Codeforces Account - For profile and solved problems tracking
- macOS: 10.13+ (High Sierra or later)
- Linux: Ubuntu 18.04+, Fedora 30+, or any modern distribution
- Windows: Windows 10 or later
- RAM: 4GB minimum (8GB recommended)
- Disk Space: ~200MB for extension + compiler
- Check VS Code version: Requires 1.80+
- Reload window:
Cmd+Shift+Pβ "Developer: Reload Window" - Check Output: View β Output β Select "CP Studio"
- Verify compiler: Run
g++ --versionin terminal - Check file location: Must be in
contests/{contestId}/{problem}/main.cpp(orleetcode/orgeeksforgeeks/) - Check test files: Ensure
in.txtandout.txtexist
- Check API key: Settings β
codeforces.aiApiKey - Verify key is valid: Test at OpenRouter.ai
- Check account balance: Ensure API account has credits
- Verify username: Settings β
codeforces.username - Check internet: Ensure Codeforces API is accessible
- Try refresh:
Cmd+Shift+Pβ "CP Studio: Refresh Profile"
If the CP Studio logo appears white or not displaying properly:
-
Activity Bar Icon: The logo should appear in the activity bar (left sidebar). If it's white, try:
- Reload window:
Cmd+Shift+Pβ "Developer: Reload Window" - Check if logo file exists:
resources/logo.png - Ensure logo has transparent background (PNG format)
- Reload window:
-
Editor Toolbar Icons: Editor toolbar buttons use VS Code's codicons which automatically adapt to your theme. If icons appear white:
- Try switching to a dark theme (recommended: One Dark Pro or Dracula)
- Check theme contrast settings
- Icons should automatically match your theme's foreground color
-
Theme Compatibility: CP Studio's logo is optimized for dark themes. For best results, use one of the recommended cyber-professional themes listed in the Theme Suggestions section.
- β No Data Collection: Extension doesn't collect or store user data
- β Local Storage: All data stays on your machine
- β Encrypted Keys: API keys stored securely in VS Code settings
- β HTTPS Only: All API calls use secure connections
- β BYOK Model: You provide your own API keys
- β Open Source: Code is transparent and auditable
CP Studio is open source! Contributions are welcome and greatly appreciated. This extension is built by the community, for the community.
-
Fork the Repository
git clone https://github.com/rodriguescarson/cp-studio-ai.git cd cp-studio-ai -
Install Dependencies
npm install
-
Build the Extension
npm run compile # Or watch mode for development npm run watch -
Run in Development Mode
- Open the project in VS Code or Cursor
- Press
F5to launch Extension Development Host - A new window will open with the extension loaded
- Make changes and reload the window (
Cmd+RorCtrl+R) to see updates
-
Create a Branch
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix -
Make Your Changes
- Write clean, readable code
- Follow TypeScript best practices
- Add comments for complex logic
- Update documentation if needed
-
Test Your Changes
- Test in Extension Development Host (
F5) - Verify features work across platforms (Codeforces, LeetCode, GeeksforGeeks)
- Test edge cases and error handling
- Test in Extension Development Host (
-
Commit Your Changes
git add . git commit -m "feat: add new feature description" # Use conventional commits: feat:, fix:, docs:, refactor:, etc.
-
Push and Create Pull Request
git push origin feature/your-feature-name
- Open a Pull Request on GitHub
- Fill out the PR template
- Link any related issues
- TypeScript: Use TypeScript for all new code
- Formatting: Follow existing code style
- Naming: Use descriptive variable and function names
- Comments: Add JSDoc comments for public functions
- Error Handling: Always handle errors gracefully
π Bug Fixes
- Fix bugs you encounter
- Improve error messages
- Add better error handling
β¨ New Features
- Support for new competitive programming platforms
- UI/UX improvements
- Performance optimizations
- New problem set integrations
π Documentation
- Improve README
- Add code comments
- Write usage examples
- Create tutorials
π§ͺ Testing
- Add unit tests
- Test edge cases
- Verify cross-platform compatibility
-
Before Submitting
- Ensure code compiles (
npm run compile) - Test your changes thoroughly
- Update documentation if needed
- Follow the existing code style
- Ensure code compiles (
-
PR Description
- Clearly describe what changes you made
- Explain why the changes are needed
- Include screenshots for UI changes
- Reference related issues
-
Review Process
- Maintainers will review your PR
- Address any feedback or requested changes
- Be patient and responsive to comments
cp-studio-ai/
βββ src/ # TypeScript source files
β βββ extension.ts # Main entry point
β βββ contestSetup.ts # Problem setup logic
β βββ testRunner.ts # Test execution
β βββ aiAnalyzer.ts # AI integration
β βββ ... # Other modules
βββ resources/ # Assets (logo, icons)
βββ data/ # Problem set data (A2OJ, NeetCode, etc.)
βββ package.json # Extension manifest
βββ tsconfig.json # TypeScript config
βββ README.md # Documentation
Found a bug or have a feature request?
-
Check Existing Issues
- Search GitHub issues to avoid duplicates
- Check if it's already being worked on
-
Create an Issue
- Use the issue template
- Provide clear description
- Include steps to reproduce (for bugs)
- Add screenshots if relevant
- Specify your OS and VS Code/Cursor version
Have an idea for a new feature?
-
Check Existing Requests
- Search for similar feature requests
- Add your use case to existing discussions
-
Create Feature Request
- Use the feature request template
- Describe the feature clearly
- Explain the use case
- Consider implementation approach
- VS Code Extension API: https://code.visualstudio.com/api
- TypeScript Handbook: https://www.typescriptlang.org/docs/
- VS Code Extension Samples: https://github.com/microsoft/vscode-extension-samples
- Be respectful and inclusive
- Welcome newcomers and help them get started
- Focus on constructive feedback
- Celebrate contributions of all sizes
- π¬ Open a Discussion
- π Create an Issue
- π§ Email: rodriguescarson@gmail.com
Thank you for contributing to CP Studio! π
CP Studio is open source software licensed under the MIT License.
This means you are free to:
- β Use CP Studio for any purpose (commercial or personal)
- β Modify the code to suit your needs
- β Distribute the software
- β Use it privately
Requirements:
- Include the original copyright notice and license text
No Warranty:
- The software is provided "as is" without warranty
See the LICENSE file for full details.
Why MIT? MIT is one of the most permissive open source licenses, making it easy for developers to use, modify, and contribute to CP Studio. Perfect for a community-driven project!
Carson Rodrigues
Built with β€οΈ for competitive programmers worldwide.
- π Website: carsonrodrigues.com
- π CP Studio Page: carsonrodrigues.com/cp-studio-ai
- π» GitHub: @rodriguescarson
- πΌ LinkedIn: rodriguescarson
- β Buy Me a Coffee: buymeacoffee.com/rodriguescarson
- π§ Email: rodriguescarson@gmail.com
- Built for the competitive programming community
- Powered by Codeforces API, LeetCode, and GeeksforGeeks
- AI features via OpenRouter, OpenAI, and Anthropic
- Inspired by the need for a unified competitive programming workspace
Made with β€οΈ for competitive programmers
β Star on GitHub β’ π Project Page β’ π Report Issue β’ π Documentation
One extension. Multiple platforms. Zero confusion.