oct.cli module#
Purpose#
Provide the main command-line interface for the OCT (Option C Tools) ecosystem.
Responsibilities#
Define top-level commands: oct lint, oct format, oct new, oct scaffold, oct docs, oct test, oct export-source, oct clean, oct health.
Delegate work to the appropriate OCT modules.
Scaffold new Option C projects with a correct
oc_diagnostics/debug_config.jsonpre-configured for use withoc_diagnostics.Set up Sphinx documentation templates in
docs/.Ensure consistent behavior across all projects.
Diagnostics#
Domain: OCT-CLI Levels:
L2 — lifecycle L3 — semantic details L4 — deep tracing
Contracts#
Must be installed as the console entry point for the OCT package.
Must not contain business logic; only dispatching.
Scaffolded
debug_config.jsonmust be a validoc_diagnosticsconfiguration.
Dependencies#
oct (package version)
oct.core.project_root (project root detection)
oct.linter.oct_lint (linter command implementation)
oct.formatter.oct_format (formatter command implementation)
oct.health.oct_health (health dashboard command)
oct.generator.new_python_file (new file scaffolding)
oct.diag.oct_diag (diagnostics config commands)
oct.deps.oct_deps (dependency graph command)
oct.hooks.oct_hooks (pre-commit hooks generator)
oct.typecheck.oct_typecheck (type-checking wrapper)
click (CLI framework)
- class oct.cli.OctGroup(name: str | None = None, commands: MutableMapping[str, Command] | Sequence[Command] | None = None, invoke_without_command: bool = False, no_args_is_help: bool | None = None, subcommand_metavar: str | None = None, chain: bool = False, result_callback: Callable[[...], Any] | None = None, **kwargs: Any)[source]#
Bases:
GroupCustom group that shows per-command flags in the main –help output.