@hexclave/cli and provides the hexclave command for project setup, development environments, configuration, deployments, administration, and team management.
Install and quickstart
Install the CLI globally if you want to usehexclave from any project:
Terminal
Terminal
@hexclave/cli as a development dependency and run it with your package manager:
Terminal
Authentication and environment
Runhexclave login to authenticate in a browser. The CLI stores the resulting refresh token locally. hexclave logout removes the stored token.
The preferred current environment variables are:
STACK_API_URL, STACK_DASHBOARD_URL, STACK_PROJECT_ID, and STACK_SECRET_SERVER_KEY are retained as backwards-compatible aliases for the corresponding HEXCLAVE_* variables. If both names for one setting are set to different values, the CLI reports an error.
The CLI credential variables are currently named STACK_CLI_REFRESH_TOKEN and STACK_CLI_ANON_REFRESH_TOKEN. Use STACK_CLI_REFRESH_TOKEN for CI or other noninteractive login, and set STACK_CLI_ANON_REFRESH_TOKEN to link an anonymous session during login.
The CLI defaults to Hexclave Cloud (https://api.hexclave.com and https://app.hexclave.com) when endpoint variables are not set.
The root --json option enables JSON output for commands that support it. Commander also provides -V, --version and -h, --help on every command; the automatically generated help option is omitted from the individual option tables below.
Command reference
hexclave init
Synopsis
Behavior and authentication
Without mode or link flags, the command is interactive. Noninteractive environments must provide an explicit mode or link option. Incompatible combinations such as
--config-file with --select-project-id are rejected. The command writes project setup files, registers the Hexclave MCP server, and can run the Claude setup agent unless --no-agent is used.
Terminal
hexclave doctor
Synopsis
Behavior and authentication
The command reads
package.json, detects or validates the framework, runs integration checks, prints pass/fail/warning results, and exits with status 1 if any check fails.
Terminal
hexclave fix
Synopsis
Behavior and authentication
If no error is supplied, the CLI reads stdin or prompts interactively. Error input is limited to 8,000 characters. In noninteractive environments, provide
--error; confirmation is required unless --yes is supplied.
Terminal
hexclave login
Synopsis
STACK_CLI_REFRESH_TOKEN in the CLI credentials file. Set STACK_CLI_ANON_REFRESH_TOKEN before logging in to attach the login to an existing anonymous session; the anonymous token is removed after a successful link.
hexclave logout
Synopsis
hexclave whoami
Synopsis
Behavior and authentication
Requires a login session. Human output includes user identity, email verification, anonymous/restricted status, team count, API URL, and dashboard URL.
hexclave project
Manage projects.
hexclave project list
Synopsis
Behavior and authentication
--cloud and --local cannot be combined. Listing cloud projects requires a login session; listing local development-environment projects uses local state. Human-readable output contains the project ID, display name, and [cloud] or [local] target.
Terminal
hexclave project create
Synopsis
Behavior and authentication
The command currently creates cloud projects only, so
--cloud is required. It requires a login session. Missing display names can be entered interactively; in a noninteractive environment, provide --display-name.
Terminal
hexclave config
Manage project configuration files.
hexclave config pull
Synopsis
Behavior and authentication
This command requires
hexclave login; secret-server-key-only authentication is rejected. The target must have a .ts extension. Existing files are protected unless --overwrite is supplied.
Terminal
hexclave config push
Synopsis
Behavior and authentication
This command accepts either
hexclave login or HEXCLAVE_SECRET_SERVER_KEY authentication. GitHub Actions metadata is inferred from GITHUB_REPOSITORY, GITHUB_REF_NAME, and GITHUB_SHA when available. Explicit GitHub source metadata requires all corresponding source options.
Terminal
hexclave dev
Synopsis
Behavior and authentication
The CLI starts or reuses the development dashboard, creates a development-environment session, injects the project’s API URL, dashboard URL, project ID, and related environment variables into the child process, then forwards signals and cleans up when the child exits. The command accepts the config path supplied by the user; current project setup uses
hexclave.config.ts.
Terminal
hexclave deploy
Synopsis
deploy.services in hexclave.config.ts. The CLI uploads the service source, waits for Vercel to accept the deployment, and prints the run ID without waiting for the remote build to finish.
Options
Behavior and authentication
Authentication uses
HEXCLAVE_SECRET_SERVER_KEY when set, which is recommended for CI; otherwise it uses the hexclave login session. Every secret referenced by the service must be supplied, and unknown secret keys are rejected. Secret values are sent to the deployment target and are not persisted by Hexclave.
Terminal
hexclave exec
Synopsis
HexclaveServerApp available as hexclaveServerApp.
Options
Behavior and authentication
Pass exactly one JavaScript argument. Cloud execution requires
hexclave login and intentionally rejects HEXCLAVE_SECRET_SERVER_KEY authentication. Development-environment execution resolves access from the supplied config file. Non-undefined return values are printed as formatted JSON; undefined prints nothing.
Terminal
hexclave team
Manage teams.
Team operations require a login session. Where a team ID is optional, the CLI can resolve the team interactively or from the available team context.
hexclave team list
Synopsis
hexclave team create
Synopsis
Behavior and authentication
Missing display names prompt interactively and are required in noninteractive environments.
hexclave team members list
Synopsis
hexclave team members remove
Synopsis
Behavior and authentication
Destructive actions require confirmation interactively and require
--yes in noninteractive environments.
hexclave team invite
Synopsis
Behavior and authentication
Missing email addresses prompt interactively and are required in noninteractive environments.
hexclave team invitations list
Synopsis
hexclave team invitations revoke
Synopsis
Behavior and authentication
Destructive actions require confirmation interactively and require
--yes in noninteractive environments.
hexclave team invitations received
Synopsis
hexclave team invitations accept
Synopsis
hexclave team leave
Synopsis
Behavior and authentication
Leaving a team is destructive. It requires confirmation interactively and requires
--yes in noninteractive environments.
hexclave team update
Synopsis
Behavior and authentication
Missing display names prompt interactively and are required in noninteractive environments.
hexclave team delete
Synopsis
Behavior and authentication
Deleting a team is destructive. It requires confirmation interactively and requires
--yes in noninteractive environments.