Skip to main content
Version: v2.x

Hasura CLI

Introduction

The Hasura CLI is a command-line tool you can use to manage your Hasura instances.

We offer two primary methods for working with your Hasura instances: the Hasura Console and the Hasura CLI. While the Console is robust and provides an easy-to-navigate GUI for interacting with your project, the CLI offers a more powerful interface for managing your project.

The CLI is useful for:

You can use the CLI to initialize a new Hasura project from the very beginning, or you can use it to manage an existing one.

Installation

Installation is quick and easy with npm:

npm install -g hasura-cli

Or, if you prefer to install the binaries, check out our installation guide.

Usage

The CLI has a number of commands you can use to manage your project. You can see the full list of commands by running: hasura --help.

There are many subcommands too; you can see the available subcommands and their arguments by running a command with the --help flag, for example: hasura metadata --help.

After installing, we suggest getting started by heading to the CLI commands reference.