README Generator
Create a polished, accurate README.md from the project files that actually exist. Prefer evidence from manifests, source files, comments, and command output over generic filler.
Workflow
- Inspect the project root before writing:
- Node:
package.json - Python:
requirements.txt,pyproject.toml,setup.py, orsetup.cfg - Go:
go.mod - Rust:
Cargo.toml - Java:
pom.xml,build.gradle, orbuild.gradle.kts - Make commands:
Makefile - License:
LICENSE,LICENSE.md, or package manifest license fields
- Node:
- Detect the main entry point:
- Node/TypeScript:
package.jsonmain,bin,exports,src/index.ts,src/index.js,index.js, orserver.js - Python:
main.py,app.py, package console scripts, or__main__.py - Go:
main.goorcmd/*/main.go - Rust:
src/main.rs,src/lib.rs, or[[bin]]entries inCargo.toml - Java: Maven/Gradle application plugin config or
src/main/java/**/Main.java
- Node/TypeScript:
- Extract dependencies only from actual manifests:
- Node:
dependencies,devDependencies,peerDependencies, andoptionalDependencies - Python:
requirements.txt,pyproject.toml,setup.py, orsetup.cfg - Go:
requireblocks ingo.mod - Rust:
[dependencies],[dev-dependencies], and[build-dependencies] - Java: Maven dependencies or Gradle dependencies
- Node:
- Extract scripts and commands:
- Node:
package.jsonscripts - Make: targets from
Makefile - Python: console scripts in package metadata, common commands from project files
- Go/Rust/Java: standard build, test, and run commands when the matching manifest exists
- Node:
- Infer description cautiously:
- Prefer
package.json/manifest description fields. - Otherwise use top-level comments, module docstrings, existing docs, or repository/folder name.
- If there is not enough evidence, write a modest one-sentence description and mark unknown specifics as TODO.
- Prefer
- Generate the README with:
- Title from package name, manifest name, or directory name
- Badges for license, primary language, version, and build status placeholder
- Description
- Installation instructions for the detected language
- Usage examples from
--helpoutput when safe to run, otherwise from scripts and entry points - API documentation when JSDoc, docstrings, Go comments, Rust doc comments, or JavaDoc are present
- Contributing guidelines
- License section from detected license or a prompt/TODO when unknown
Template Reference
Read references/templates.md when choosing language-specific README sections, badge patterns, or install command templates. Keep the final README tailored to the current repository rather than copying every optional section.
Accuracy Rules
- Do not hallucinate dependencies, commands, entry points, environment variables, APIs, or deployment steps.
- Only include dependencies and scripts that were found in real files.
- Use TODO markers for important unknowns instead of inventing facts.
- Do not run commands that mutate the project while collecting README evidence.
- Only run
--helpcommands when they are likely safe and local; skip them if the command may start servers, install packages, modify files, or call external services. - Keep Markdown valid with one
#title, proper heading levels, fenced code blocks, and no broken table syntax.
Output Shape
When asked to create or update a README, write or update README.md in the project root unless the user specifies another path. Summarize the evidence used and list any TODOs that remain because the repository did not contain enough information.