Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

code2schema Documentation

Structure

docs/
├── examples/
│   ├── cli/
│   │   └── basic.sh          # CLI usage examples
│   ├── api/
│   │   ├── basic.py          # Basic Python API
│   │   └── advanced.py       # Advanced Python API
│   └── outputs/
│       ├── schema-sample.json
│       └── report-sample.md
└── README.md                 # This file

Quick Links

CLI Usage

See examples/cli/basic.sh for common patterns:

# Basic analysis
code2schema ./backend

# Generate all formats
code2schema ./backend --proto --md --html

# Full analysis with diagnostics
code2schema ./backend --proto --md --html --graph-summary --events --cycles

Python API

See examples/api/ for programmatic usage:

from code2schema import extract_project, analyze
from code2schema.codegen import to_json, to_proto, to_markdown

modules = extract_project(Path("./backend"))
schema = analyze(modules)

# Export
Path("schema.json").write_text(to_json(schema))
Path("api.proto").write_text(to_proto(schema))
Path("report.md").write_text(to_markdown(schema))