{"id":36736979,"url":"https://github.com/code-game-project/codegame-cli","last_synced_at":"2026-01-12T12:24:06.345Z","repository":{"id":37530634,"uuid":"497300184","full_name":"code-game-project/codegame-cli","owner":"code-game-project","description":"The official CodeGame CLI.","archived":false,"fork":false,"pushed_at":"2023-05-01T15:39:16.000Z","size":299,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-06-19T13:41:03.258Z","etag":null,"topics":["cli"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code-game-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-05-28T11:38:07.000Z","updated_at":"2023-07-13T08:02:16.000Z","dependencies_parsed_at":"2024-06-19T13:27:26.098Z","dependency_job_id":"1ccb49ba-8102-44f7-81b2-d0284a407132","html_url":"https://github.com/code-game-project/codegame-cli","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/code-game-project/codegame-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-game-project%2Fcodegame-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-game-project%2Fcodegame-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-game-project%2Fcodegame-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-game-project%2Fcodegame-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-game-project","download_url":"https://codeload.github.com/code-game-project/codegame-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-game-project%2Fcodegame-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338976,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cli"],"created_at":"2026-01-12T12:24:05.378Z","updated_at":"2026-01-12T12:24:06.335Z","avatar_url":"https://github.com/code-game-project.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# codegame-cli\n![CodeGame Version](https://img.shields.io/badge/CodeGame-v0.6+-orange)\n\nThe official [CodeGame](https://code-game.org) CLI.\n\n**[Install](#installation)**\n\n## Commands\n\n### Docs and info\n\nView the CodeGame documentation:\n```\ncodegame docs\n```\n\nView the documentation of a game:\n```\ncodegame docs \u003curl\u003e\n```\n\nGet information about a game server:\n```\ncodegame info \u003curl\u003e\n```\n\n### Project templates\n\nCreate a new project:\n```\ncodegame new\n```\n\nUpdate event definitions, wrappers and libraries to match the latest game version:\n```\ncodegame update\n```\n\nPermanently switch to a different game URL:\n```\ncodegame change-url \u003cnew_url\u003e\n```\n\n### Running and building\n\nRun a project:\n```\ncodegame run\n```\n\nBuild a project:\n```\ncodegame build\n```\n\n### Session management\n\nList all sessions:\n```\ncodegame session list\n```\n\nShow session details:\n```\ncodegame session show\n```\n\nRemove a session:\n```\ncodegame session remove\n```\n\nExport a session to [CodeGame Share](https://share.code-game.org):\n```\ncodegame session export\n```\n\nImport a session from [CodeGame Share](https://share.code-game.org):\n```\ncodegame session import \u003cid\u003e\n```\n\n### Games\n\nList all games on a server:\n```\ncodegame game list \u003curl\u003e\n```\n\nCreate a new game on a server:\n```\ncodegame game create \u003curl\u003e\n```\n\n### Sharing with [CodeGame Share](https://share.code-game.org)\n\nShare a game:\n```\ncodegame share game\n```\n\nShare a spectate link:\n```\ncodegame share spectate\n```\n\nShare a session:\n```\ncodegame share session\n```\n\n### cg-gen-events\n\nDownload and execute the correct version of [cg-gen-events](https://github.com/code-game-project/cg-gen-events):\n```\ncodegame gen-events \u003cinput\u003e\n```\n\n### LSP\n\n#### CGE\n\nDownload and execute the correct version of [cge-ls](https://github.com/code-game-project/cg-gen-events/tree/main/cmd/cge-ls):\n```\ncodegame lsp cge\n```\n\n### cg-debug\n\nDownload and execute the correct version of [cg-debug](https://github.com/code-game-project/cg-debug):\n```\ncodegame debug \u003curl\u003e\n```\n\n### Completion\n\nGenerate an autocompletion script for codegame-cli for the specified shell:\n```\ncodegame completion \u003cbash|zsh|fish|powershell\u003e\n```\n\n### Help\n\nDisplay general help:\n```\ncodegame --help\n```\n\nDisplay help about a specific command:\n```\ncodegame help \u003ccmd\u003e\n```\n\nCheck for missing dependencies and misconfigurations:\n```\ncodegame doctor\n```\n\n## Installation\n\n### Windows\n\n[Download](https://github.com/code-game-project/codegame-cli/releases/latest/download/install.bat) and execute `install.bat`.\n\n### macOS/Linux\n\nPaste one of the following commands into a terminal window:\n\n#### curl\n\n```bash\ncurl -L https://raw.githubusercontent.com/code-game-project/codegame-cli/main/install.sh | bash\n```\n\n#### wget (in case curl is not installed)\n\n```bash\nwget -q --show-progress https://raw.githubusercontent.com/code-game-project/codegame-cli/main/install.sh -O- | bash\n```\n\n## Uninstallation\n\nTo remove codegame-cli from your system run:\n\n```bash\ncodegame uninstall\n```\n\n### Compiling from source\n\n#### Prerequisites\n\n- [Go](https://go.dev/) 1.18+\n\n```\ngit clone https://github.com/code-game-project/codegame-cli.git\ncd codegame-cli\ngo build -o codegame .\n```\n\n## Modules\n\nLanguage specific functionality is provided by modules.\n*codegame-cli* automatically downloads the correct module version corresponding to the CodeGame version and\nexecutes the downloaded binary at the root of the project directory with the respective command.\n\nAdditionally, the _CONFIG_FILE_ environment variable is set with the path to a temporary file containing command specific configuration in JSON format.\n\nModules can be implemented in any language. However, it is recommended to write them in Go\nusing the `github.com/code-game-project/go-utils` and `github.com/Bananenpro/cli` packages in order to avoid bugs and be consistent with the CLI and other modules.\n\n### new\n\nCreates a new project of the type provided by a second command line argument:\n\n#### client\n\nCreates a new game client.\nThis includes integration with the client library for the language, a functioning template with a main file and language specific metadata files like `package.json` or similar\nand wrappers around the library to make its usage easier including setting the game URL with the CG_GAME_URL environment variable (required).\n\n##### config data\n\n```jsonc\n{\n\t\"lang\": \"go\", // the chosen programming language (in case one module supports multiple languages)\n\t\"name\": \"my_game\", // the name of the game\n\t\"url\": \"my_game.example.com\", // the URL of the game server\n\t\"library_version\": \"0.9.2\" // the version of the client library to use\n}\n```\n\n#### server\n\nCreates a new game server.\nThis includes integration with the server library of the language and a functioning template, which implements common logic like starting the server and providing a game class.\n\n##### config data\n\n```jsonc\n{\n\t\"lang\": \"go\", // the chosen programming language (in case one module supports multiple languages)\n\t\"library_version\": \"0.9.2\" // the version of the server library to use\n}\n```\n\n### update\n\nUpdates the library to the specified version and all other dependencies used by the project to their newest compatible version.\nAdditionally all wrappers are updated.\n\n##### config data\n\n```jsonc\n{\n\t\"lang\": \"go\", // the chosen programming language (in case one module supports multiple languages)\n\t\"library_version\": \"0.9.2\" // the new version of the library to use\n}\n\n```\n\n### run\n\nRuns the project with the specified command line arguments and the *CG_GAME_URL* environment variable set to the URL specified in the `.codegame.json` file.\n\n##### config data\n\n```jsonc\n{\n\t\"lang\": \"go\", // the chosen programming language (in case one module supports multiple languages)\n\t\"args\": [\"-f\", \"my_file.txt\"] // the command line arguments for the application\n}\n```\n\n### build\n\nBuilds the projects and injects the URL specified in the `.codegame.json` file, which makes the *CG_GAME_URL* environment variable optional.\n\n##### config data\n\n```jsonc\n{\n\t\"lang\": \"go\", // the chosen programming language (in case one module supports multiple languages)\n\t\"output\": \"bin/my-game\" // The name of the output file\n}\n```\n\n## License\n\nCopyright (c) 2022-2023 Julian Hofmann\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-game-project%2Fcodegame-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-game-project%2Fcodegame-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-game-project%2Fcodegame-cli/lists"}