Skip to content

code-game-project/codegame-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codegame-cli

CG Server Version CG Client Version

The official CodeGame CLI.

Usage

View the CodeGame documentation:

codegame docs

Create a new project:

codegame new

Get information about a game server:

codegame info <url>

View the documentation of a game:

codegame docs <url>

Help:

codegame --help

Features

  • View the CodeGame documentation
  • View information about a game server
  • Automatic project setup
    • CodeGame version detection and management
    • Create a new client
      • Go
    • Create a new game server
      • Go
    • Initialize Git
    • Create README and LICENSE files

Installation

Windows

  1. Open the Start menu
  2. Search for powershell
  3. Hit Run as Administrator
  4. Paste the following commands and hit enter:

Install

Invoke-WebRequest -Uri "https://github.com/code-game-project/codegame-cli/releases/latest/download/codegame-cli-windows-amd64.zip" -OutFile "C:\Program Files\codegame-cli.zip"
Expand-Archive -LiteralPath "C:\Program Files\codegame-cli.zip" -DestinationPath "C:\Program Files\codegame-cli"
rm "C:\Program Files\codegame-cli.zip"
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value "$((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path);C:\Program Files\codegame-cli"

IMPORTANT: Please reboot for the installation to take effect.

Update

rm -r -fo "C:\Program Files\codegame-cli"
Invoke-WebRequest -Uri "https://github.com/code-game-project/codegame-cli/releases/latest/download/codegame-cli-windows-amd64.zip" -OutFile "C:\Program Files\codegame-cli.zip"
Expand-Archive -LiteralPath "C:\Program Files\codegame-cli.zip" -DestinationPath "C:\Program Files\codegame-cli"
rm "C:\Program Files\codegame-cli.zip"

macOS

Open the Terminal application, paste the command for your architecture and hit enter.

To update, simply run the command again.

x86_64

curl -L https://github.com/code-game-project/codegame-cli/releases/latest/download/codegame-cli-darwin-amd64.tar.gz | tar -xz codegame && sudo mv codegame /usr/local/bin

ARM64

curl -L https://github.com/code-game-project/codegame-cli/releases/latest/download/codegame-cli-darwin-arm64.tar.gz | tar -xz codegame && sudo mv codegame /usr/local/bin

Linux

Open a terminal, paste the command for your architecture and hit enter.

To update, simply run the command again.

x86_64

curl -L https://github.com/code-game-project/codegame-cli/releases/latest/download/codegame-cli-linux-amd64.tar.gz | tar -xz codegame && sudo mv codegame /usr/local/bin

ARM64

curl -L https://github.com/code-game-project/codegame-cli/releases/latest/download/codegame-cli-linux-arm64.tar.gz | tar -xz codegame && sudo mv codegame /usr/local/bin

Other

You can download a prebuilt binary file for your operating system on the releases page.

Compiling from source

Prerequisites

  • Go 1.18+
git clone https://github.com/code-game-project/codegame-cli.git
cd codegame-cli
go build .

License

Copyright (c) 2022 CodeGame Contributors (https://code-game.org/contributors)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

About

The official CodeGame CLI.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published