readmegen is a CLI tool made with Python that automatically generates clean, professional README files for Python projects. It analyzes a project’s structure, detects internal and third-party dependencies using static analysis and produces a well-formatted README with sections like Description, Tech Stack, Project Structure, How to Run and Author name. The tool is designed to save time while keeping documentation accurate and human-readable.
- Description is generated by 3 ways: "If Doctring is present" or "If given by user" else an "Auto-Genrated" text
- Static import detection using Python AST (no code execution)
- Automatic tech stack detection with proper naming
- Badge generation for detected technologies
- Project structure visualization
- Template-based README generation
- Works on arbitrary Python projects
- Standard library modules
- Internal project modules
- Third-party dependencies
- Scans the target directory for Python files.
- Uses Python’s ast module to detect imports without executing code.
- Filters out standard library and internal modules.
- Normalizes third-party libraries using aliases (e.g., Google Generative A.I., NumPy).
- Detects project type (web or general Python).
- Generates a README using predefined templates.
python cli.py /path/to/project
├── cli.py
├── detectors
│ └── project_type.py
├── generator
│ ├── description.py
│ ├── readme.py
│ └── run.py
├── scanner
│ ├── files.py
│ ├── imports.py
│ ├── internal.py
│ ├── stdlib.py
│ └── structure.py
└── templates
├── python.md
└── web.md
- Dependency detection is based on static imports only.
- Dynamic imports and runtime dependencies are not detected.
- Package versions are not inferred automatically.
- CLI flags (--help, --dry-run)
- Config file for aliases and badges
- Better handling of large mono-repos