| Crates.io | tldrs |
| lib.rs | tldrs |
| version | 0.1.3 |
| created_at | 2025-07-06 06:54:32.5625+00 |
| updated_at | 2025-07-08 15:21:00.344502+00 |
| description | README.md generator powered by LLMs and codebase analysis |
| homepage | |
| repository | https://github.com/pixperk/tldrs |
| max_upload_size | |
| id | 1739868 |
| size | 111,406 |
TL;DR for your codebase - Automatically generate comprehensive README.md files using AI
tldrs is a powerful command-line tool that automatically generates professional README.md files by analyzing your codebase using Large Language Models (LLMs). Save hours of documentation work and ensure consistency across your projects.
Install tldrs from crates.io:
cargo install tldrs
Set up your API key (choose one):
# For Google Gemini (recommended - free tier available)
export GEMINI_API_KEY="your-gemini-api-key"
# For OpenAI
export OPENAI_API_KEY="your-openai-api-key"
Generate a README:
# In your project directory
tldrs readme
# Or specify a path
tldrs readme /path/to/your/project
Your README.md is ready! π
tldrs readme [OPTIONS] [PATH]
| Option | Description | Example |
|---|---|---|
-p, --provider <PROVIDER> |
LLM provider (gemini or openai) |
--provider openai |
-a, --api-key <API_KEY> |
API key for the selected provider | --api-key sk-... |
-s, --streaming |
Enable real-time streaming mode | --streaming |
--prompt <PROMPT> |
Custom prompt for generation | --prompt "Focus on API docs" |
--prompt-file <FILE> |
Load custom prompt from file | --prompt-file prompts/api.txt |
--instructions <TEXT> |
Additional instructions | --instructions "Add benchmarks" |
-h, --help |
Show help information | --help |
# Generate README with default settings (Gemini)
tldrs readme
# Use OpenAI instead
tldrs readme --provider openai
# Watch the README generate in real-time
tldrs readme --streaming
# Use a custom prompt directly
tldrs readme --prompt "Create a README focusing on installation and basic usage only"
# Load prompt from file
tldrs readme --prompt-file my-custom-prompt.txt
# Add extra instructions to default prompt
tldrs readme --instructions "Include performance benchmarks and add emoji for better readability"
# Combine custom prompt with additional instructions
tldrs readme --prompt-file technical-prompt.txt --instructions "Focus on enterprise deployment"
# Pass API key directly (not recommended for scripts)
tldrs readme --api-key "your-api-key-here"
# Use with specific provider
tldrs readme --provider openai --api-key "sk-your-openai-key"
tldrs uses environment variables for API key configuration:
# Google Gemini (Free tier available)
export GEMINI_API_KEY="your-gemini-api-key"
# OpenAI (Paid service)
export OPENAI_API_KEY="sk-your-openai-api-key"
Create a text file with your custom prompt:
# example-prompt.txt
You are a technical writer creating documentation for a software project.
Generate a README that includes:
1. A compelling project description
2. Clear installation instructions
3. Basic usage examples
4. API documentation if applicable
5. Contributing guidelines
Focus on clarity and include code examples where relevant.
Use a professional but approachable tone.
Use it with:
tldrs readme --prompt-file example-prompt.txt
Code Analysis: tldrs scans your project directory, analyzing:
Content Extraction: Intelligently filters and prioritizes:
AI Generation: Sends structured context to your chosen LLM with:
Output Creation: Generates a professional README.md with:
"API key not valid" error
# Verify your API key is set correctly
echo $GEMINI_API_KEY
# or
echo $OPENAI_API_KEY
# Make sure there are no extra spaces or quotes
export GEMINI_API_KEY="your-key-without-quotes"
"Cannot specify both --prompt and --prompt-file" error
# Use only one prompt option at a time
tldrs readme --prompt "your prompt"
# OR
tldrs readme --prompt-file prompt.txt
Empty or poor quality README
--instructions to guide the AI--streaming) to see generation progressLarge project timeouts
We welcome contributions! Here's how to get started:
Clone the repository:
git clone https://github.com/pixperk/tldrs.git
cd tldrs
Install dependencies:
cargo build
Run tests:
cargo test
Run locally:
cargo run -- readme --help
.tldrs.toml config filesThis project is licensed under the MIT License - see the LICENSE file for details.
Made with tldrs? Add this badge to your README:
[](https://github.com/pixperk/tldrs)