Command Reference
November 27, 2025 · View on GitHub
The xRegistry Code Generation CLI (xrcg) provides commands for generating code, managing xRegistry definitions, and configuring the tool.
Quick Reference
| Command | Purpose |
|---|---|
generate | Generate type-safe messaging code from xRegistry definitions |
validate | Check xRegistry definition files for errors |
list | Show available languages and code generation styles |
config | Manage persistent configuration settings |
manifest | Create and modify local xRegistry JSON files |
catalog | Interact with remote xRegistry HTTP APIs |
Primary Workflow
# 1. Generate code from a definition file
xrcg generate --projectname MyApp --language py --style kafkaproducer \
--definitions ./catalog.json --output ./generated
# 2. Build and run the generated project
cd generated && pip install -e . && pytest
Getting Help
Each command supports --help:
xrcg --help # General help
xrcg generate --help # Generate command options
xrcg manifest --help # Manifest subcommands
xrcg manifest message --help # Message operations
Command Categories
Code Generation
-
generate — The main event. Transforms xRegistry definitions into compile-ready projects with type-safe producer/consumer code, data classes, build files, and tests.
-
list — Discover available language/style combinations. Useful for finding the right
--languageand--stylevalues. -
validate — Check your xRegistry documents for structural errors before generating code.
Definition Management
-
manifest — Work with local xRegistry JSON files. Create message groups, add messages, define schemas, and configure endpoints—all stored in version-controllable files.
-
catalog — Connect to remote xRegistry servers for team collaboration. Same operations as manifest, but against an HTTP API.
Configuration
- config — Store default values (language, output directory) and registry connection settings to avoid repetitive command-line arguments.
Installation
See the main README for installation options (Docker or pip).