Command Line Interface (CLI)
- copcon.cli.main(directory=<typer.models.ArgumentInfo object>, depth=<typer.models.OptionInfo object>, exclude_hidden=<typer.models.OptionInfo object>, copconignore=<typer.models.OptionInfo object>, output_file=<typer.models.OptionInfo object>, git_diff=<typer.models.OptionInfo object>)
Copcon CLI entry point.
- Behavior:
If –copconignore is passed, we use that path directly.
Otherwise, we try discover_copconignore(directory) to see if there’s a .copconignore.
If none is found, we only apply internal .copconignore patterns.
Additionally, if a .copcontarget is discovered, it’s applied before .copconignore.
If the –git-diff flag is provided, the output of ‘git diff HEAD’ will be appended to the context report and its token count added to the token spend report.