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 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 & sectionsInside 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.
--update rewrites the marked block, --check fails CI when it is outdated and --setup-hook runs the update on every commit.
Pure Python 3.11+, MIT licensed. Runs with uvx on Linux, macOS and Windows without installing anything else.
Open an issue on GitHub. Pull requests are welcome, translations of these docs too.