A beautiful Terminal User Interface (TUI) for competitive programming that helps you test your solutions quickly and efficiently.
- Beautiful TUI - Modern terminal interface built with Textual
- Competitive Companion - Compatible with the competitive companion browser extension
- Easy CRUD - Create, manage, and run multiple test cases for your solution
- Multiple Languages - C,C++,Python,Rust,Zig are supported out of the box
- Fast - Edit and Run your testcases quickly
pipx install lazycph
# or
uv tool install lazycphOr if you prefer a standalone single-file binary; you can clone and setup the project, see CONTIBUTING, and then run uv run task build to generate the binary in the dist/ folder.
Launch LazyCPH in the current directory:
lazycphLaunch in a specific directory:
lazycph /path/to/your/codeOpen a specific file:
lazycph solution.pyLazyCPH also allows you to import problems and testcases directly from platforms like codeforces use the competitive companion browser extension.
lazycph --companion
# or
lazycph -ccompanion.mp4
You can easily integrate LazyCPH with the Zed editor for a seamless competitive programming experience. You just need to configure a task and bind it to a shortcut key.
// ~/config/zed/keymap.json
{
"context": "Workspace",
"bindings": {
"alt-g": [
"task::Spawn",
{ "task_name": "lazycph", "reveal_target": "center" }
]
}
}zed.mp4
You can also run LazyCPH in a web browser (for whatever reason you desire) because it's made with Textual, first create a file name web.py in the folder with your source code.
# /// script
# dependencies = ["textual-serve"]
# ///
from textual_serve.server import Server
server = Server(f"uvx lazycph")
server.serve()And then run:
uv run web.pySo now whenever you press your keybind (alt+g in this case), a new terminal window opens with LazyCPH running on the current file. See how it looks.
Want to contribute? Check out the CONTRIBUTING.md for setup instructions and development guidelines.
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is open source and available under the MIT License.
Built for competitive programmers who want the features of CPH VSCode extension in any IDE or terminal.