# graphql-cli **Repository Path**: mirrors_felixfbecker/graphql-cli ## Basic Information - **Project Name**: graphql-cli - **Description**: 🔪🥒 Swiss Army Knife for your GraphQL Project - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-03-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # graphql-cli [![npm version](https://badge.fury.io/js/graphql-cli.svg)](https://badge.fury.io/js/graphql-cli) 🔪🥒 Swiss Army Knife for your GraphQL Project ## Features - Helpful commands to improve your workflows like `get-schema`, `diff` & `playground` - Compatible with editors and IDEs based on [`graphql-config`](https://github.com/graphcool/graphql-config) - Powerful plugin system to extend `graphql-cli` with custom commands You can see it in action here: ![demo](http://imgur.com/0kuqZFY.gif) ## Install You can simply install the CLI using `npm` or `yarn` by running the following command. This will add the `graphql` (and shorter `gql`) binary to your path. ```sh npm install -g graphql-cli ``` ## Usage ``` Usage: graphql [command] Commands: init Initial config setup add-endpoint Add new endpoint to .graphqlconfig get-schema [endpoint] Download schema from endpoint schema-status Show source and timestamp of the local schema file ping [endpointName] Ping GraphQL endpoint diff [to] Show a diff between two schemas playground [endpoint] Open interactive GraphQL Playground Options: --help Show help [boolean] Examples: graphql init Interactively setup .graphqlconfig file graphql get-schema dev Update local schema to match "dev" endpoint graphql diff dev prod Show schema diff between "dev" and "prod" endpoints For more information go to https://github.com/graphcool/graphql-cli ``` ### Initial setup and schema download ### Listen to schema changes ### Autocompletion setup To install autocompletion in your terminal run ``` graphql completion >> ~/.bashrc ``` or on OSX ```sh graphql completion >> ~/.bash_profile ``` ## Plugins - [`graphql-cli-voyager`](https://github.com/graphcool/graphql-cli-voyager) - Open [graphql-voyager](https://github.com/APIs-guru/graphql-voyager) in your browser - `graphql-cli-faker` (*coming soon*) - Run a fake server based on your schema using [graphql-faker](https://github.com/APIs-guru/graphql-faker) - [`graphql-cli-codegen`](https://github.com/rricard/graphql-cli-codegen) - Generates type annotation from your GraphQL queries using [`apollo-codegen`](https://github.com/apollographql/apollo-codegen). Do you want to create your own plugin? [Here is a simple example.](plugin-example) ## Contributors A big thank you to all contributors and supporters of this repository 💚 IvanGoncharov RomanGotsiy schickling ## Help & Community [![Slack Status](https://slack.graph.cool/badge.svg)](https://slack.graph.cool) Join our [Slack community](http://slack.graph.cool/) if you run into issues or have questions. We love talking to you! ![](http://i.imgur.com/5RHR6Ku.png)