{"id":16182760,"url":"https://github.com/snowfrogdev/cg-cli","last_synced_at":"2025-04-07T12:40:55.977Z","repository":{"id":66316891,"uuid":"363013757","full_name":"snowfrogdev/cg-cli","owner":"snowfrogdev","description":null,"archived":false,"fork":false,"pushed_at":"2021-06-05T18:12:58.000Z","size":1177,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-13T15:19:54.610Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snowfrogdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-30T03:18:18.000Z","updated_at":"2021-06-05T18:13:00.000Z","dependencies_parsed_at":"2023-02-26T20:30:44.766Z","dependency_job_id":null,"html_url":"https://github.com/snowfrogdev/cg-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowfrogdev%2Fcg-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowfrogdev%2Fcg-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowfrogdev%2Fcg-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowfrogdev%2Fcg-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snowfrogdev","download_url":"https://codeload.github.com/snowfrogdev/cg-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247655016,"owners_count":20974111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-10T06:43:47.610Z","updated_at":"2025-04-07T12:40:55.957Z","avatar_url":"https://github.com/snowfrogdev.png","language":"TypeScript","readme":"@snowfrog/cg-cli\n================\n\nA CLI for all your CodinGame needs\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/@snowfrog/cg-cli.svg)](https://npmjs.org/package/@snowfrog/cg-cli)\n[![CircleCI](https://circleci.com/gh/snowfrogdev/cg-cli/tree/master.svg?style=shield)](https://circleci.com/gh/snowfrogdev/cg-cli/tree/master)\n[![Downloads/week](https://img.shields.io/npm/dw/@snowfrog/cg-cli.svg)](https://npmjs.org/package/@snowfrog/cg-cli)\n[![License](https://img.shields.io/npm/l/@snowfrog/cg-cli.svg)](https://github.com/snowfrogdev/cg-cli/blob/master/package.json)\n\n\u003c!-- toc --\u003e\n* [Usage](#usage)\n* [Commands](#commands)\n\u003c!-- tocstop --\u003e\n\n# Usage\n\u003c!-- usage --\u003e\n```sh-session\n$ npm install -g @snowfrog/cg-cli\n$ cg COMMAND\nrunning command...\n$ cg (-v|--version|version)\n@snowfrog/cg-cli/0.9.1 win32-x64 node-v14.16.1\n$ cg --help [COMMAND]\nUSAGE\n  $ cg COMMAND\n...\n```\n\u003c!-- usagestop --\u003e\n\n# Commands\n\u003c!-- commands --\u003e\n* [`cg autocomplete [SHELL]`](#cg-autocomplete-shell)\n* [`cg bundle`](#cg-bundle)\n* [`cg help [COMMAND]`](#cg-help-command)\n* [`cg init`](#cg-init)\n* [`cg play [COUNT]`](#cg-play-count)\n\n## `cg autocomplete [SHELL]`\n\ndisplay autocomplete installation instructions\n\n```\nUSAGE\n  $ cg autocomplete [SHELL]\n\nARGUMENTS\n  SHELL  shell type\n\nOPTIONS\n  -r, --refresh-cache  Refresh cache (ignores displaying instructions)\n\nEXAMPLES\n  $ cg autocomplete\n  $ cg autocomplete bash\n  $ cg autocomplete zsh\n  $ cg autocomplete --refresh-cache\n```\n\n_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v0.3.0/src/commands/autocomplete/index.ts)_\n\n## `cg bundle`\n\nbundle your source code into one file that can be submitted to CodinGame\n\n```\nUSAGE\n  $ cg bundle\n\nOPTIONS\n  -c, --code=code\n      path to the file containing the code to be submitted to CodinGame\n\n  -h, --help\n      show CLI help\n\n  -l, \n  --language=Bash|C|C#|C++|Clojure|D|Dart|F#|Go|Groovy|Haskell|Java|Javascript|Kotlin|Lua|ObjectiveC|OCaml|Pascal|Perl|P\n  HP|Python3|Ruby|Rust|Scala|Swift|TypeScript|VB.NET\n      programming language of your bot source code\n\n  -s, --source=source\n      path to folder containing the source code to be bundled\n\n  --config=config\n      [default: ./cgconfig.json] path to config file\n```\n\n_See code: [src/commands/bundle.ts](https://github.com/snowfrogdev/cg-cli/blob/v0.9.1/src/commands/bundle.ts)_\n\n## `cg help [COMMAND]`\n\ndisplay help for cg\n\n```\nUSAGE\n  $ cg help [COMMAND]\n\nARGUMENTS\n  COMMAND  command to show help for\n\nOPTIONS\n  --all  see all commands in CLI\n```\n\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.2/src/commands/help.ts)_\n\n## `cg init`\n\ninitializes a CodinGame project by adding a cgconfig.json file\n\n```\nUSAGE\n  $ cg init\n\nOPTIONS\n  -h, --help  show CLI help\n```\n\n_See code: [src/commands/init.ts](https://github.com/snowfrogdev/cg-cli/blob/v0.9.1/src/commands/init.ts)_\n\n## `cg play [COUNT]`\n\nplay test session playouts between two bots\n\n```\nUSAGE\n  $ cg play [COUNT]\n\nARGUMENTS\n  COUNT  [default: 1] the number of games to play on the server. Must be bigger than 0\n\nOPTIONS\n  -c, --code=code\n      path to the file containing the code to be submitted to CodinGame\n\n  -h, --help\n      show CLI help\n\n  -i, --interactive\n      interactive menu to choose opponent(s) to agent 1\n\n  -l, \n  --language=Bash|C|C#|C++|Clojure|D|Dart|F#|Go|Groovy|Haskell|Java|Javascript|Kotlin|Lua|ObjectiveC|OCaml|Pascal|Perl|P\n  HP|Python3|Ruby|Rust|Scala|Swift|TypeScript|VB.NET\n      programming language of your bot source code\n\n  -o, --output\n      whether or not to output simulation data to file\n\n  -p, --puzzle=puzzle\n      name of puzzle or contest used by CodinGame API\n\n  -r, --replay\n      use the same game conditions as the last game.\n\n  --agent1=agent1\n      id of agent 1, a value of -1 means your own code, a value of -2 means the boss for the league\n\n  --agent2=agent2\n      id of agent 2, a value of -1 means your own code, a value of -2 means the boss for the league\n\n  --config=config\n      [default: ./cgconfig.json] path to config file\n\n  --outdir=outdir\n      directory in which to place the output data from simulation playthroughs, created if doesn't exist\n\n  --top10\n      play agent1 against the top 10 bots in the league\n\nEXAMPLE\n  $ cg play 10 -o\n  Reading config file... done\n  Validating inputs... done\n  Fetching test session id from CodinGame... done\n  Grabbing source code... done\n  Playing games...\n  ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ ETA: 0s | 10/10 | Agent1: 5 wins (50%) | Agent2: 5 wins (50%) | Margin of \n  Error: 32%\n  Writing game data... done\n```\n\n_See code: [src/commands/play.ts](https://github.com/snowfrogdev/cg-cli/blob/v0.9.1/src/commands/play.ts)_\n\u003c!-- commandsstop --\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowfrogdev%2Fcg-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnowfrogdev%2Fcg-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowfrogdev%2Fcg-cli/lists"}