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.
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:
# 1. Install bash-completion using homebrew:
$ brew install bash-completion
# 2. Add to your ~/.bash_profile:
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
# 3. Add the completion file:
$ sudo hasura completion bash --file=$(brew --prefix)/etc/bash_completion.d/hasura