Repository quality toolkit for open source maintainers. Scan any repo in seconds. Fix issues with or without AI. Runs offline. Offline first. AI when you need it.
RepoTune is a developer-first tool that helps you maintain a pristine repository. It can instantly bootstrap standard open-source community files (Offline), and optionally uses AI to fill in the missing pieces, update outdated configurations, and fix weak areas specific to your project.
- Offline Initialization: Instantly bootstrap standard open-source templates (README, SECURITY, CONTRIBUTING, etc.) locally in milliseconds.
- Bring Your Own Agent: Seamlessly delegate tasks to external AI CLIs like
claude,cursor-agent,aider, orgoosewithout configuring API keys. - Intelligent Auditing: Detect missing community files, outdated configurations, and weak documentation.
- Multi-Provider Support: Built-in support for OpenAI, Anthropic, Gemini, OpenRouter, Groq, and local models via Ollama.
- Privacy First: Explicitly shows you the prompt and context before sending anything.
Install globally to use it anywhere:
npm install -g repotuneOr, to try it with zero commitment:
npx repotune@latest scanRepoTune is designed to accommodate any workflow—whether you prefer AI, want to keep it 100% offline, or already use an AI coding agent.
If you have a fresh project, instantly bootstrap community standard files using built-in templates. This runs entirely locally and requires no API keys.
repotune initThis generates README.md, SECURITY.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, CHANGELOG.md, Issue/PR templates, and Licenses.
Run this command in any repository to immediately see what is missing or broken. This step is 100% offline and makes zero changes to your files.
repotune scanWhen you run repotune doctor, it will walk you through every issue found in the scan and offer to fix it. There are three modes you can use:
If you don't configure any AI, RepoTune operates safely offline. It uses your repository context (package.json names, etc.) to copy and populate standard templates.
repotune doctorIf you already use an AI CLI like Claude Code, Cursor, Codex, Gemini, or OpenCode, you don't need to give RepoTune an API key. Just pass the --agent flag! RepoTune analyzes your repo, constructs the perfect prompt, and delegates the task to your existing agent.
repotune doctor --agent claude
repotune doctor --agent cursor
repotune doctor --agent codex
repotune doctor --agent gemini
repotune doctor --agent opencodeCustom Agents You can also use completely custom external agents by passing their command string. RepoTune will intelligently execute it as a background process and inject the prompt as the final argument. Ensure your custom agent is configured to run non-interactively so it doesn't hang!
repotune doctor --agent "my-custom-cli --non-interactive run"
repotune doctor --agent "/path/to/my-agent-script.sh"To avoid typing your custom agent command every time, you can permanently save it to your config:
repotune config --custom-agent "my-custom-cli --non-interactive run"
repotune doctor # Automatically uses your custom agent!If you configure an API key (repotune config), RepoTune will use that provider (OpenAI, Anthropic, Gemini, Groq, Ollama) directly to generate tailored fixes.
repotune doctorRepoTune's core value comes from its static analysis checks. File existence checks are just the baseline; cross-file consistency analysis is where it excels.
- Documentation: Verifies the existence and depth of README, LICENSE, CONTRIBUTING, SECURITY, CHANGELOG, and Code of Conduct files.
- Automation: Checks for GitHub Actions CI workflows, Release workflows, and dependency updaters like Dependabot or Renovate.
- Community: Ensures you have Issue templates, Pull Request templates, and Funding configurations.
- Consistency:
- Package Manager: Detects if your README says "yarn install" but you switched to "pnpm".
- Node Version: Detects if your CI pins Node 18 but your package.json requires Node >= 22.
- Stale Badges: Detects if your README CI badge points to a workflow file that no longer exists.
- Metadata: Checks for missing package description, keywords, and outdated License years.
- Weakness: Analyzes existing files (like CONTRIBUTING.md) to see if they are just one-line stubs that need expansion.
Scans your repository for quality issues offline. Outputs a final Repository Quality Score out of 100. Options:
--json: Output results as JSON for scripting.--fail-under <score>: Exit with a non-zero code if the score is below a threshold (perfect for CI pipelines).
The interactive auto-fixer. It will review missing, outdated, and weak files, and ask for your approval to generate or update them. Options:
--fix: Automatically apply safe, mechanical fixes (like updating the license year) without prompting.--agent <name>: Delegate AI tasks to an external CLI (claude,cursor,codex,gemini,opencode).
Bootstrap a repository with standard open-source templates instantly and completely offline.
Configures your AI provider and API keys interactively. Keys are validated instantly during setup. Options:
--provider <name>: Set provider non-interactively.--remove-key: Remove stored API key.--reset: Clear all configuration.--show: Show current configuration.
Explains what a repository health file is, why it matters, and shows an example.
Generates GitHub Actions workflow files interactively, providing inline explanations for each choice.
Generates a markdown badge showing your current repository score that you can paste directly into your README.
Manages anonymous usage data sharing.
RepoTune is built with strict privacy guarantees:
- Local First:
scan,init,ci,badge, andexplainrun 100% locally. No network calls, no API key needed. - Explicit Data Disclosure:
doctorexplicitly shows what is being sent to your selected provider or external agent before you confirm. - Secure Storage: Your API key is stored at 0600 permissions locally and never transmitted anywhere except the AI provider's official API endpoint.
Contributions are welcome. Please run npm run test:all before submitting any pull requests.
MIT License. See LICENSE for details.