Skip to main content

cod8a

cod8a pronounced codetta, is a code documentation and visualization tool for Python and .NET projects.

Installation

Prerequisites

From PyPI

Install cod8a directly using pip:

pip install cod8a

Usage

The tool uses a CLI interface to analyze code and generate mermaid diagrams.

UML Diagrams

Generate Mermaid-compatible diagrams (Class, Sequence, Flowchart):

# General syntax
cod8a uml -p <path_to_source> -d <diagram_type>

# Generate a class diagram (default)
cod8a uml -p <path_to_source>

# Generate a sequence diagram
cod8a uml -p <path_to_source> -d sequence

# Generate a flowchart
cod8a uml -p <path_to_source> -d flow

# Summarize a large project (omit fields/methods)
cod8a uml -p <path_to_source> --summarize

# Force full diagram details for a large file
cod8a uml -p <path_to_source> --no-summarize

Diagram Type Options:

  • Class: class, c
  • Sequence: sequence, seq, s
  • Flowchart: flowchart, flow, f

Visualizing Diagrams

The generated .mmd files can be visualized using several tools:

  • Mermaid Live Editor: Simply copy and paste the generated output into the editor to view and export the diagram as an image (SVG, PNG).
  • VS Code: Install the Mermaid Editor or Markdown Mermaid Preview extension to see live previews directly in your IDE.
  • GitHub: GitHub natively renders Mermaid diagrams in Markdown files.

Samples

Below are detailed example Mermaid diagrams generated by cod8a based on its own src/cod8a/models/models.py file:

CLI Options

  • -p, --path: Path to the file or directory to analyze.
  • -d, --diagram: Type of diagram to generate (default: class).
  • -o, --output: Output file path (saves as .mmd).
  • -s, --summarize / --no-summarize: Enable or disable diagram summarization. When enabled, details like fields and methods are omitted (useful for large files). Defaults to auto-summarize for large files.

Documentation (In development)

Note: This feature is currently in development.

Generate Markdown documentation from code structure:

# Not yet implemented
cod8a doc -p <path_to_source>

Features

  • Mermaid Integration: Generates high-quality Mermaid.js diagrams for visualization.
    • Supported Diagrams: Class, Sequence, and Flowchart diagrams.
  • C# Support: Uses a Roslyn-based analyzer targeting .NET 10.0 to extract deep structural information.
  • Python Support: Uses AST-based parsing for Python files.
  • Markdown Documentation (TODO): Detailed markdown generation for code documentation is currently in development.

Development

Setup

  1. Fork the repository on GitHub.
  2. Clone your fork:
git clone https://github.com/yourusername/cod8a.git
cd cod8a

Development Options

1. Local Setup

  1. Install Python dependencies:

Using Poetry (recommended):

poetry install
  1. Optional: Ensure .NET 10.0 is installed (if documenting C#)
dotnet --version

2. VS Code Dev Container (Recommended)

If you use VS Code, you can skip the local setup by using the provided Dev Container. It comes pre-configured with Python 3.13, .NET 10.0, and Poetry.

  • Simply open the project in VS Code and click "Reopen in Container" when prompted.

3. Docker

You can also run cod8a as a standalone container without installing any dependencies locally:

# Build the image
docker build -t cod8a .

# Run the tool
docker run -v $(pwd):/app/data cod8a uml -p /app/data/src

Metadata

Release files for cod8a 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cod8a 0.3.1
File Size Uploaded Provenance
cod8a-0.3.1.tar.gz 21.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cod8a 0.3.1
File Interpreter ABI Platform
cod8a-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 49.8 kB

Release files / cod8a-0.3.1.tar.gz

Download URL cod8a-0.3.1.tar.gz
Size 21.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fade1ec7db0b6f573c5ac839e64828f895a2f060b5d59cc3b52783bff4c9a1c5
BLAKE2b-256 checksum
How to use checksums
f67135e13ade7f77f20dfb6ae7ed7b58570efdeaec8c817c8ffecbd69f9d95a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 2, 2026.

Transparency log

Release files / cod8a-0.3.1-py3-none-any.whl

Download URL cod8a-0.3.1-py3-none-any.whl
Size 28.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7be38597cfba7b07ecad581bf21bc6c5501e3cf6646af1b7a1c57eee3709abd9
BLAKE2b-256 checksum
How to use checksums
c2c76e24c88ae2f3670627427981a270a69bc8ca007e8759a6dacb32f57a6f29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 2, 2026.

Transparency log

Security for cod8a 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cod8a-0.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page