lazycph

command module
v0.0.0-...-756868b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 6 Imported by: 0

README

LazyCPH

A terminal UI for competitive programming.

LazyCPH Demo


Features

  • Run test cases against source files
  • Competitive Companion integration for automatic test case retrieval
  • Mouse support for panel selection and scrolling
  • Configurable language engines for compilation and execution

Installation

go install github.com/thecomputerm/lazycph@main

Usage

Run in the current directory to open the file picker:

lazycph

Open a specific solution file:

lazycph path/to/solution.cpp

Enable Competitive Companion integration:

lazycph --companion

Configuration

Custom engines can be defined in ~/.config/lazycph.json. This file merges with the default configuration. Use {file} as a placeholder for the source file and {temp} for the compiled binary path.

{
  "engines": {
    ".cpp": {
      "mode": "compile",
      "command": ["g++", "{file}", "-o", "{temp}", "-O3", "-std=c++20"]
    },
    ".js": {
      "mode": "interpret",
      "command": ["node", "{file}"]
    }
  }
}

Competitive Companion

LazyCPH integrates with the Competitive Companion browser extension. When running with the --companion or -c flag, LazyCPH listens on standard ports for problem data. Sending a problem from the browser will trigger a dialog to create the source file and automatically populate it with the provided test cases.

Integration with Zed

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/tasks.json
[
  {
    "label": "lazycph",
    "command": "lazycph",
    "args": ["$ZED_FILE"],
    "use_new_terminal": true,
  }
]
// ~/config/zed/keymap.json
{
  "context": "Workspace",
  "bindings": {
    "alt-g": [
      "task::Spawn",
      { "task_name": "lazycph", "reveal_target": "center" }
    ]
  }
}

Building from source

go build -o lazycph .

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL