v0.5.0 is out · What's new?

fsg

fsg/
├── file/         # respects .gitignore
├── structure/    # comments survive updates
└── generator.py  # keeps your README current

fsg prints clean project trees that respect .gitignore and keeps them current in your README – with a check for CI and a commit hook that does it for you.

$ uv tool install fsg
An example

Two markers, one command

Put the markers where the tree belongs and run fsg --update README.md. Options in the start marker apply to that tree only, and comments next to an entry survive every update.

Markers & sections
README.md
## Project structure <!-- fsg:start path=src dirs-only --> ```plaintext src/└── fsg/ ├── hooks/ # commit hook setup └── trees/ # git and plain directory walk ``` <!-- fsg:end -->

Respects .gitignore

Inside a git repository only files git tracks or would track are listed. Outside, build and tool directories like .venv, node_modules or target are skipped.

Never out of date

--update rewrites the marked block, --check fails CI when it is outdated and --setup-hook runs the update on every commit.

No dependencies

Pure Python 3.11+, MIT licensed. Runs with uvx on Linux, macOS and Windows without installing anything else.

Found a bug or missing an option?

Open an issue on GitHub. Pull requests are welcome, translations of these docs too.