Installing the Hasura CLI¶
Step 1: Install¶
- Linux
- Mac
- Windows
Open your linux shell and run the following command:
curl -L https://cli.hasura.io/install.sh | bash
This will install the hasura
CLI tool 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 the following 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, please restart Gitbash.
Step 2: Login¶
- Linux
- Mac
- Windows
Next, login or register by running the following command:
hasura login
This command will open up the browser and allow you to register with a new account (or login to your existing account).
Next, login or register by running the following command:
hasura login
This command will open up the browser and allow you to register with a new account (or login to your existing account).
Next, open git-bash
(or restart git-bash
after installing Hasura CLI) and login/register:
hasura login
This command will open up the browser and allow you to register with a new account (or login to your existing account).
Troubleshooting¶
If you face any issue while logging in, check out the Troubleshooting section for an alternate login method.
(Optional) Add shell completion¶
To add command auto completion in the shell
Refer to hasura completion