# ficsit-cli [![push](https://github.com/satisfactorymodding/ficsit-cli/actions/workflows/push.yaml/badge.svg)](https://github.com/satisfactorymodding/ficsit-cli/actions/workflows/push.yaml) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/satisfactorymodding/ficsit-cli) ![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/satisfactorymodding/ficsit-cli) [![GitHub license](https://img.shields.io/github/license/satisfactorymodding/ficsit-cli)](https://github.com/satisfactorymodding/ficsit-cli/blob/master/LICENSE) ![GitHub all releases](https://img.shields.io/github/downloads/satisfactorymodding/ficsit-cli/total)
A CLI tool for managing mods for the game [Satisfactory](https://www.satisfactorygame.com/).
---
## Installation
## Usage
### Interactive CLI
To launch the interactive CLI, run the executable without any arguments.
All screens display control hints at the bottom.
### Command Line
Run `ficsit help` to see a list of available commands and flags.
## Managing Installations
Unlike [Satisfactory Mod Manager](https://github.com/satisfactorymodding/SatisfactoryModManager/),
ficsit-cli does not automatically detect installations.
First, locate your game install path.
Check the [Modding FAQ](https://docs.ficsit.app/satisfactory-modding/latest/faq.html#Files_GameInstall)
to learn how to find it given your specific install situation.
To add installations in the interactive CLI, use `Installations` > `new installation`.
To add installations from the command line, use `ficsit-cli installation add yourPathHere`.
## Troubleshooting
- Profile and installation records are located in `%APPDATA%\ficsit\`
- Downloads are cached in `%LOCALAPPDATA%\ficsit\downloadCache\`
Get help on the [modding Discord](https://discord.ficsit.app/).
## Development
### Dependencies
- [Go 1.21](https://go.dev/doc/install)
- IDE of Choice. Goland or VSCode suggested.
### Code Generation
If you update any of the GraphQL queries, run this to update generated code:
```bash
(echo "y") | npx graphqurl https://api.ficsit.app/v2/query --introspect -H 'content-type: application/json' > schema.graphql
go generate -tags tools -x ./...
```
If this command fails due to a mismatched schema,
you may need to use the url `https://api.ficsit.dev/v2/query` instead.
## Building
```bash
go build
```
Will produce `ficsit-cli.exe` in the repo root directory.
### Linting
Install `golangci-lint` via the directions [here](https://golangci-lint.run/usage/install/#local-installation),
but make sure to install the version specified in `.github/workflows/push.yaml` instead of whatever it suggests.
Then, to run it, use:
```bash
golangci-lint run --fix
```
### Updating generated docs
The files within `./docs` are generated using cobra, use the following to update
them.
```bash
go run tools.go
```