An enterprise-grade, secret-free autonomous documentation engine that continuously scans repository codebases, discovers undocumented features, and generates high-impact Markdown READMEs using resilient multi-provider AI failover.
Key Features β’ Architecture β’ Dashboard β’ Quick Start β’ Configuration
AutoREADME operates as an autonomous sidecar for open-source and enterprise repositories. It listens for scheduled cron triggers or explicit API events, analyzes source code structures via read-only static analysis, synthesizes up-to-date documentation via multi-provider LLM chains, and streams live telemetry to an interactive glassmorphic dashboard.
graph TD
A["GitHub Actions Cron / Dispatch"] -->|"Trigger"| B["main.py Master Orchestrator"]
B --> C["Config Loader (YAML + ENV)"]
B --> D["Code Analyzer (Read-Only AST & Regex)"]
D -->|"Extracted Context"| E["AI Reviewer Engine"]
E -->|"1. Groq Llama-3.3-70B"| F["LLM Provider Failover Chain"]
E -->|"2. GitHub Models GPT-4o-mini"| F
E -->|"3. OpenRouter Llama-3.3-70B"| F
E -->|"4. Google Gemini 2.0 Flash"| F
E -->|"5. Deterministic Backup"| F
F -->|"Generated Markdown"| G["Smart Optimizer (SHA-256 Cache)"]
G -->|"Diff Verification"| H["Git Handler (Commit & Push)"]
B --> I["Supabase Logger (Cloud Telemetry)"]
I --> J["Vite + React 19 Observability Dashboard"]
Never suffer from API rate limits or single-provider outages. AutoREADME features an intelligent, multi-tier fallback chain:
- Groq:
llama-3.3-70b-versatile(Ultra-low latency primary) - GitHub Models:
gpt-4o-mini(High-accuracy fallback) - OpenRouter:
meta-llama/llama-3.3-70b-instruct:free(Community fallback) - Google Gemini:
gemini-2.0-flash(Generative fallback) - Deterministic Timestamp Backup: Guarantees zero workflow failures even during total AI service outages.
The engine includes a dedicated, 100% read-only AST and regex parser (code_analyzer.py) that extracts:
- Class definitions, public methods, and function signatures.
- API endpoints and web routes (Flask, FastAPI, Express, Django).
- Environment variable requirements (
os.getenv,process.env). - CLI arguments (
argparse), dependencies (package.json,requirements.txt), and Docker configurations. The source code analysis is automatically injected into the AI context to discover undocumented features without ever touching source files.
- Computes SHA-256 hashes of target README files before executing AI calls.
- Skips redundant LLM requests when documentation content is up to date, saving API token quotas and runner execution minutes.
Built with React 19, Vite, Recharts, and Lucide Icons:
- Real-time tracking of AI token consumption, runner latency, and 5-day commit heatmaps.
- One-click RUN manual trigger, LOW-POWER maintenance mode toggle, and emergency KILL-SWITCH lock.
- Interactive DiffViewer to compare original vs. AI-improved markdown directly in the UI.
- 100% sanitized for open-source distribution.
- All credentials (API keys, GitHub PATs, Supabase keys) are dynamically loaded from environment variables or GitHub Secrets.
- RPC functions (
update_config_secure) enforce secure password verification for remote database modifications.
AutoREADME/
βββ .github/
β βββ workflows/
β βββ auto-improve.yml # Automated workflow schedule & API dispatch listener
βββ dashboard/ # Observability dashboard (React 19 + Vite + Recharts)
β βββ api/ # Vercel serverless edge functions (Auth, Trigger, Schedule)
β βββ src/ # Dashboard components, charts & DiffViewer
β βββ vite.config.js
βββ ai_reviewer.py # Multi-provider LLM orchestration layer
βββ code_analyzer.py # Read-only static code & AST analyzer
βββ config_loader.py # YAML & environment configuration parser
βββ git_handler.py # Autonomous git clone, commit, & push handler
βββ main.py # Master orchestrator entrypoint
βββ optimizer.py # SHA-256 hashing cache & token optimizer
βββ supabase_logger.py # Telemetry & cloud database logger
βββ supabase_schema.sql # PostgreSQL schema, RLS policies, & RPC functions
βββ config.yaml # System & repository configuration file
βββ .env.example # Environment variables template
βββ requirements.txt # Python dependencies
- Python:
3.10or higher - Node.js:
18.0or higher - Git: Installed locally
Clone the repository and create your local environment file:
git clone https://github.com/your-username/AutoREADME.git
cd AutoREADME
cp .env.example .envEdit .env with your API credentials:
# AI Provider Credentials (Provide at least one)
GEMINI_API_KEY=your_gemini_api_key
GROQ_API_KEY=your_groq_api_key
OPENROUTER_API_KEY=your_openrouter_api_key
# GitHub Credentials (For autonomous git commits & API triggers)
GITHUB_TOKEN=your_github_pat_token
GITHUB_USERNAME=your_github_username
GITHUB_REPO=your_username/your_repo
# Cloud Telemetry (Optional)
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your_supabase_anon_key
# Dashboard Protection
DASHBOARD_PASSWORD=your_secure_passwordpip install -r requirements.txtExecute the orchestrator to analyze target repositories and update documentation:
python main.pycd dashboard
npm install
npm run devOpen http://localhost:5173 in your browser to inspect live telemetry and trigger manual runs.
Customize how AutoREADME monitors and refines target repositories:
# Repositories to monitor and improve automatically
repos:
- "https://github.com/your-username/your-project-1"
- "https://github.com/your-username/your-project-2"
# Primary documentation improvement objectives
readme_goals:
- "Improve technical clarity, tone, and professional structure"
- "Fix grammar, spelling, and Markdown formatting errors"
- "Ensure complete installation, dependency, and usage instructions"
- "Discover and add undocumented features discovered via source code analysis"
# Read-only source scanner extensions
source_scan_extensions:
- ".py"
- ".js"
- ".ts"
- ".jsx"
- ".tsx"
- ".java"
- ".go"
- ".sh"
- ".yml"
# Performance & Quota Guardrails
force_change: true # Force commit activity check
maintenance_mode: false # Low-power mode (skips heavy LLM passes)
max_files_per_repo: 5
max_tokens_per_file: 8000- Zero Credential Leaks: Credentials are never written to repository files or committed to Git.
- Read-Only Code Analysis: The static analyzer strictly reads file content and produces in-memory feature summaries. It has zero code modification permissions.
- RPC Password Authentication: Administrative actions (toggling maintenance mode, updating execution schedules) require authentication via Supabase RPC security definers.
Built by Aradhya Sonar for Autonomous Operations