Skip to content
Dashboard

Next CLI

Use the NexHost Git command-line interface to work with hosted repositories.

Next CLI#

The Next CLI is NexHost’s hosted Git command-line interface. It manages repository authentication and delegates source-control operations to the standard Git workflow. It does not trigger deployments, stream service logs, or set deployment environment variables.

Install#

Download the current package from CLI Downloads. On Debian or Ubuntu, install the downloaded package with:

bash
sudo apt install ./next-cli_0.1.0_all.deb

The platform command names are next, nexhost, and nex. next is the first-class source-control command; do not overwrite an existing Next.js framework binary without checking your local environment.

Sign in and work with a repository#

bash
next login --team YOUR_WORKSPACE
next repo list
next clone YOUR_WORKSPACE/YOUR_REPOSITORY
cd YOUR_REPOSITORY
next status
next add .
next commit -m "Initial commit"
next push

You can also use next login --device --team YOUR_WORKSPACE for browser approval or next login --pat to enter a personal access token securely.

Available commands#

CommandPurpose
login, logout, whoamiManage the current hosted-Git session
repo list, repo createView or create hosted repositories
init, cloneStart or retrieve a repository
status, add, commit, push, pull, syncRun familiar source-control operations
doctorCheck the local CLI and Git setup

After you push source, connect that repository to a NexHost service in the dashboard to create a deployment.