Skip to main content

Installation and Authentication

This guide explains how to install the Nestbox AI CLI and authenticate with a Nestbox AI deployment. These steps are required before you can begin managing projects, agents, or compute instances using the CLI.

Installation

To install the Nestbox AI CLI globally using npm, run the following command:

npm install -g @nestbox-ai/cli

This installs the CLI tool system-wide so that the nestbox command is available in your terminal. You only need to do this once. Once installed, you can verify that the CLI is working by running:

nestbox --help

This will display the list of available commands and options.

note

The CLI requires Node.js version 16 or higher.

Authentication

Before you can interact with the Nestbox AI platform, you must authenticate with a specific Nestbox AI deployment (such as a production server or a local development instance).

Logging in

Use the login command to authenticate:

nestbox login <nestbox-domain>

Replace <nestbox-domain> with the domain of the Nestbox AI instance you want to access. For example:

nestbox login demo.nestbox.ai
nestbox login localhost:3000

After running the login command, the CLI will open a browser window where you’ll be prompted to choose your account or log in. Once you approve access, the browser will display a one-time authentication token. Copy this token, return to your terminal, and paste it when prompted by the CLI. This token is then used to securely authenticate your session.

After login, your credentials are saved in the following location:

~/.config/.nestbox/<user_email>_<domain>.json

This allows the CLI to authenticate your future requests without requiring you to re-enter credentials.

Logging out

To remove the saved token and log out from a specific domain, run:

nestbox logout <nestbox-domain>