API Reference
This section is generated via Sphinx autodoc.
Note
The public surface area is currently primarily the CLI. The Python API is small and may still evolve.
codecrate.cli
Core modules
- codecrate.packer.pack_repo(root: Path, files: list[Path], keep_docstrings: bool = True, dedupe: bool = False, symbol_backend: str = 'auto', *, file_texts: dict[Path, str] | None = None, max_workers: int = 0, encoding_errors: str = 'replace') tuple[PackResult, dict[str, str]][source]
- codecrate.markdown.render_markdown_result(pack: PackResult, canonical_sources: dict[str, str], layout: str = 'auto', nav_mode: Literal['compact', 'full'] = 'full', skipped_for_safety_count: int = 0, skipped_for_binary_count: int = 0, redacted_for_safety_count: int = 0, *, include_safety_report: bool = False, safety_report_entries: list[dict[str, str]] | None = None, include_manifest: bool = True, include_repository_guide: bool = True, include_symbol_index: bool = True, include_directory_tree: bool = True, include_environment_setup: bool = True, include_how_to_use: bool = True, manifest_data: dict[str, Any] | None = None, repo_label: str = 'repo', repo_slug: str = 'repo', focus_selection: FocusSelectionResult | None = None, usage_context: MarkdownUsageContext | None = None) RenderedMarkdown[source]
- codecrate.markdown.render_markdown(pack: PackResult, canonical_sources: dict[str, str], layout: str = 'auto', nav_mode: Literal['compact', 'full'] = 'full', skipped_for_safety_count: int = 0, skipped_for_binary_count: int = 0, redacted_for_safety_count: int = 0, *, include_safety_report: bool = False, safety_report_entries: list[dict[str, str]] | None = None, include_manifest: bool = True, include_repository_guide: bool = True, include_symbol_index: bool = True, include_directory_tree: bool = True, include_environment_setup: bool = True, include_how_to_use: bool = True, manifest_data: dict[str, Any] | None = None, repo_label: str = 'repo', repo_slug: str = 'repo', usage_context: MarkdownUsageContext | None = None) str[source]
- class codecrate.unpacker.UnpackIssue(severity: "Literal['warning', 'error']", path: 'str | None', message: 'str')[source]
Bases:
object
- codecrate.unpacker.unpack_to_dir(markdown_text: str, out_dir: Path, *, strict: bool = False, fail_on_warning: bool = False, check_machine_header: bool = False) list[UnpackIssue][source]
Utilities
- class codecrate.udiff.FileDiff(path: 'str', hunks: 'list[list[str]]', op: "Literal['add', 'modify', 'delete']")[source]
Bases:
object