Skip to content

Nhost CLI Reference

nhost - A new cli application

nhost

[--branch]=[value]
[--dot-nhost-folder]=[value]
[--help|-h]
[--local-subdomain]=[value]
[--nhost-folder]=[value]
[--project-name]=[value]
[--root-folder]=[value]
[--version|-v]

Nhost CLI tool

Usage:

nhost [GLOBAL OPTIONS] [command [COMMAND OPTIONS]] [ARGUMENTS...]

—branch="": Git branch name. If not set, it will be detected from the current git repository. This flag is used to dynamically create docker volumes for each branch. If you want to have a static volume name or if you are not using git, set this flag to a static value. (default: <current-git-branch>) [$BRANCH]

—dot-nhost-folder="": Path to .nhost folder (default: “.nhost”) [$NHOST_DOT_NHOST_FOLDER]

—help, -h: show help

—local-subdomain="": Local subdomain to reach the development environment (default: “local”) [$NHOST_LOCAL_SUBDOMAIN]

—nhost-folder="": Path to nhost folder (default: “nhost”) [$NHOST_NHOST_FOLDER]

—project-name="": Project name (default: <project-directory-name>) [$NHOST_PROJECT_NAME]

—root-folder="": Root folder of project (default: ”.”) [$NHOST_ROOT_FOLDER]

—version, -v: print the version

Perform config operations

—help, -h: show help

Create default configuration and secrets

—help, -h: show help

Shows a list of commands or help for one command

Shows an example config file

—help, -h: show help

Shows a list of commands or help for one command

Apply configuration to cloud project

—help, -h: show help

—subdomain="": Subdomain of the Nhost project to apply configuration to. Defaults to linked project [$NHOST_SUBDOMAIN]

—yes: Skip confirmation [$NHOST_YES]

Shows a list of commands or help for one command

Get cloud configuration

—help, -h: show help

—subdomain="": Pull this subdomain’s configuration. Defaults to linked project [$NHOST_SUBDOMAIN]

—yes: Skip confirmation [$NHOST_YES]

Shows a list of commands or help for one command

Shows configuration after resolving secrets

—help, -h: show help

—subdomain="": Show this subdomain’s rendered configuration. Defaults to base configuration [$NHOST_SUBDOMAIN]

Shows a list of commands or help for one command

Validate configuration

—help, -h: show help

—subdomain="": Validate this subdomain’s configuration. Defaults to linked project [$NHOST_SUBDOMAIN]

Shows a list of commands or help for one command

Edit base configuration or an overlay

—editor="": Editor to use (default: “vim”) [$EDITOR]

—help, -h: show help

—subdomain="": If specified, edit this subdomain’s overlay, otherwise edit base configuation [$NHOST_SUBDOMAIN]

Shows a list of commands or help for one command

Shows a list of commands or help for one command

Manage deployments

—help, -h: show help

List deployments in the cloud environment

—help, -h: show help

—subdomain="": Project’s subdomain to operate on, defaults to linked project [$NHOST_SUBDOMAIN]

Shows a list of commands or help for one command

View deployments logs in the cloud environment

—follow: Specify if the logs should be streamed

—help, -h: show help

—subdomain="": Project’s subdomain to operate on, defaults to linked project [$NHOST_SUBDOMAIN]

—timeout="": Specify the timeout for streaming logs (default: 5m0s)

Shows a list of commands or help for one command

[EXPERIMENTAL] Create a new deployment

—follow: Specify if the logs should be streamed. If set, the command will wait for the deployment to finish and stream the logs. If the deployment fails the command will return an error.

—help, -h: show help

—message="": Commit message

—ref="": Git reference [$GITHUB_SHA]

—subdomain="": Project’s subdomain to operate on, defaults to linked project [$NHOST_SUBDOMAIN]

—timeout="": Specify the timeout for streaming logs (default: 5m0s)

—user="": Commit user name [$GITHUB_ACTOR]

—user-avatar-url="": Commit user avatar URL

Shows a list of commands or help for one command

Shows a list of commands or help for one command

Operate local development environment

—help, -h: show help

docker compose wrapper, sets project name and compose file automatically

—help, -h: show help

Shows a list of commands or help for one command

hasura-cli wrapper

—help, -h: show help

Shows a list of commands or help for one command

Shows a list of commands or help for one command

Start local development environment

—apply-seeds: Apply seeds. If the .nhost folder does not exist, seeds will be applied regardless of this flag [$NHOST_APPLY_SEEDS]

—auth-port="": If specified, expose auth on this port. Not recommended (default: 0)

