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:
sudo apt install ./next-cli_0.1.0_all.debThe 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#
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 pushYou 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#
| Command | Purpose |
|---|---|
login, logout, whoami | Manage the current hosted-Git session |
repo list, repo create | View or create hosted repositories |
init, clone | Start or retrieve a repository |
status, add, commit, push, pull, sync | Run familiar source-control operations |
doctor | Check the local CLI and Git setup |
After you push source, connect that repository to a NexHost service in the dashboard to create a deployment.