Installing the CLI
Please refer to this guide for information on how to use the gcsim CLI.
You have two options to obtain the gcsim CLI (gcsim.exe
):
- Downloading The CLI - recommended
- Building The CLI From Source
Assumptions
The following descriptions assume:
- Windows as the operating system
- main working folder where gcsim source code should be stored is called
TC
The file and folder names are just examples.
Downloading The CLI
The CLI (gcsim.exe
) for the latest version of gcsim can be downloaded from the Releases page of gcsim's GitHub repository.
Building The CLI From Source
Setup
Install Go
gcsim is mainly written in a programming langugage called Go. Download and install the latest version of Go from here.
Install Git
gcsim uses Git for version control. Download and install the latest version of Git for Windows from here.
Install IDE (VS Code)
In order to have a smooth experience while navigating the gcsim source code, it is recommend to install an IDE. For this guide, it is recommended to download and install VS Code from here.
Download Source Code
To obtain the gcsim source code, you need to clone gcsim's GitHub repository into a folder of your choice.
- Start VS Code.
- Open the
TC
folder in VS Code. - Click on
Terminal
in the top left menu. - Click on
New Terminal
. This will open Powershell in theTC
folder. - Type
git clone https://github.com/genshinsim/gcsim.git
into the Powershell window.
Your initial folder structure should now look like this:
└── TC
└── gcsim
Build The CLI (gcsim.exe)
- Start VS Code.
- Open the topmost
gcsim
folder in VS Code. - Click on
Terminal
in the top left menu. - Click on
New Terminal
. This will open Powershell in thegcsim
folder. - Type
cd cmd/gcsim
into the Powershell window. This will put you in the folder where you can build the CLI. - Type
go build
. This will create agcsim.exe
in the current folder.
Now your folder structure should look like this:
└── TC
└── gcsim 🡐 VS Code is here
└── cmd
└── gcsim 🡐 VS Code's Powershell window is here
└── gcsim.exe
If you modified your local gcsim source code and would like to try out the changes in the CLI, then just build the CLI again.
Apply Updates
In order to keep your CLI up-to-date with changes made by the gcsim dev team, you need to do the following occasionally:
- Start VS Code.
- Open the topmost
gcsim
folder in VS Code. - Click on
Terminal
in the top left menu. - Click on
New Terminal
. This will open Powershell in thegcsim
folder. - Type
git pull
into the Powershell window. - Rebuild the
gcsim.exe
as described in steps 5 and 6 in this section.