UNPKG

stellate

Version:

The CLI you need to work with Stellate from your CLI. See https://docs.stellate.co/docs/cli for the complete documentation.

58 lines (37 loc) 1.84 kB
# Stellate CLI The CLI you need to work with Stellate from your CLI. See https://docs.stellate.co/docs/cli for the complete documentation. ## Commands ```sh login Authenticate the CLI init Setup a new Stellate service pull Pull the latest gateway config to the local stellate config file ls List all apps push Push the latest changes from stellate config file check Check for breaking changes to your schema (BETA) serve Use your local backend with Stellate’s GraphQL Edge Cache (BETA) subset Prints the subset of your schema according to the configured schema view (BETA) ``` every one of these can be suffixed with `--help` for additional information. ## Authentication The CLI will handle authentication automatically when necessary by opening a browser tab to create a API token. This token will be stored in the `~/.stellate` folder. ## Installation To install our dependencies ```sh yarn ``` ## Building To build the output ```sh yarn build ``` ## Use the CLI locally Building the CLI will create a file in `build/index.js`, you can run that file in Node.js to use the CLI: ```sh node ./build/index.js ``` For a more convenient usage you can also link the package by running `npm link`. This should make the `stellate` command available in your shell. ### Environments By default the CLI will interact with the production API. You can set an environment variable to point the CLI at different endpoints: - `STELLATE_ENDPOINT=staging` will point the CLI at the staging API - `STELLATE_ENDPOINT=local` will point the CLI at the local API running at `http://localhost:3001` The CLI will create different tokens for different environments. The files in the `~/.stellate` folder are prefixed with the value of `STELLATE_ENDPOINT` in order to persist multiple tokens at the same time.