MiniGateway provides a command-line interface for server management and administration.
npm install -g @minigateway/cli
npx @minigateway/cli [command]
| Command | Description |
|---|
start | Start the unified server |
init | Initialize configuration file |
status | Check server status |
admin | Entity management commands |
llm-router | LLM-specific commands |
| Option | Description |
|---|
-h, --help | Show help |
-V, --version | Show version |
Initialize a new configuration file:
minigateway init [path] [options]
| Argument | Default | Description |
|---|
[path] | Platform-specific config directory | Config file path |
| Option | Description |
|---|
-f, --force | Overwrite existing config file |
# Create config in current directory
minigateway init ./minigateway.yaml
Start the MiniGateway server:
minigateway start [options]
| Option | Default | Description |
|---|
-p, --port <port> | 8080 | Server port |
--db <path> | Platform-specific (see Configuration) | Database path |
--ui-dist <path> | auto | Web UI dist directory |
--log-level <level> | info | Log verbosity |
--no-ui | false | Disable Web UI |
# Start with default settings
minigateway start --port 3000
minigateway start --no-ui
# Start with custom database
minigateway start --db /data/minigateway.db
Manage entities via CLI:
minigateway admin <entity> <action> [options]
| Entity | Actions |
|---|
services | list, create, update, delete |
routes | list, create, update, delete |
upstreams | list, create, update, delete |
targets | list, create, update, delete |
consumers | list, create, update, delete |
credentials | list, create, update, delete |
plugins | list, create, update, delete |
llm-models | list, create, update, delete |
llm-providers | list, create, update, delete |
minigateway admin services list
minigateway admin services create --name "my-api"
minigateway admin routes create \
--service-id "service_abc" \
| Variable | Description |
|---|
MINIGATEWAY_LOG_LEVEL | Default log level |
MINIGATEWAY_UI_DIST | Web UI dist path |
MINIGATEWAY_DB_PATH | Database file path |