Instaling the Nhost CLI

To install the Nhost CLI copy the following command and paste it into your terminal:

sudo curl -L https://raw.githubusercontent.com/nhost/cli/main/get.sh | bash

The get.sh script checks for both the architecture and operating system and installs the right binary.

Supported Platforms:

  • MacOS
  • Linux
  • Windows WSL2

Dependencies:

Updating the Nhost CLI

Update an existing installation to the latest version.

Terminal
nhost sw upgrade

Running Nhost

Inside of the folder where you want to create your project, run:

Terminal
> nhost init

Initializing Nhost project
Successfully initialized Nhost project, run `nhost up` to start development

init will scaffold a bunch of files that Nhost uses to manage configuration, database schema and migrations, APIs, functions, etc.

With the project scaffolding in place, start the local Nhost instance with nhost up:

Terminal
> nhost up


Nhost development environment started.
URLs:
- Postgres:             postgres://postgres:postgres@localhost:5432/local
- Hasura:               https://local.hasura.nhost.run
- GraphQL:              https://local.graphql.nhost.run
- Auth:                 https://local.auth.nhost.run
- Storage:              https://local.storage.nhost.run
- Functions:            https://local.functions.nhost.run
- Dashboard:            https://local.dashboard.nhost.run
- Mailhog:              https://local.mailhog.nhost.run

SDK Configuration:
 Subdomain:             local
 Region:                (empty)

Run `nhost up` to reload the development environment
Run `nhost down` to stop the development environment
Run `nhost logs` to watch the logs

The following services are started:

  • Postgres
  • Hasura Console
  • GraphQL API
  • Authentication
  • Storage
  • Functions
  • Dashboard
  • Mailhog (SMTP server for testing emails locally)
Support for Nhost Run services is coming soon