# CLI reference

The tarball installs the executable at the stable path `/opt/particle_horizon/keystone-gateway`; the examples below shorten this to `keystone-gateway`. Run `keystone-gateway --help` for generated command help. Commands return zero on success and one on validation, I/O, or request failure.

<table><caption class="sr-only">CLI reference</caption><thead><tr><th scope="col">Command</th><th scope="col">Purpose</th><th scope="col">Key options</th></tr></thead><tbody><tr><td><code>serve --config FILE</code></td><td>Start Gateway</td><td>Every configuration key is also a <code>--dotted-key</code>-as-hyphenated flag; see <a href="https://portal.cjcit.io/knowledge-base/keystone_gateway/0.2/configuration/reference/">configuration reference</a>.</td></tr><tr><td><code>node-id --config FILE</code></td><td>Print JSON <code>{gateway_id,replica_id}</code> for license issuance</td><td>Same configuration overrides as <code>serve</code>. Does not read a license or host hardware.</td></tr><tr><td><code>config validate --config FILE</code></td><td>Resolve and validate configuration without starting</td><td>Same overrides as <code>serve</code>; checks field values and required file <em>paths</em>, not file readability.</td></tr><tr><td><code>report</code></td><td>Fetch a support report from a running Gateway</td><td><code>--endpoint</code> (default <code>http://127.0.0.1:8080</code>), `—format text</td></tr><tr><td><code>version [--short]</code></td><td>Print version metadata</td><td><code>--short</code> prints only version. Root <code>--version</code> prints the same metadata line.</td></tr></tbody></table>

The root persistent `--config FILE` applies to `serve`, `node-id`, and `config validate`; it is accepted by `report` but not used. Shell completion is generated by Cobra’s `completion` command. Do not put secrets in flags.
