Installing the Hasura CLI
How do I install Hasura CLI in my machine?
Installation - Mac & Linux
In your Terminal, run the following command:
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.
If you’d prefer to install to a different location other than /usr/local/bin
, set the env var INSTALL_PATH
:
There is another way to install Hasura via npm, but if you managed to install with the steps above you already have the super-powers you need to start working with migrations.
Installation - Windows
Download the binary cli-hasura-windows-amd64.exe
available under Assets
of the latest release from the GitHub release page: https://github.com/hasura/graphql-engine/releases
Rename the downloaded file to hasura
. You can add the path to the environment variable PATH
for making hasura
accessible globally.
For more info, refer to their documentation: https://hasura.io/docs/1.0/graphql/core/hasura-cli/install-hasura-cli.html
(Optional) Adding Hasura shell completion
If you want to hack the matrix, you may want to use autocomplete. The process is different for bash or zsh, so you will want to read their documentation in more detail.
For Mac (bash), run this command:
For Zsh (oh-my-zsh):
Last updated