CLI reference
archtool ships with a CLI for scaffolding and inspecting projects.
archtool init
Scaffold a new project.
Creates a complete project layout with:
- Domain module (
app/<project-name>/) - Entrypoint without sys.path hacks (
entrypoints/run.py) - Assembly test (
tests/test_assembly.py) Makefilewith common tasksDockerfilepyproject.toml
Example:
archtool add-module
Add a domain module to an existing project.
Creates app/<module-name>/ with interfaces.py, services.py, repos.py stubs, and a matching tests/ directory. Prints a reminder to register the module in your APPS list.
Example:
archtool validate
Validate that all registered modules follow the expected structure.
Checks each module for:
- Presence of
interfaces.py - Module importability
Displays results in a rich table. Exit code 0 = all OK, 1 = problems found.
archtool graph
Print the dependency graph for the project.
Tree format (default): rich tree in the terminal.
Dot format: GraphViz-compatible output for rendering:
Verbose logging
Enable DI assembly logs without code changes:
Or pass verbose=True to DependencyInjector: