bots-garden/razorbillpublic Fork
⑂ v0.2.0
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/razorbill.git
git clone ssh://git@rickub.com/bots-garden/razorbill.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
cli.md · 83 lines · 4.0 KBmarkdown
Blame HistoryOpen raw

Reference: command line

Every rzb command, option and exit code of razorbill 0.2.0.

rzb <command> [options]
rzb --help | --version
rzb help <command>
Command Purpose
rzb serve Start the OpenAI-compatible server
rzb config validate Check a server configuration file
rzb models List, download, delete models
rzb version Version and engines

rzb serve

rzb serve [--config <file>] [--host <address>] [--port <n>] [--api-key-env <name>] [--cors-origin <origin>]

Starts the server and runs until Ctrl-C or SIGTERM; then it stops accepting requests, unloads the models and exits with code 0.

Option Type Default Description
--config <file> path none Server configuration file (reference). Without it: no declared models, built-in defaults
--host <address> string, not empty server.host, else 127.0.0.1 Address to listen on; 0.0.0.0 for every interface
--port <n> integer, 1–65535 server.port, else 7920 TCP port
--api-key-env <name> string server.api_key_env, else RZB_API_KEY Environment variable holding the API key. Set and not empty: every route but /health needs Authorization: Bearer <key>
--cors-origin <origin> string server.cors_origin, else none Let browser pages from this origin call the API; * for any origin

Options win over the server: section of the file. On start it prints, on standard error:

config: server.yaml (2 declared models)
rzb 0.2.0 serving http://127.0.0.1:7920/v1 (API key from $RZB_API_KEY) — Ctrl-C to stop

The first line appears only with --config. Warnings (warning: …) are printed before the banner when the server listens on a network address without an API key, or allows every CORS origin without one. Then one log line per request: method, path, status, duration, and the model and token counts (model=… tokens=<prompt>+<completion>, plus cached=<n> when part of the prompt was reused from the previous request); prompts and answers are never logged.

The engine is the first one of the build: mlx on the Mac, fake on Linux (which answers echo: <last message> without a model).

rzb config validate

rzb config validate <file>

Loads the file without starting anything. Prints <file> is valid: 2 models (qwen3, embed), any Hugging Face MLX id accepted on standard output, or every problem found with its line number (format) and exit code 2.

rzb models

Command Arguments and options Description
rzb models list --all: also show repositories that are not loadable (GGUF, unfinished downloads), with a status column Models in the cache, one per line: id, size, revisions. Prints the cache folder on standard error
rzb models pull <id> --revision <rev> (default main), --engine <name> Download or update a model (*.safetensors, *.json, *.jinja), with a progress bar
rzb models rm <id> -y, --yes: do not ask (required without a terminal) Delete a model from the cache

The cache is $HF_HUB_CACHE, else $HF_HOME/hub, else ~/.cache/huggingface/hub, shared with the Python Hugging Face tools.

rzb version

Prints rzb 0.2.0 (engines: fake, mlx) (the engines of this build, sorted). rzb --version prints 0.2.0.

Exit codes

Code Meaning
0 Success, or server stopped normally
1 Failure while running (download, model, port already in use…)
2 Configuration file missing or invalid
64 Invalid command line
130 Interrupted

Environment variables

Variable Effect
RZB_API_KEY (or the name given by --api-key-env / server.api_key_env) API key of the server
HF_HUB_CACHE, HF_HOME Location of the model cache
NO_COLOR Disables colours on standard error
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Reference: command line

> Every `rzb` command, option and exit code of razorbill 0.2.0.

```
rzb <command> [options]
rzb --help | --version
rzb help <command>
```

| Command | Purpose |
| --- | --- |
| [`rzb serve`](#rzb-serve) | Start the OpenAI-compatible server |
| [`rzb config validate`](#rzb-config-validate) | Check a server configuration file |
| [`rzb models`](#rzb-models) | List, download, delete models |
| [`rzb version`](#rzb-version) | Version and engines |

## rzb serve

```
rzb serve [--config <file>] [--host <address>] [--port <n>] [--api-key-env <name>] [--cors-origin <origin>]
```

Starts the server and runs until Ctrl-C or SIGTERM; then it stops accepting requests, unloads the models and exits with code 0.

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `--config <file>` | path | none | Server configuration file ([reference](configuration.md)). Without it: no declared models, built-in defaults |
| `--host <address>` | string, not empty | `server.host`, else `127.0.0.1` | Address to listen on; `0.0.0.0` for every interface |
| `--port <n>` | integer, 1–65535 | `server.port`, else `7920` | TCP port |
| `--api-key-env <name>` | string | `server.api_key_env`, else `RZB_API_KEY` | Environment variable holding the API key. Set and not empty: every route but `/health` needs `Authorization: Bearer <key>` |
| `--cors-origin <origin>` | string | `server.cors_origin`, else none | Let browser pages from this origin call the API; `*` for any origin |

Options win over the `server:` section of the file. On start it prints, on standard error:

```
config: server.yaml (2 declared models)
rzb 0.2.0 serving http://127.0.0.1:7920/v1 (API key from $RZB_API_KEY) — Ctrl-C to stop
```

The first line appears only with `--config`. Warnings (`warning: …`) are printed before the banner when the server listens on a network address without an API key, or allows every CORS origin without one. Then one log line per request: method, path, status, duration, and the model and token counts (`model=… tokens=<prompt>+<completion>`, plus `cached=<n>` when part of the prompt was reused from the previous request); prompts and answers are never logged.

The engine is the first one of the build: `mlx` on the Mac, `fake` on Linux (which answers `echo: <last message>` without a model).

## rzb config validate

```
rzb config validate <file>
```

Loads the file without starting anything. Prints `<file> is valid: 2 models (qwen3, embed), any Hugging Face MLX id accepted` on standard output, or every problem found with its line number ([format](configuration.md#errors)) and exit code 2.

## rzb models

| Command | Arguments and options | Description |
| --- | --- | --- |
| `rzb models list` | `--all`: also show repositories that are not loadable (GGUF, unfinished downloads), with a status column | Models in the cache, one per line: id, size, revisions. Prints the cache folder on standard error |
| `rzb models pull <id>` | `--revision <rev>` (default `main`), `--engine <name>` | Download or update a model (`*.safetensors`, `*.json`, `*.jinja`), with a progress bar |
| `rzb models rm <id>` | `-y`, `--yes`: do not ask (required without a terminal) | Delete a model from the cache |

The cache is `$HF_HUB_CACHE`, else `$HF_HOME/hub`, else `~/.cache/huggingface/hub`, shared with the Python Hugging Face tools.

## rzb version

Prints `rzb 0.2.0 (engines: fake, mlx)` (the engines of this build, sorted). `rzb --version` prints `0.2.0`.

## Exit codes

| Code | Meaning |
| --- | --- |
| `0` | Success, or server stopped normally |
| `1` | Failure while running (download, model, port already in use…) |
| `2` | Configuration file missing or invalid |
| `64` | Invalid command line |
| `130` | Interrupted |

## Environment variables

| Variable | Effect |
| --- | --- |
| `RZB_API_KEY` (or the name given by `--api-key-env` / `server.api_key_env`) | API key of the server |
| `HF_HUB_CACHE`, `HF_HOME` | Location of the model cache |
| `NO_COLOR` | Disables colours on standard error |