Skip to content

Conf Cmd

Configuration management commands.

logger module-attribute

logger = getLogger(__name__)

ForceOpt module-attribute

ForceOpt = Annotated[
	bool,
	Option(
		"--force",
		"-f",
		help="Overwrite existing configuration file.",
	),
]

PathOpt module-attribute

PathOpt = Annotated[
	str | None,
	Option(
		"--path",
		"-p",
		help="Path to the configuration file. Defaults to .codemap.yml in the repo root.",
	),
]

register_command

register_command(app: Typer) -> None

Register the configuration commands with the main app.

Source code in src/codemap/cli/conf_cmd.py
27
28
29
30
31
32
33
34
35
36
def register_command(app: typer.Typer) -> None:
	"""Register the configuration commands with the main app."""

	@app.command("conf")
	def conf_command(
		force: ForceOpt = False,
	) -> None:
		"""Create a default .codemap.yml configuration file in the project root."""
		# Defer heavy imports and logic to the implementation function
		_conf_command_impl(force=force)