Nhost CLI lets you run Nhost's development environment locally on macOS, Linux and Windows.
Download and install Nhost CLI for your platform by running this command in your terminal:
sudo curl -L https://raw.githubusercontent.com/nhost/cli/main/get.sh | bash
- Git must be installed on your system
- Docker must be installed and running when using Nhost CLI
To run serverless functions locally, you must have the appropriate runtimes installed on your machine:
For Node.js, you will also need to have express
installed in your repository:
npm install --save-dev express @types/express
If you have Windows Subsystem for Linux and
curl in your Windows environment, you run the command following the instructions above. It will download the
.exe binary to your current working directory.
If you do not have the above dependencies, download and install the latest release manually from GitHub releases
As of late 2021, Hasura does not yet have an M1 optimized version for their GraphQL engine, which Nhost depends on.
If you have a MacBook with an M1 chip, the CLI will automatically change the image used in
nhost/config.yaml of your app:
This will run the Hasura GraphQL engine using Rosetta on your machine until an M1 optimized image is launched.
If you already Nhost CLI installed, you can upgrade your installation:
# sudo permissions needed
sudo nhost upgrade
upgrade command was added in