---
title: "CLI Reference"
description: "The aihummer command-line tool: start and update the gateway, service control, diagnostics, backup/restore, settings, license and plugin commands."
updated: "2026-08-04"
---

The `aihummer` command-line tool manages a host-native install: it starts and
updates the gateway, controls
the gateway systemd service, runs diagnostics, handles backups, reads and writes
control-plane settings, and signs licenses. This page lists every command.

## Commands

| Command | What it does |
|---|---|
| `up` / `install` | Start the gateway systemd service (`systemctl start`). It installs nothing. |
| `update [--check]` | Update to the latest release (verify signature + swap binary + restart); `--check` only reports whether an update is available. |
| `restart` | Restart the gateway service (`systemctl restart`). |
| `stop` | Stop the gateway service (`systemctl stop`). |
| `logs [unit] [--no-follow]` | Follow one systemd unit's journal (`journalctl -u`); defaults to the gateway unit. `--no-follow` prints the tail of the journal and exits; without it the command keeps following. |
| `status` | Installation overview, service state and gateway readiness (`/readyz`). A **Components** section reports the state of the optional sidecar units (search, browser, speech-to-text, text-to-speech, video); when `systemctl` is unavailable it honestly says the state is unknown rather than "not installed". |
| `doctor` | Diagnostics with three verdicts: all good, running with warnings (N), or problems found. The Node.js and fleet-registration-material checks are warnings, not failures. |
| `backup [dir]` | `pg_dump` the PostgreSQL state plane to a file; a default directory is used when omitted. |
| `restore <file>` | Restore PostgreSQL from a dump file produced by `backup`. |
| `uninstall [flags]` | Remove the install (see flags below). Requires root — run it with `sudo`. |
| `set-password` / `admin-password` | Set/generate the local admin password (`[--login admin] [--password X]`). |
| `settings {set\|get\|list}` | Read/write control-plane settings in the database — this is how Settings-catalog knobs are configured from the CLI instead of `gateway.env`. |
| `license {keygen\|sign\|show <token>}` | Manage licenses: generate a key, sign, decode + verify a given token. |
| `loadtest` | Run a load test against the gateway. |
| `plugin {init\|validate\|keygen\|package\|sign\|publish}` | Plugin SDK: scaffold, validate, keys, package, sign and publish. |
| `version` | Print the version. |
| `help` | Show help. |

### `uninstall` flags

| Flag | Effect |
|---|---|
| `--purge` | Also remove data (full removal). |
| `--yes` | Skip the confirmation prompt. |
| `--no-backup` | Do not take a backup before removing. |
| `--backup-dir <dir>` | Write the pre-uninstall backup to this directory. |

## Usage examples

### Install and bring up

[Get the installation command without an account](https://my.aihummer.ru/#/self-hosted). Copy the complete command and run it on your server. The installer verifies the release signature. You can link the instance to your account after installation.

```bash
sudo aihummer up
aihummer status
```

### Update

```bash
# Only check whether a newer release exists
aihummer update --check

# Apply the update
sudo aihummer update
```

### Service control and logs

The commands act on the single gateway systemd unit (`AIHUMMER_SERVICE`, default
`aihummer-gateway`); `logs` accepts any systemd unit name.

```bash
sudo aihummer restart
aihummer logs                 # the gateway unit's journal (default; follows)
aihummer logs --no-follow     # print the tail of the journal and exit
aihummer logs aihummer-stt    # another systemd unit's journal
sudo aihummer stop
```

### Diagnostics

```bash
aihummer doctor
```

### Backup and restore

`backup` runs a `pg_dump` of the PostgreSQL state plane into a file; `restore`
takes that dump file.

```bash
aihummer backup /var/backups/aihummer
aihummer restore /var/backups/aihummer/aihummer-2026-07-05.sql
```

> [!TIP]
> Postgres is the source of truth, but your `AIHUMMER_MASTER_KEY` and the blob
> directory must be backed up separately — without the master key, encrypted
> secrets cannot be recovered.

### Set the admin password

The command accepts `[--login admin] [--password X]` and needs
`AIHUMMER_DATABASE_URL` — normally picked up from `gateway.env` when run as the
install user or via `sudo`.

```bash
sudo aihummer set-password --login admin
```

### Control-plane settings

`settings` reads and writes Settings-catalog knobs directly in the database —
the same store the web admin UI (Management → Settings) edits. This is how
catalog knobs are configured from the CLI: `gateway.env` values are ignored for
them.

```bash
aihummer settings set AIHUMMER_STT_URL http://127.0.0.1:8001
aihummer settings get AIHUMMER_STT_URL
aihummer settings list
```

`settings list` shows only the user-facing catalog keys (system and internal
keys are hidden); each key is tagged with its source — `[db]` for values you
set, `[unset]` with the catalog default otherwise.

### Licenses

`license show` requires a `<token>` argument and the `AIHUMMER_LICENSE_PUBKEY`
variable: it decodes and verifies the **given** token — it does not display the
instance's current license.

```bash
aihummer license keygen                # generate a signing key
aihummer license sign                  # sign a license
aihummer license show <token>          # decode + verify a token
```

### Load test

```bash
aihummer loadtest
```

### Plugins

```bash
aihummer plugin init <kind>            # scaffold a manifest (connector|service|openapi|mcp)
aihummer plugin validate manifest.json # validate a manifest against the contract
aihummer plugin keygen                 # ed25519 author key (.key + .pub)
aihummer plugin package ./my-plugin    # build a tarball + .sha256
aihummer plugin sign --key author.key --manifest ./my-plugin/manifest.json my-plugin-1.0.0.tar.gz

# Publish privately to your instance (public publishing is done in the portal — "My plugins")
aihummer plugin publish --private --instance https://host --token <admin> my-plugin-1.0.0.tar.gz
```

For the full SDK, and for publishing to the shared catalog from the portal
(«My plugins»), see [Plugin SDK](/en/v1.7/marketplace/sdk/) and
[Publishing a plugin](/en/v1.7/marketplace/publishing/).

> [!WARNING]
> `uninstall` requires root: run `sudo aihummer uninstall`. And
> `sudo aihummer uninstall --purge --yes` removes data and skips the
> confirmation prompt — make sure you have a verified backup first.

## Environment

Variables the `aihummer` tool itself reads:

| Variable | Purpose |
|---|---|
| `AIHUMMER_SERVICE` | The gateway systemd unit name (default `aihummer-gateway`) — the target of `up`/`restart`/`stop`/`logs`. |
| `AIHUMMER_GATEWAY_URL` | Gateway URL for `status`/`doctor`/`loadtest` (default `http://127.0.0.1:8780`). |
| `AIHUMMER_DATABASE_URL` | Postgres DSN — required by `backup`/`restore`/`set-password`/`settings`. |
| `AIHUMMER_LANG` | Language of the CLI output and help: `ru` (default) or `en`. |

Most commands need root (`systemctl`) — run them with `sudo`.

## Where to next

- Configure the instance: [Environment variables](/en/v1.7/reference/env-vars/).
- Decide what tools the agent can use: [Tools catalog](/en/v1.7/reference/tools-catalog/).
