# Hive CLI (Command Line Interface) [Hive](https://the-guild.dev/graphql/hive) is a fully open-source schema registry, analytics, metrics and gateway for [GraphQL federation](https://the-guild.dev/graphql/hive/federation) and other GraphQL APIs. --- A CLI util to manage and control your Hive. [![Version](https://img.shields.io/npm/v/@graphql-hive/cli.svg)](https://npmjs.org/package/@graphql-hive/cli) ## Installation ### NodeJS If you are running a JavaScript/NodeJS project, you can install Hive CLI from the `npm` registry: ``` pnpm install -D @graphql-hive/cli yarn add -D @graphql-hive/cli npm install -D @graphql-hive/cli ``` > We recommend installing Hive CLI as part of your project, under `devDependencies`, instead of > using a global installation. ### Binary If you are running a non-JavaScript project, you can download the prebuilt binary of Hive CLI using the following command: ```bash curl -sSL https://graphql-hive.com/install.sh | sh ``` ## Commands - [`hive app:create FILE`](#hive-appcreate-file) - [`hive app:publish`](#hive-apppublish) - [`hive app:retire`](#hive-appretire) - [`hive artifact:fetch`](#hive-artifactfetch) - [`hive dev`](#hive-dev) - [`hive help [COMMAND]`](#hive-help-command) - [`hive introspect LOCATION`](#hive-introspect-location) - [`hive operations:check FILE`](#hive-operationscheck-file) - [`hive schema:check FILE`](#hive-schemacheck-file) - [`hive schema:delete SERVICE`](#hive-schemadelete-service) - [`hive schema:fetch [COMMIT]`](#hive-schemafetch-commit) - [`hive schema:publish FILE`](#hive-schemapublish-file) - [`hive update [CHANNEL]`](#hive-update-channel) - [`hive whoami`](#hive-whoami) ## `hive app:create FILE` create an app deployment ``` USAGE $ hive app:create FILE --name --version [--debug] [--registry.endpoint ] [--registry.accessToken ] [--target ] ARGUMENTS FILE Path to the persisted operations mapping. FLAGS --debug Whether debug output for HTTP calls and similar should be enabled. --name= (required) app name --registry.accessToken= registry access token --registry.endpoint= registry endpoint --target= The target in which the app deployment will be created. This can either be a slug following the format "$organizationSlug/$projectSlug/$targetSlug" (e.g "the-guild/graphql-hive/staging") or an UUID (e.g. "a0f4c605-6541-4350-8cfe-b31f21a4bf80"). --version= (required) app version DESCRIPTION create an app deployment ``` _See code: [src/commands/app/create.ts](https://github.com/graphql-hive/platform/blob/v0.57.1/src/commands/app/create.ts)_ ## `hive app:publish` publish an app deployment ``` USAGE $ hive app:publish --name --version [--debug] [--registry.endpoint ] [--registry.accessToken ] [--target ] FLAGS --debug Whether debug output for HTTP calls and similar should be enabled. --name= (required) app name --registry.accessToken= registry access token --registry.endpoint= registry endpoint --target= The target in which the app deployment will be published (slug or ID). This can either be a slug following the format "$organizationSlug/$projectSlug/$targetSlug" (e.g "the-guild/graphql-hive/staging") or an UUID (e.g. "a0f4c605-6541-4350-8cfe-b31f21a4bf80"). --version= (required) app version DESCRIPTION publish an app deployment ``` _See code: [src/commands/app/publish.ts](https://github.com/graphql-hive/platform/blob/v0.57.1/src/commands/app/publish.ts)_ ## `hive app:retire` retire an app deployment ``` USAGE $ hive app:retire --name --version [--debug] [--registry.endpoint ] [--registry.accessToken ] [--target ] FLAGS --debug Whether debug output for HTTP calls and similar should be enabled. --name= (required) app name --registry.accessToken= registry access token --registry.endpoint= registry endpoint --target= The target in which the app deployment will be retired (slug or ID). This can either be a slug following the format "$organizationSlug/$projectSlug/$targetSlug" (e.g "the-guild/graphql-hive/staging") or an UUID (e.g. "a0f4c605-6541-4350-8cfe-b31f21a4bf80"). --version= (required) app version DESCRIPTION retire an app deployment ``` _See code: [src/commands/app/retire.ts](https://github.com/graphql-hive/platform/blob/v0.57.1/src/commands/app/retire.ts)_ ## `hive artifact:fetch` fetch artifacts from the CDN ``` USAGE $ hive artifact:fetch --artifact sdl|supergraph|metadata|services|sdl.graphql|sdl.graphqls [--debug] [--cdn.endpoint ] [--cdn.accessToken ] [--outputFile ] FLAGS --artifact=