CLI Command Reference
Install, run, and manage Hexabot projects with the official CLI.
Use the Hexabot CLI to create projects, bootstrap env files, run local development, manage Docker services, and inspect project config.
Hexabot CLI is published as @hexabot-ai/cli.
If you are new to local setup, start with Installation.
Prerequisites
You need:
Node.js
>= 20.19.0One package manager:
npm,pnpm,yarn, orbunDocker Desktop or Docker Engine if you use
--dockerorhexabot docker ...
Install the CLI
Install the CLI globally:
npm install -g @hexabot-ai/cliOr run it with npx:
npx @hexabot-ai/cli --helpUsage
The default flow is:
hexabot create my-project
cd my-project
hexabot devDocker is optional. Use it only when you need extra services like Postgres or Redis.
Local development uses SQLite by default. Add --docker when you want Docker Compose.
Commands
create <project-name>
create <project-name>Scaffold a new Hexabot project from the official NestJS starter template.
Common options:
-t, --template <name>— template repository. Useorg/repoor shorthandstarter.--pm <npm|pnpm|yarn|bun>— force a package manager.--no-install— skip dependency installation.--dev— runhexabot devwhen scaffolding finishes.--docker— bootstrap Docker env files.--force— scaffold into a non-empty directory.
The command downloads the latest template release, installs dependencies unless skipped, and bootstraps .env. It also prepares .env.docker when you pass --docker.
dev
devRun the current project in development mode.
Local mode runs the configured package script. By default, that is npm run dev.
Options:
--docker— run Docker Compose instead of the local package script.--services <list>— comma-separated Compose overlays or profiles.-d, --detach— detach Docker Compose.--env <file>— use a custom env file in local mode. Default is.env.--no-env-bootstrap— skip automatic env file copying.--pm <npm|pnpm|yarn|bun>— temporarily override the package manager.
env
envManage .env files for local and Docker workflows.
hexabot env init— copy.env.exampleto.envhexabot env init --docker— copy.env.docker.exampleto.env.dockerhexabot env list— show which env files exist or are missing
Use --force with env init to overwrite an existing file.
docker
dockerUse Docker Compose helpers from the project's docker/ folder.
hexabot docker up [--services <list>] [--build] [-d]hexabot docker down [--services <list>] [--volumes]hexabot docker logs [service] [-f | --since <1h>]hexabot docker pshexabot docker start [--services <list>] [--build] [-d]
The CLI combines docker-compose.yml with matching service overlays like docker-compose.<service>.yml. It can also copy .env.docker.example on first run.
For Docker setup details, see Setting Up Docker for Development and Production.
start
startRun the project in a production-oriented mode.
Behavior:
Local mode runs the configured
startscript. By default, that isnpm run start.Docker mode uses production overlays like
docker-compose.<service>.prod.yml.Pass
--env-bootstrapif you want env files copied automatically.
check
checkRun diagnostics for the current environment.
The output includes PASS or FAIL checks for Node.js version, project detection, env files, and optional Docker availability.
config
configInspect or update hexabot.config.json.
hexabot config showhexabot config set <key> <value>
config set supports dot notation:
migrate [args...]
migrate [args...]Run database migrations inside the Docker api container.
Any extra arguments are forwarded to npm run migrate.
Example Workflow
Create a project.
Enter the project and start local development.
Opt into Docker when you need infrastructure services.
Or manage Docker services directly:
That is the happy path: create → cd → dev.
Related pages
Setting Up Docker for Development and Production
This starts the required services in development mode.
Last updated
Was this helpful?