ficsit-cli-flake/README.md

151 lines
6.6 KiB
Markdown
Raw Normal View History

<!-- markdownlint-disable MD033 -->
<!-- markdownlint-disable MD041 -->
<img align="right" width="310" src="./.github/screenshot.png" alt="ficsit-cli screenshot" />
# 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)
2022-06-08 20:56:32 +00:00
A CLI tool for managing mods for the game [Satisfactory](https://www.satisfactorygame.com/).
2022-06-08 20:56:32 +00:00
---
2022-06-08 20:56:32 +00:00
## Installation
<table>
<tr>
<th></th>
<th>amd64</th>
<th>386</th>
<th>arm64</th>
<th>armv7</th>
<th>ppc64le</th>
</tr>
<tr>
<th>Windows</th>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_windows_amd64.exe">amd64</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_windows_386.exe">386</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_windows_arm64.exe">arm64</a></td>
2024-10-10 20:48:26 +00:00
<td>N/A</td>
<td>N/A</td>
</tr>
<tr>
<th>Arch</th>
<td colspan="5" style="text-align: center"><a href="https://aur.archlinux.org/packages/ficsit-cli-bin"><code>yay -S ficsit-cli-bin</code></a></td>
</tr>
<tr>
<th>Debian</th>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_amd64.deb">amd64</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_386.deb">386</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_arm64.deb">arm64</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_armv7.deb">armv7</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_ppc64le.deb">ppc64le</a></td>
</tr>
<tr>
<th>Fedora</th>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_amd64.rpm">amd64</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_386.rpm">386</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_arm64.rpm">arm64</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_armv7.rpm">armv7</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_ppc64le.rpm">ppc64le</a></td>
</tr>
<tr>
<th>Alpine</th>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_amd64.apk">amd64</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_386.apk">386</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_arm64.apk">arm64</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_armv7.apk">armv7</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_ppc64le.apk">ppc64le</a></td>
</tr>
<tr>
<th>Linux</th>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_amd64">amd64</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_386">386</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_arm64">arm64</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_armv7">armv7</a></td>
<td><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_linux_ppc64le">ppc64le</a></td>
</tr>
<tr>
<th>macOS</th>
<td colspan="4" style="text-align: center"><a href="https://github.com/satisfactorymodding/ficsit-cli/releases/latest/download/ficsit_darwin_all">darwin_all</a></td>
<td>N/A</td>
</tr>
</table>
2022-06-08 20:56:32 +00:00
## 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.
feat: compatibility info display in View Mod screen. log to ficsit-cli.log by default (#33) * fix: log by default (ficsit-cli.log in CWD) * chore: update readme with info on code generation * chore: regenerate docs for default log file location * feat: compatibility info state and note display. wip: keybind to switch view modes not working * fix: move render code out to a function, but it still isn't quite working yet * feat: display mod reference below mod name * Fix compat toggle with * Show scroll up/down on quick help * chore: fix merge conflict * chore: run go install mvdan.cc/gofumpt@latest; gofumpt -l -w . * chore: run gci.exe write --skip-generated -s standard -s default -s 'prefix(github.com/satisfactorymodding/ficsit-cli)' -s blank -s dot . * chore: update readme linting info and run golangci-lint --version * fix: log file is defaulted to empty again * fix(#33): update render to return just string * fix(#33): renderModInfo returns only string * fix(#33): reollback func namechange * refactor(#33): remove redundant viewport refresh * refactor(#33): update is not required after setting content * refactor(#33): remove unrequired log * docs(#33): update documentation to latest generated * docs(#33): update cache reference to not contain username * docs(#33): fix local dir references too * refactor(#33): replace vague variable with more helpful * Add directions about using dev schema when generate command fails * Fix issues from earlier merge conflict --------- Co-authored-by: Jack Stupple <jack.stupple@protonmail.com>
2023-12-28 02:32:56 +00:00
### 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.
feat: compatibility info display in View Mod screen. log to ficsit-cli.log by default (#33) * fix: log by default (ficsit-cli.log in CWD) * chore: update readme with info on code generation * chore: regenerate docs for default log file location * feat: compatibility info state and note display. wip: keybind to switch view modes not working * fix: move render code out to a function, but it still isn't quite working yet * feat: display mod reference below mod name * Fix compat toggle with * Show scroll up/down on quick help * chore: fix merge conflict * chore: run go install mvdan.cc/gofumpt@latest; gofumpt -l -w . * chore: run gci.exe write --skip-generated -s standard -s default -s 'prefix(github.com/satisfactorymodding/ficsit-cli)' -s blank -s dot . * chore: update readme linting info and run golangci-lint --version * fix: log file is defaulted to empty again * fix(#33): update render to return just string * fix(#33): renderModInfo returns only string * fix(#33): reollback func namechange * refactor(#33): remove redundant viewport refresh * refactor(#33): update is not required after setting content * refactor(#33): remove unrequired log * docs(#33): update documentation to latest generated * docs(#33): update cache reference to not contain username * docs(#33): fix local dir references too * refactor(#33): replace vague variable with more helpful * Add directions about using dev schema when generate command fails * Fix issues from earlier merge conflict --------- Co-authored-by: Jack Stupple <jack.stupple@protonmail.com>
2023-12-28 02:32:56 +00:00
### 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
```