CLI
Install, authenticate, and script the gmc command-line client for Game Market Copilot.
If you are connecting an AI agent such as Claude Code or Codex, start with the GMC MCP instead; it is the recommended integration. The CLI is the right tool for shell-first workflows, scripts, and CI.
Install
The CLI ships as the npm package @witchpot/gmc and requires Node.js 20 or
later.
npm install -g @witchpot/gmc@beta
@beta is the current release channel; install with that dist-tag until a
stable channel is announced.
The package installs three equivalent binaries: gmc, gmcp, and
game-market-copilot. Some shell setups (for example Oh My Zsh’s git plugin)
alias gmc to a git command. If gmc doesn’t behave like the CLI in your
shell, use gmcp instead for every call; it is the exact same tool.
Log in
gmc login
This opens your browser for an OAuth flow with PKCE and a loopback callback.
On success, the CLI stores a CLI credential in ~/.config/gmc/config.json
(created with 0600 permissions). This is the recommended path for local
development.
To use a long-lived API key instead (created in the GMC dashboard under Settings -> API), skip the browser flow:
gmc login --api-key gmc_...
Check what’s active:
gmc auth status --json
Log out (revokes the stored CLI credential and removes it from local config; API keys are unaffected and stay valid until revoked in Settings):
gmc logout
See /api/overview for how API keys, CLI credentials, and MCP tokens differ.
Configuration
gmc config get
gmc config set apiBaseUrl <url>
Config is read from ~/.config/gmc/config.json by default. Environment
variables override the config file and are the preferred approach for CI:
| Variable | Purpose |
|---|---|
GMC_API_KEY |
Workspace API key; sent as the bearer token. |
GMC_CLI_CREDENTIAL |
CLI credential from gmc login; sent as the bearer token. |
GMC_API_BASE_URL |
Overrides the API base URL (defaults to https://gamemarketcopilot.com). |
GMC_CONFIG_PATH |
Overrides the config file path. |
Output shaping
Every data command supports --json for structured output; use it for
scripts and agent workflows (gmc skill print is the exception: it emits
raw Markdown regardless of flags). Most read commands also support:
--fields <list>: return only the listed fields, comma-separated.--preset <name>: apply a named output shape where supported.
Exit codes
| Code | Meaning |
|---|---|
| 1 | Unexpected error. |
| 2 | Usage error (bad arguments). |
| 3 | Configuration missing or invalid. |
| 4 | API error (the request reached the server and it returned an error). |
Command families
Run gmc schema --json for the authoritative, machine-readable list of
commands and parameters. This page documents the families, not the full
reference, since the schema output is generated from the same contract as the
API and stays current automatically.
- Status and discovery:
gmc status,gmc auth status,gmc schema,gmc tags. - Games:
gmc games search,count,aggregate,resolve,detail,analysis,success-report,compare,topics,benchmark. - Lists:
gmc lists, and subcommands to create a list and manage its games. - Cohort analysis:
gmc cohort trends,pricing,compare,brief. - Showcases:
gmc showcases search,fit,patterns. - Reviews, marketing, creators, campaigns: pattern and signal commands
such as
gmc reviews patterns,gmc marketing patterns,gmc marketing timing,gmc creators patterns,gmc campaigns signals.
Commands that accept a --tags filter reject unknown slugs with a 400
INVALID_TAG error and a suggestions payload. Run gmc tags --q <term> first
to resolve a genre or keyword to valid slugs before building a filter.
Updating
gmc update
This prints manual update instructions (the current version, and the
npm install/npx commands to run) rather than updating itself. To update,
re-run the install command from the top of this page.
See also
/api/overviewfor authentication modes, the response envelope, errors, and credit/rate-limit behavior. The CLI is a thin client over the same API and inherits all of it./api/endpointsfor the endpoint families the CLI commands map onto./agents/mcpfor agent access over MCP instead of the CLI.