Project Initialization¶
xcorecli simplifies the lifecycle of an xcore project from scaffolding to upgrades.
New Project Scaffolding¶
Use the init command to scaffold a new project. The wizard guides you through setup with sensible defaults.
| Interactive Init | |
|---|---|
To skip the wizard and choose a database backend directly:
| Non-interactive with PostgreSQL | |
|---|---|
Database Options¶
The initialization wizard supports several database backends with pre-configured URL templates:
| Backend | Default URL |
|---|---|
| SQLite (default) | sqlite+aiosqlite:///./data/xcore.db |
| PostgreSQL | postgresql+asyncpg://user:pass@localhost:5432/db |
| MySQL | mysql+aiomysql://user:pass@localhost:3306/db |
| MariaDB | mysql+aiomysql://user:pass@localhost:3306/db |
Generated Structure¶
xcli init generates a complete, production-ready project structure:
The generated main.py looks like this:
Built-in Health Check
The generated main.py includes a /health endpoint by default, allowing orchestrators like Kubernetes to monitor service status.
Upgrade Workflows¶
As the xcore ecosystem evolves, your project may need updates to its core configuration or database schema.
Upgrading Configuration¶
The upgrade command checks your current integration.yaml against the latest schema and applies migrations or additions automatically.
Example Workflow¶
See Also¶
- Configuration Guide
- Full reference for
integration.yaml. - Health Check
- Validate your environment after setup.