Nhost CLI (beta)

The CLI is your primary interface when doing local development.

#Install

$ npm install -g nhost

#Dependencies

The Hasura CLI, Docker and Docker Compose are dependencies, please make sure to have those installed.

Hasura CLI version

Make sure you have at least the version of your Hasura version on Nhost. You can see your Hasura version on Nhost under Settings -> Hasura -> Hasura Version.

Check Hausra CLI

$ hasura version

Update your Hasura CLI:

$ hasura update-cli --version [version]

You can find Hasura's releases on their GitHub release page.

You might also need to update the cli-ext plugin:

$ hasura plugins cli-ext upgrade --version [version]

Since version Hasura version v2.0.0-alpha.5 the cli-ext plugin is a native part of the Hasura CLI and is no longer needed as a plugin.

#Usage

USAGE
  $ nhost [COMMAND]

COMMANDS
  deploy  Deploy local migrations to Nhost production
  dev     Start Nhost project for local development
  help    display help for nhost
  init    Initialize current working directory with a Nhost project
  login   Login to your Nhost account
  logout  Logout from your Nhost account

#Workflow

# login to your Nhost account
$ nhost login

# initialize working directory as a Nhost project
# please make sure to run it at the root of your project
$ nhost init

# start your development environment (Hasura, HBP, Postgres and Minio)
# Make sure Docker is already running on your machine.
$ nhost dev

#Beta

The CLI is still in beta, so please feel free to send us feedback, bug reports, and issues through the project's repo.