Installing the Hasura CLI

Install

Open your linux shell and run the following command:

curl -L https://cli.hasura.io/install.sh | bash

This will install the Hasura CLI in /usr/local/bin. You might have to provide your sudo password depending on the permissions of your /usr/local/bin location.

In your terminal enter the following command:

curl -L https://cli.hasura.io/install.sh | bash

This will install the Hasura CLI in /usr/local/bin. You might have to provide your sudo password depending on the permissions of your /usr/local/bin location.

Note

You should have git bash installed to use Hasura CLI. Download git bash using this link. Also, make sure you install it in MinTTY mode, instead of Windows’ default console.

Download the Hasura installer:

Note: Please run the installer as Administrator to avoid PATH update errors. If you’re still getting a “command not found” error after installing Hasura CLI, please restart git bash.

Alternatively, you can directly download the appropriate binary from: https://github.com/hasura/graphql-engine/releases

(Optional) Add shell completion

To add command auto completion in the shell

Refer to hasura completion