Skip to content

sarthak-cs/ReadmeGen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReadmeGen


📌 Description

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.


✨ Features

  • 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

Differentiates between:

  • Standard library modules
  • Internal project modules
  • Third-party dependencies

⚙️ How It Works

  • 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.

🧑‍💻 Usage

python cli.py /path/to/project

If no path is provided, the current directory is used.


📂 Project Structure

├── 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


⚠️ Limitations

  • Dependency detection is based on static imports only.
  • Dynamic imports and runtime dependencies are not detected.
  • Package versions are not inferred automatically.

🚀 Future Improvements (Optional)

  • CLI flags (--help, --dry-run)
  • Config file for aliases and badges
  • Better handling of large mono-repos

Example

See EXAMPLE.md for a full generated README example.


👨‍💻 Author

Sarthak Tyagi

About

A python Tool that generates a README.md

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages