HexCore ships with a CLI tool that bootstraps a fully wired project in seconds. RunningDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Indroic/HexCore/llms.txt
Use this file to discover all available pages before exploring further.
hexcore init creates the directory structure, Python packages, a root config.py with repository_discovery_paths pre-filled, and an Alembic migration setup — so you can start writing domain logic immediately. This page explains both available templates and the files each one generates.
Installation and basic usage
<project_name> argument becomes the root folder for your new project. The --template (or -t) option selects the directory layout. If --template is omitted it defaults to hexagonal.
- Hexagonal template
- Vertical-slice template
The Generated directory tree:Generated Alembic
hexagonal template follows strict hexagonal architecture with explicit domain, application, and infrastructure layers under src/.config.py:config.py
env.py (key additions):alembic/env.py
What gets auto-generated
config.py
A root-level
config.py with a ServerConfig instance that has repository_discovery_paths pre-filled for the chosen template. Edit this file to set your database URLs and other settings.manage.py
An entry-point script that wires the HexCore CLI into your project. Run
python manage.py --help to see all available commands.Alembic setup
alembic init is run automatically, alembic.ini is updated with the correct version_locations path, and alembic/env.py is patched to read sql_database_url from LazyConfig and import all SQLAlchemy models.Python packages
Every directory is created as a proper Python package (contains
__init__.py), so imports work without any extra configuration.manage.py entry point
The generatedmanage.py delegates directly to the HexCore CLI:
manage.py
manage.py:
Adding domain modules (hexagonal template)
After initialising the project with thehexagonal template you can scaffold a new domain module with all the standard files:
src/domain/products/ with:
The
create-domain-module command is only available when using the hexagonal template because it scaffolds into src/domain/. For the vertical-slice template, create feature slices manually under src/features/.