Skip to content
Mehdi Cheracher edited this page Jan 14, 2021 · 1 revision

Assuming you have installed egor properly on your machine, try typing egor in your terminal, you should get an output similar to:


     ______
    / ____/___  _____ _____
   / __/ / __  / __ \/ ___/
  / /___/ /_/ / /_/ / /
 /_____/\__, /\____/_/
       /____/            version: 1.0.0
|------------------------------------>>
 - Run egor -help to print usage

USAGE:
   Run egor <subcommand> [--flags]*

DESCRIPTION:
   Competitive programming helper CLI

COMMANDS:
   parse, p            Parse task from navigator
   config, c           Read/Change global configuration parameters
   case, tc, testcase  Add custom test cases to egor task.
   showcases, sc       list meta data about tests cases in the current task
   copy, cp            Copy task file into clipboard
   printcase, pc       Print input and/or output of a given test case
   test, r             Run test cases using the provided solution
   create, c           Create a new task directory
   batch, b            Create and Run bach tests
   help, h             Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --dev       Set to true if you want detailed logs, useful in dev mode. (default: false)
   --help, -h  show help (default: false)

Every command comes with a --help option to help you figure out how to use it.

The flow of writing up a solution to a problem is usually like this:

  1. run egor parse to parse the problem (or the contest), this will startup a little HTTP server that will wait for Competitive companion's parser to send the JSON data for the current problem, this will generate a directory named after the current task name with a specific structure and a manifest file called egor-meta.json.
  2. after writing your solution in main.cpp or Main.java depending on your language of choice in your preferred editor, you should run egor test which will run your code against the sample cases and manually added cases and give you feedback about each one of them.
  3. If you are ready to submit your solution you can run egor copy which will copy the main solution to the clipboard so that you paste it into the online judge (and hopefully get AC).
  4. You can debug your solution by adding custom cases using egor case, or you can run your solution against random generated output using egor batch, you can find documentation for each of these commands in the wiki.
Clone this wiki locally