—ca-certificates="": Mounts and everrides path to CA certificates in the containers [$NHOST_CA_CERTIFICATES]

—dashboard-version="": Dashboard version to use (default: “nhost/dashboard:2.47.0”) [$NHOST_DASHBOARD_VERSION]

—disable-tls: Disable TLS [$NHOST_DISABLE_TLS]

—down-on-error: Skip confirmation [$NHOST_YES]

—functions-port="": If specified, expose functions on this port. Not recommended (default: 0)

—hasura-console-port="": If specified, expose hasura console on this port. Not recommended (default: 0)

—hasura-port="": If specified, expose hasura on this port. Not recommended (default: 0)

—help, -h: show help

—http-port="": HTTP port to listen on (default: 443) [$NHOST_HTTP_PORT]

—postgres-port="": Postgres port to listen on (default: 5432) [$NHOST_POSTGRES_PORT]

—run-service="": Run service to add to the development environment. Can be passed multiple times. Comma-separated values are also accepted. Format: /path/to/run-service.toml[:overlay_name] [$NHOST_RUN_SERVICE]

—storage-port="": If specified, expose storage on this port. Not recommended (default: 0)

Start local development environment connected to an Nhost Cloud project (BETA)

—apply-seeds: Apply seeds. If the .nhost folder does not exist, seeds will be applied regardless of this flag [$NHOST_APPLY_SEEDS]

—ca-certificates="": Mounts and everrides path to CA certificates in the containers [$NHOST_CA_CERTIFICATES]

—dashboard-version="": Dashboard version to use (default: “nhost/dashboard:2.47.0”) [$NHOST_DASHBOARD_VERSION]

—disable-tls: Disable TLS [$NHOST_DISABLE_TLS]

—down-on-error: Skip confirmation [$NHOST_YES]

—hasura-console-port="": If specified, expose hasura console on this port. Not recommended (default: 0)

—help, -h: show help

—http-port="": HTTP port to listen on (default: 443) [$NHOST_HTTP_PORT]

—postgres-url="": Postgres URL [$NHOST_POSTGRES_URL]

—subdomain="": Project’s subdomain to operate on, defaults to linked project [$NHOST_SUBDOMAIN]

Shows a list of commands or help for one command

Shows a list of commands or help for one command

Stop local development environment

—help, -h: show help

—volumes: Remove volumes

Shows a list of commands or help for one command

Show logs from local development environment

—help, -h: show help

Shows a list of commands or help for one command

Perform docker-credentials operations

—help, -h: show help

Install credentials helper and configure docker so it can authenticate with Nhost’s registry

—docker-config="": Path to docker config file (default: $HOME/.docker/config.json) [$DOCKER_CONFIG]

—help, -h: show help

—no-interactive: Do not prompt for confirmation [$NO_INTERACTIVE]

Shows a list of commands or help for one command

Shows a list of commands or help for one command

Model Context Protocol (MCP) related commands

—config-file="": Configuration file path. Defaults to $NHOST_DOT_NHOST_FOLDER/nhost-mcp.toml [$NHOST_MCP_CONFIG_FILE]

—help, -h: show help

Generate and save configuration file

—confirm: Skip confirmation prompt [$CONFIRM]

—help, -h: show help

Dump the configuration to stdout for verification

—help, -h: show help

Shows a list of commands or help for one command

Shows a list of commands or help for one command

Starts the MCP server

—bind="": Bind address in the form $host:$port. If omitted use stdio [$BIND]

—help, -h: show help

Shows a list of commands or help for one command

Generate GraphQL schema for Nhost Cloud

—help, -h: show help

—nhost-pat="": Personal Access Token [$NHOST_PAT]

—with-mutations: Include mutations in the generated schema [$WITH_MUTATIONS]

Shows a list of commands or help for one command

Shows a list of commands or help for one command

Initialize a new Nhost project

—help, -h: show help

—remote: Initialize pulling configuration, migrations and metadata from the linked project [$NHOST_REMOTE]

Shows a list of commands or help for one command

List remote apps

—help, -h: show help

Shows a list of commands or help for one command

Link local app to a remote one

—help, -h: show help

Shows a list of commands or help for one command

Access embedded documentation

—help, -h: show help

List all documentation pages

—grouped: Show pages organized by section

—help, -h: show help

—summary: Show page descriptions

Shows a list of commands or help for one command

Search documentation pages

—help, -h: show help

—limit, -n="": Maximum number of results to return (default: 5)

Shows a list of commands or help for one command

Display contents of a documentation page

—help, -h: show help

—raw: Show raw MDX content including frontmatter

Shows a list of commands or help for one command

Shows a list of commands or help for one command

