xrserver (xRegistry Server)
July 3, 2026 ยท View on GitHub
xrserver Command Summary
The xrserver CLI boots and manages the API server and backing database:
xrserver [command]
# Global flags:
--db string DB name (registry*)
--dbhost string DB host address (127.0.0.1*)
--dbpassword string DB password (password*)
--dbport int DB host port (3306*)
--dbuser string DB user (root*)
--dontcreate Don't create DB/reg if missing
-?, --help Help for commands
--help-all Help for all commands
-p, --port int API Listen port
--recreatedb Recreate the DB
--recreatereg Recreate registry
-r, --registry string Default Registry name
--samples Load sample registries
--ui-dir string Serve new UI from this directory (dev mode)
-v, --verbose Be chatty
--verify Verify loading and exit
--version Print command version string
xrserver db [command]
# Manage mysql databases
--db string DB name (registry*)
--dbhost string DB host address (127.0.0.1*)
--dbpassword string DB password (password*)
--dbport int DB host port (3306*)
--dbuser string DB user (root*)
-?, --help Help for commands
-v, --verbose Be chatty
--version Print command version string
xrserver db create NAME
# Create a new mysql DB
--db string DB name (registry*)
--dbhost string DB host address (127.0.0.1*)
--dbpassword string DB password (password*)
--dbport int DB host port (3306*)
--dbuser string DB user (root*)
-f, --force Delete existing DB first
-?, --help Help for commands
-v, --verbose Be chatty
--version Print command version string
xrserver db delete NAME
# Delete a mysql DB
--db string DB name (registry*)
--dbhost string DB host address (127.0.0.1*)
--dbpassword string DB password (password*)
--dbport int DB host port (3306*)
--dbuser string DB user (root*)
-f, --force Ignore DB missing error
-?, --help Help for commands
-v, --verbose Be chatty
--version Print command version string
xrserver db get NAME
# Get details about a mysql DB
--db string DB name (registry*)
--dbhost string DB host address (127.0.0.1*)
--dbpassword string DB password (password*)
--dbport int DB host port (3306*)
--dbuser string DB user (root*)
-?, --help Help for commands
-v, --verbose Be chatty
--version Print command version string
xrserver db list
# List the databases
--db string DB name (registry*)
--dbhost string DB host address (127.0.0.1*)
--dbpassword string DB password (password*)
--dbport int DB host port (3306*)
--dbuser string DB user (root*)
-?, --help Help for commands
-o, --output string Output format: json, table*
-v, --verbose Be chatty
--version Print command version string
xrserver help [command]
# Help about any command
xrserver registry [command]
# Manage xRegistries
--db string DB name (registry*)
--dbhost string DB host address (127.0.0.1*)
--dbpassword string DB password (password*)
--dbport int DB host port (3306*)
--dbuser string DB user (root*)
-?, --help Help for commands
-v, --verbose Be chatty
--version Print command version string
xrserver registry create ID...
# Create one or more xRegistry
--db string DB name (registry*)
--dbhost string DB host address (127.0.0.1*)
--dbpassword string DB password (password*)
--dbport int DB host port (3306*)
--dbuser string DB user (root*)
-f, --force Ignore existing registry
-?, --help Help for commands
-v, --verbose Be chatty
--version Print command version string
xrserver registry delete ID...
# Delete one or more registries
--db string DB name (registry*)
--dbhost string DB host address (127.0.0.1*)
--dbpassword string DB password (password*)
--dbport int DB host port (3306*)
--dbuser string DB user (root*)
-f, --force Ignore missing registry
-?, --help Help for commands
-v, --verbose Be chatty
--version Print command version string
xrserver registry get ID
# Get details about a registry
--db string DB name (registry*)
--dbhost string DB host address (127.0.0.1*)
--dbpassword string DB password (password*)
--dbport int DB host port (3306*)
--dbuser string DB user (root*)
-?, --help Help for commands
-v, --verbose Be chatty
--version Print command version string
xrserver registry list
# List the registries
--db string DB name (registry*)
--dbhost string DB host address (127.0.0.1*)
--dbpassword string DB password (password*)
--dbport int DB host port (3306*)
--dbuser string DB user (root*)
-?, --help Help for commands
-v, --verbose Be chatty
--version Print command version string
xrserver run
# Run server (the default command)
--db string DB name (registry*)
--dbhost string DB host address (127.0.0.1*)
--dbpassword string DB password (password*)
--dbport int DB host port (3306*)
--dbuser string DB user (root*)
--dontcreate Don't create DB/reg if missing
-?, --help Help for commands
-p, --port int API Listen port (8080*)
--recreatedb Recreate the DB
--recreatereg Recreate registry
-r, --registry string Default Registry name(xRegistry*)
--samples Load sample registries
-v, --verbose Be chatty
--verify Verify loading and exit
--version Print command version string
Example Commands
# Start server on port 8080 and load sample data ('run' is optional)
xrserver --samples
xrserver run --samples
# Drop & recreate the database, then run the server ('run' is optional)
xrserver --recreatedb
xrserver run --recreatedb
# Create a new registry named "myregistry"
xrserver registry create myregistry
# List all registries
xrserver registry list
xrserver Environment Variables
The following environment variables can be set in the environment in which
the xrserver command is executed:
| Env Var | Value |
|---|---|
| XR_PORT | Listening port of the xrserver API server (8080*) |
| XR_MODEL_PATH | Where to find the sample's model files |
| XR_LOAD_LARGE | If set, a very large default sample Registry will be loaded |
| XR_VERBOSE | Chatty level - 0=none, 1=start-up info, 2=HTTP requests*, 3+=debug |
To configure the xrserver to use a non-local (127.0.0.1:3306) MySQL
instance, set the following environment variables:
| Env Var | Value |
|---|---|
| DBHOST | Hostname, or IP address, of MySQL instance (127.0.0.1*) |
| DBPORT | Listening port of MySQL instance (3306*) |
| DBUSER | Admin login for MySQL instance (root*) |
| DBPASSWORD | Admin password for MySQL instance (password*) |