# gc-cli

`gc-cli` is Games Communities' command line, for developers and community officers. (It isn't called `gc`: in
PowerShell that's `Get-Content`.)

The login is saved in Games Communities' data folder, where the app finds it too. `--api=https://…` picks the service
until a login is saved; after that the saved one's service is used.

## Account

| Command | What it does |
| --- | --- |
| `gc-cli signup [--invite=CODE]` | Makes an account. |
| `gc-cli login` / `logout` / `whoami` | Logs in or out; says who you are. |
| `gc-cli 2fa [on\|off\|codes]` | Two-factor sign-in, and new backup codes. |

## Games

| Command | What it does |
| --- | --- |
| `gc-cli publish-native <folder> [--exe=Game.exe] [--title=...] [--note=...] [--set-live=<branch>]` | Uploads a build (only what changed). See [Publishing builds](../developers/publishing.md). |
| `gc-cli builds <ident>` | The game's builds. |
| `gc-cli set-live <ident> <build> [--branch=<branch>]` | Sets a build live (asks your two-factor code). |
| `gc-cli branch <ident> <name> [--description=...] [--password=...] [--delete]` | Makes, changes or deletes a branch. |
| `gc-cli games [search]` | Games on the store. |
| `gc-cli store-page <ident> <folder>` | Sends a store page from a folder. |
| `gc-cli news <ident> <title> [--body=...\|--body-file=...]` | Posts news. |
| `gc-cli game-status "<text>"` | Acts as a game on the app's game-status pipe, to try it. |

## Communities

| Command | What it does |
| --- | --- |
| `gc-cli dev <folder\|file> --community=<id> [--init] [--push] [--event=...] [--text=...] [--as=cat-1]` | Pulls, tries and pushes scripts. See [The script tools](../scripts/tools.md#gc-cli-dev). |
| `gc-cli page pull <folder> --community=<id>` | Downloads the page's draft. |
| `gc-cli page push <folder> --community=<id> [--publish]` | Sends a folder as the page's draft (and publishes it). |
| `gc-cli host` | Runs your private groups' scripts on this machine till Ctrl+C. See [Take it with you](../communities/take-it-with-you.md). |

## Admins

| Command | What it does |
| --- | --- |
| `gc-cli invites [count] [--note=...]` | Lists or makes invite codes. |
| `gc-cli publish-app <folder> [--sign=<key file>] [--rollout=<percent>] [--expires=<days>]` | Publishes an app release. |
| `gc-cli app-releases` | The app's releases. |
| `gc-cli app-rollout <version> <percent>` / `--halt` / `--resume` | Who gets a release. |
| `gc-cli release-key <key file> [--encrypt\|--no-passphrase]` | Makes the key that signs app releases. |
