CLI Reference¶
The hbia command-line tool provides commands for scaffolding, execution, validation, inspection, and management of HBIA projects.
Installation¶
Project Management¶
init¶
Scaffold a new HBIA project.
| Argument | Description |
|---|---|
<name> |
Project directory name |
--framework |
Project type: plain (default), fastapi, monorepo |
Examples:
hbia init my_project # Plain backend project
hbia init my_api --framework fastapi # FastAPI project
hbia init my_app --framework monorepo # Full-stack monorepo
version¶
Show the installed HBIA version.
doctor¶
Check your environment for correct setup.
Verifies: Python version, installed packages, available extras, configuration validity.
health¶
Scan the project for tech debt and structural issues.
Checks: module line counts, vertex counts per flow, configuration completeness.
Backend Commands¶
run¶
Execute a flow.
| Argument | Description |
|---|---|
<flow.yaml> |
Path to flow definition file |
--handlers |
Python module containing handler functions |
validate¶
Check YAML syntax and DSL structure.
graph-validate¶
Check graph structural integrity (cycles, missing edges, atomic groups).
inspect¶
Show topology, execution stages, and vertex details.
explain¶
Generate a human-readable description of the flow.
lint¶
Check flows for AI best practices.
<path> can be a single YAML file or a directory of flows.
viz¶
Visualize the DAG.
hbia viz <flow.yaml> # Graphviz rendering (requires viz extra)
hbia viz <flow.yaml> --ascii # ASCII art (no dependencies)
flow-list¶
List all flows found in the project.
Cache Commands¶
cache-info¶
Show cache statistics (entries, size).
cache-prune¶
Remove old cache entries.
clear-cache¶
Delete all cached data.
AI Context Commands¶
context¶
Generate or display AI context documentation.
The generated AGENTS.md file contains a complete description of the project architecture that AI agents read to understand the codebase.
Frontend Commands¶
ui-inspect¶
Inspect a frontend graph domain.
ui-graph¶
Show the structure of a frontend graph.
ui-validate¶
Validate frontend YAML definitions.
ui-lint¶
Lint frontend graphs for best practices.
ui-codegen¶
Generate TypeScript runtime from frontend YAML definitions.
| Argument | Description |
|---|---|
graph/ |
Path to the graph definitions directory |
--output |
Output directory for generated TypeScript files |
Example:
Generates: types.ts, store.ts, effects.ts, events.ts, react.tsx, index.ts.