An intelligent GitHub README generator powered by the Mastra framework and Claude AI. This project automatically analyzes GitHub repositories and generates comprehensive, well-structured README.md files by examining code structure, commit history, and project patterns.
- AI-Powered Analysis: Uses Claude 3.5 Sonnet to intelligently analyze repository structure and content
- Comprehensive Code Scanning: Examines TypeScript, JavaScript, Python, Java files and configuration files
- Commit History Integration: Incorporates recent commit messages to understand project evolution
- Agent-Based Architecture: Built with Mastra framework for robust tool orchestration
- Memory Persistence: Maintains conversation context using LibSQL storage
- Automated Markdown Generation: Produces clean, properly formatted README files
- Multi-Tool Integration: Combines file analysis, content fetching, and commit tracking
The generated README includes:
- Project title with appropriate emoji
- Feature descriptions
- Installation and setup instructions
- Technology stack overview
- Project structure visualization
- Recent commit activity
- Contributing guidelines
git clone https://github.com/Nika-HISK/ReadMe-maker.gitcd ReadMe-makernpm installCreate a .env file in the root directory:
ANTHROPIC_API_KEY=your_anthropic_api_key_here
GITHUB_TOKEN=your_github_token_herenpm startOnce running, you can chat with the GitHub agent:
# Example conversation
You: "Generate a README for facebook/react"
Agent: [Analyzes repository and returns complete README.md content]
You: "Create documentation for microsoft/vscode"
Agent: [Generates comprehensive README for VS Code repository]- Mastra Framework: Agent orchestration and tool management
- Claude 3.5 Sonnet: AI model for intelligent README generation
- Octokit: GitHub API client for repository data fetching
- LibSQL: Local database for conversation memory
- Zod: Runtime type validation and schema definition
- TypeScript: Type-safe development environment
src/
βββ mastra/
β βββ agents/
β β βββ github-agent.ts
β βββ lib/
β β βββ utils.ts
β βββ tools/
β β βββ generateReadmeFromRepo.ts
β β βββ getFileContent.ts
β β βββ getFilePaths.ts
β β βββ getRepositoryCommits.ts
β βββ index.ts
| Variable | Description | Required |
|---|---|---|
ANTHROPIC_API_KEY |
Your Anthropic API key for Claude access | Yes |
GITHUB_TOKEN |
GitHub personal access token for API access | Yes |
The GitHub agent is configured with:
- Model: Claude 3.5 Sonnet (claude-3-5-sonnet-20241022)
- Memory: LibSQL-based persistent storage
- Tools: File analysis, content fetching, commit tracking, README generation
- Repository Analysis: The agent scans the target repository structure
- Content Extraction: Fetches important files (TypeScript, JavaScript, Python, Java, configs)
- Commit History: Retrieves recent commit messages for context
- AI Processing: Claude analyzes the gathered data to understand the project
- README Generation: Creates a comprehensive README with proper formatting
- Validation: Ensures markdown formatting is correct and clean
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Node.js (v18 or higher)
- Anthropic API key
- GitHub personal access token
- Basic understanding of TypeScript and AI agents
- Visit Anthropic Console
- Create an account or sign in
- Generate an API key
- Add it to your
.envfile
- Go to GitHub Settings β Developer settings β Personal access tokens
- Generate a new token with repository access permissions
- Add it to your
.envfile
Generate a README for vercel/next.js
# Next.js β‘
The React Framework for Production
## β¨ Features
- Zero-config setup
- Automatic code splitting
- Server-side rendering
- Static site generation
- Built-in CSS support
## π How to Run
### 1. Clone the Repository
git clone https://github.com/vercel/next.js.git
### 2. Navigate to Project Directory
cd next.js
### 3. Install Dependencies
npm install
### 4. Run Development Server
npm run dev
## π οΈ Technologies Used
- React
- TypeScript
- Webpack
- Babel
## π Project Structure
βββ packages/
β βββ next/
β βββ create-next-app/
βββ examples/
βββ docs/
βββ test/
## π Recent Changes
- feat: add support for React 18
- fix: resolve hydration mismatch
- docs: update getting started guideMIT License - feel free to use this project for your own README generation needs!
- Mastra Framework: For providing excellent agent orchestration capabilities
- Anthropic: For the powerful Claude AI model
- GitHub: For the comprehensive API that makes repository analysis possible