hexastack
The unified distribution package and diagnostic CLI for the Hexastack framework.
1. Overview & Capabilities
hexastack acts as the umbrella distribution for the entire Hexastack monorepo, offering:
- Scoped Extras: Single-command installs for scoped use cases (e.g.,
pip install hexastack[cli],pip install hexastack[web],pip install hexastack[graphql],pip install hexastack[mcp],pip install hexastack[grpc],pip install hexastack[db]). - Zero-Install Project Scaffolding:
hexastack new <template> <name>instantly scaffolds production-grade microservices adhering strictly to Hexagonal Architecture, complete with tiered CI, import-linter contracts, and passing test suites. - Interactive Diagnostic CLI: The
hexastackterminal command provides system health checks, package inspection, CQRS message route exploration, local FastAPI dev server launching, MCP server execution, gRPC daemon hosting, and Alembic database migration management.
2. Monorepo & Sibling Relationships
graph TD
subgraph Umbrella ["hexastack (Distribution & CLI App)"]
CLI_APP["hexastack CLI Entrypoint"]
DIAG["Diagnostics Handlers (info, inspect, ping)"]
DEMO_SERVER["FastAPI Demo Server (serve)"]
DB_CLI["Alembic Migration Tooling (db)"]
MCP_CLI["MCP Server Runner (mcp)"]
GRPC_CLI["gRPC Server Daemon (grpc)"]
end
subgraph BaseDependencies ["Default Direct Dependencies"]
CORE["hexastack-core"]
CQRS["hexastack-cqrs"]
LOG["hexastack-logging"]
end
subgraph ScopedExtras ["Optional Scoped Extras"]
AUTH["hexastack-auth (hexastack[auth])"]
OTEL["hexastack-otel (hexastack[otel])"]
EVENTS["hexastack-events (hexastack[events])"]
AI["hexastack-ai (hexastack[ai])"]
CLI["hexastack-cli (hexastack[cli])"]
FASTAPI["hexastack-fastapi (hexastack[fastapi])"]
GRAPHQL["hexastack-graphql (hexastack[graphql])"]
MCP["hexastack-mcp (hexastack[mcp])"]
GRPC["hexastack-grpc (hexastack[grpc])"]
DB["hexastack-db (hexastack[db])"]
FLAGS["hexastack-flags (hexastack[flags])"]
UVICORN["uvicorn[standard] (hexastack[web])"]
end
Umbrella --> CORE
Umbrella --> CQRS
Umbrella --> LOG
CLI_APP -. optional extra .-> CLI
DEMO_SERVER -. optional extra .-> FASTAPI
DEMO_SERVER -. optional extra .-> UVICORN
DB_CLI -. optional extra .-> DB
MCP_CLI -. optional extra .-> MCP
GRPC_CLI -. optional extra .-> GRPC
Explicit Dependencies (Direct)
hexastack-core: Core kernel, DI container (rodi), and bootstrap engine.hexastack-cqrs: Command, query, and event execution buses.hexastack-logging: Structured logging and telemetry.
Optional Integrations (Extras)
[auth]: Installshexastack-authfor security, RBAC, JWT, PBKDF2, and@authorizemiddleware.[otel]: Installshexastack-otelfor OpenTelemetry distributed tracing and OTLP export.[events]: Installshexastack-eventsfor CloudEvents 1.0, Transactional Outbox, and streaming buses.[ai]: Installshexastack-aifor LiteLLM, Instructor, PydanticAI, and reflective agent tools.[cli]: Installshexastack-clifor interactive CLI commands.[db]/[sql]: Installshexastack-dbfor persistence and Alembic migrations.[fastapi]: Installshexastack-fastapi.[flags]: Installshexastack-flagsfor CNCF OpenFeature enterprise feature flag providers (Flagd, Unleash, Flipt).[graphql]: Installshexastack-graphql.[mcp]: Installshexastack-mcpfor Model Context Protocol AI agent tools.[grpc]: Installshexastack-grpcfor high-performance RPC services.[web]: Installshexastack-fastapianduvicorn[standard].[docs]: Installszensicalfor static documentation generation and hosting.[testing]: Installs recommended testing tools (hypothesis,inline-snapshot,playwright,pytest-archon,schemathesis).[all]: Complete installation with all adapters and development tools.
3. Installation
# Minimal installation
pip install hexastack
# Testing toolkit (Archon boundary checks, Hypothesis fuzzing, Schemathesis)
pip install "hexastack[testing]"
# CNCF OpenFeature flags
pip install "hexastack[flags]"
# Security & RBAC
pip install "hexastack[auth]"
# OpenTelemetry Tracing
pip install "hexastack[otel]"
# CloudEvents & Transactional Outbox
pip install "hexastack[events]"
# AI Integration (LiteLLM, Instructor, PydanticAI)
pip install "hexastack[ai]"
# CLI support
pip install "hexastack[cli]"
# Full web stack (FastAPI + Uvicorn)
pip install "hexastack[web]"
# GraphQL support
pip install "hexastack[graphql]"
# Model Context Protocol support
pip install "hexastack[mcp]"
# gRPC support
pip install "hexastack[grpc]"
# Database support with migrations
pip install "hexastack[db]"
# Complete ecosystem
pip install "hexastack[all]"
4. Project Scaffolding & Archetypes (hexastack new & hexastack init)
Hexastack includes a production-grade scaffolding engine that creates fully functioning, decoupled microservices adhering strictly to Hexagonal Architecture, complete with pre-configured .importlinter boundaries, GitHub Actions CI workflows, multi-stage rootless Dockerfiles, passing test suites, and secret scanning.
Interactive Scaffolding Wizard (hexastack init)
Launch an interactive terminal wizard that guides you through template selection, database drivers, auth, transports, and telemetry:
hexastack init
Direct Archetype Scaffolding (hexastack new)
Generate microservices in a single command using one of the pre-built blueprints:
# Enterprise grade multi-transport service (FastAPI + gRPC + GraphQL + MCP + Outbox + Release + OpenSSF)
hexastack new enterprise core-platform
# Asynchronous event-driven microservice with CloudEvents 1.0 and Transactional Outbox
hexastack new event-driven billing-worker
# GraphQL presentation service with Strawberry schema and CQRS bus
hexastack new graphql-service analytics-service
# High-throughput gRPC binary RPC microservice with in-process ProtoCompiler and Buf linting
hexastack new grpc-service payment-gateway
# AI Agent service equipped with Model Context Protocol (MCP) server & tools
hexastack new mcp-agent customer-assistant
# Ultra-minimal CQRS microservice
hexastack new minimal lightweight-worker
# Web API service with FastAPI, SQLite/Postgres, and OpenAPI specs
hexastack new web-api order-service
Scaffolded Service Anatomy
Every scaffolded service immediately includes:
- Strict Layer Isolation:
domain/(0 framework dependencies),ports/(abstract protocols),adapters/driving/(FastAPI / gRPC / CLI / MCP),adapters/driven/(SQLAlchemy / InMemory / Outbox), andinfra/(bootstrappers & configuration). - Golden-Path Multi-Stage Dockerfile: Ultra-fast
uv-cached builder layer, rootless non-root runtime user (appuser:10001),/healthprobeHEALTHCHECK, and.dockerignore. - Automated Quality Gates:
.importlinterrules enforcing directional purity, pre-commit config withdetect-secrets,pip-audit, andruff, plus a completepytestunit test suite. - Automated Release Pipeline (
--with-release):.github/workflows/release.ymlwithuv build,pypa/gh-action-pypi-publish, and SPDX/CycloneDX SBOM generation viaanchore/sbom-action, plus aCHANGELOG.md. - OpenSSF Security Suite (
--with-openssf):.github/workflows/scorecard.yml(weekly security analysis),SECURITY.md,GOVERNANCE.md, andCODE_OF_CONDUCT.md.
5. CLI Diagnostic Commands
When installed with hexastack[all] or hexastack[cli]:
# Check installed packages and optional dependency statuses
hexastack info
# Inspect registered CQRS commands, queries, and configs
hexastack inspect registry
# Send a test ping command through the CQRS pipeline
hexastack ping --message "Hello Hexastack"
# Launch local FastAPI dev server with live reload (requires hexastack[web])
hexastack serve --host 127.0.0.1 --port 8000
# Launch MCP server in stdio mode (requires hexastack[mcp])
hexastack mcp run
# Launch gRPC daemon (requires hexastack[grpc])
hexastack grpc serve --host 0.0.0.0 --port 50051
# Manage database migrations (requires hexastack[db])
hexastack db init migrations/
hexastack db revision "add users table"
hexastack db upgrade head
hexastack db current
hexastack db history
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hexastack-0.3.0.tar.gz.
File metadata
- Download URL: hexastack-0.3.0.tar.gz
- Upload date:
- Size: 34.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b063cfedd5ae28aef127c5bb93c0b0cc0fbfd139eec1b2f50a843c3a96b1be9
|
|
| MD5 |
a2b7d900a54961c8f63637d41e66a899
|
|
| BLAKE2b-256 |
2e25e7753b9ac499e7a70baef8831fdf1e56d173f073c1253e095964fb53d1ba
|
File details
Details for the file hexastack-0.3.0-py3-none-any.whl.
File metadata
- Download URL: hexastack-0.3.0-py3-none-any.whl
- Upload date:
- Size: 53.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b76b06364f2d2e1c66d3fff61512669329bbc2ffe8255298d6fa5d086b2750a8
|
|
| MD5 |
c1bc712a38ef7cdf1483a4d539e2be1d
|
|
| BLAKE2b-256 |
ce27aab3ffcd24892a718637dd5bc974870a885b640570b6ba12420d8e3e9563
|