CLI¶
The chacc command manages module development, packaging, deployment, and
server startup.
Create a module¶
Creates a module scaffold in plugins/my_module/.
Options:
| Option | Description |
|---|---|
--output-dir |
Output directory. Defaults to plugins. |
--force |
Overwrite an existing module directory. |
Build a module¶
Builds my_module.chacc from the source directory.
Options:
| Option | Description |
|---|---|
--output-filename |
Custom output archive name. |
The source directory must contain module_meta.json.
Deploy a module¶
Uploads the module to the configured ChaCC API instance.
Required environment variable:
Optional environment variables (Still under development):
Run the server¶
Development server:
Production server:
Options:
| Option | Description |
|---|---|
--dev |
Run in development mode with auto-reload. |
--host |
Host to bind. Defaults to 0.0.0.0. |
--port |
Port to bind. Defaults to 8085. |
--debug |
Enable debug logging. |
Legacy server command¶
This command is retained for compatibility. Prefer chacc run server.
Typical workflow¶
chacc create billing
cd plugins/billing
# edit module_meta.json, models.py, routes.py, and tests
chacc run server --dev
chacc build plugins/billing
chacc deploy billing.chacc
Module name rules¶
Module names:
- Cannot be empty.
- Cannot start with a number.
- May contain letters, numbers, underscores, hyphens, and spaces.
- Are normalized to lowercase with underscores.