Skip to content

A CLI that automatically generates Fern markdown API documentation for your Python packages.

License

Notifications You must be signed in to change notification settings

fern-api/sphinx-autodoc2-fern

 
 

Repository files navigation

py2fern

Generate Fern API documentation from Python packages using static analysis.

Simplified fork of sphinx-autodoc2 focused purely on Python → Fern markdown output.

Installation

pipx install py2fern

Usage

Generate Fern markdown documentation:

py2fern write /path/to/your/package

Specify output directory:

py2fern write /path/to/your/package --output ./docs/api

This creates:

  • MDX files with Fern-compatible frontmatter and slugs
  • navigation.yml for Fern docs structure

Acknowledgments

This project is a fork of the excellent sphinx-autodoc2 by Chris Sewell. All credit for the core functionality goes to the original project.

Development

All configuration is mainly in pyproject.toml.

Use tox to run the tests.

pipx install tox
tox -av

Use pre-commit to run the linters and formatters.

pipx install pre-commit
pre-commit run --all-files
# pre-commit install

flit is used to build the package.

pipx install flit
flit build

About

A CLI that automatically generates Fern markdown API documentation for your Python packages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%