Perform operations on Nhost Run

—help, -h: show help

Shows Run service configuration after resolving secrets

—config="": Service configuration file (default: “nhost-run-service.toml”) [$NHOST_RUN_SERVICE_CONFIG]

—help, -h: show help

—overlay-name="": If specified, apply this overlay [$NHOST_RUN_SERVICE_ID, $NHOST_SERVICE_OVERLAY_NAME]

Shows a list of commands or help for one command

Deploy service configuration

—config="": Service configuration file (default: “nhost-run-service.toml”) [$NHOST_RUN_SERVICE_CONFIG]

—help, -h: show help

—service-id="": Service ID to update. Applies overlay of the same name [$NHOST_RUN_SERVICE_ID]

Shows a list of commands or help for one command

Edit service configuration

—config="": Service configuration file (default: “nhost-run-service.toml”) [$NHOST_RUN_SERVICE_CONFIG]

—editor="": Editor to use (default: “vim”) [$EDITOR]

—help, -h: show help

—overlay-name="": If specified, apply this overlay [$NHOST_RUN_SERVICE_ID, $NHOST_SERVICE_OVERLAY_NAME]

Shows a list of commands or help for one command

Edits configuration file and sets the image

—config="": Service configuration file (default: “nhost-run-service.toml”) [$NHOST_RUN_SERVICE_CONFIG]

—help, -h: show help

—image="": Image to use [$NHOST_RUN_SERVICE_IMAGE]

Shows a list of commands or help for one command

Download service configuration

—config="": Service configuration file (default: “nhost-run-service.toml”) [$NHOST_RUN_SERVICE_CONFIG]

—help, -h: show help

—service-id="": Service ID to update [$NHOST_RUN_SERVICE_ID]

Shows a list of commands or help for one command

Validates service configuration after resolving secrets

—config="": Service configuration file (default: “nhost-run-service.toml”) [$NHOST_RUN_SERVICE_CONFIG]

—help, -h: show help

—overlay-name="": If specified, apply this overlay [$NHOST_SERVICE_OVERLAY_NAME]

—service-id="": If specified, apply this overlay and remote secrets for this service [$NHOST_RUN_SERVICE_ID]

Shows a list of commands or help for one command

Shows an example config file

—help, -h: show help

Shows a list of commands or help for one command

Outputs environment variables. Useful to generate .env files

—config="": Service configuration file (default: “nhost-run-service.toml”) [$NHOST_RUN_SERVICE_CONFIG]

—help, -h: show help

—overlay-name="": If specified, apply this overlay [$NHOST_RUN_SERVICE_ID, $NHOST_SERVICE_OVERLAY_NAME]

—prepend-export: Prepend ‘export’ to each line [$NHOST_RuN_SERVICE_ENV_PREPEND_EXPORT]

Shows a list of commands or help for one command

Shows a list of commands or help for one command

Manage secrets

—help, -h: show help

Create secret in the cloud environment

—help, -h: show help

—subdomain="": Project’s subdomain to operate on, defaults to linked project [$NHOST_SUBDOMAIN]

Shows a list of commands or help for one command

Delete secret in the cloud environment

—help, -h: show help

—subdomain="": Project’s subdomain to operate on, defaults to linked project [$NHOST_SUBDOMAIN]

Shows a list of commands or help for one command

List secrets in the cloud environment

—help, -h: show help

—subdomain="": Project’s subdomain to operate on, defaults to linked project [$NHOST_SUBDOMAIN]

Shows a list of commands or help for one command

Update secret in the cloud environment

—help, -h: show help

—subdomain="": Project’s subdomain to operate on, defaults to linked project [$NHOST_SUBDOMAIN]

Shows a list of commands or help for one command

Shows a list of commands or help for one command

Perform software management operations

—help, -h: show help

Remove the installed CLI from system permanently

—force: Force uninstall without confirmation [$NHOST_FORCE_UNINSTALL]

—help, -h: show help

Shows a list of commands or help for one command

Upgrade the CLI to the latest version

—help, -h: show help

Shows a list of commands or help for one command

Show the current version of Nhost CLI you have installed

—help, -h: show help

Shows a list of commands or help for one command

Shows a list of commands or help for one command

Login to Nhost

—email="": Email address [$NHOST_EMAIL]

—help, -h: show help

—password="": Password [$NHOST_PASSWORD]

—pat="": Use this Personal Access Token instead of generating a new one with your email/password [$NHOST_PAT]

Shows a list of commands or help for one command

Generate markdown documentation for the CLI

—help, -h: show help

Shows a list of commands or help for one command

Shows a list of commands or help for one command