repo-autopilot
v0.2.0
Published
AI-driven GitHub repository maintenance CLI
Downloads
20
Readme
repo-autopilot
repo-autopilot is an AI-driven GitHub repository maintenance CLI for handling stale issues, reviewing Dependabot PRs, and generating weekly health reports across open source repositories.
Install
pnpm install
pnpm buildFor local development:
pnpm exec repo-autopilot --helpQuick Start
Set a GitHub token with repo maintenance permissions:
repo-autopilot config set-token <github-token>Run maintenance for a repository:
repo-autopilot run owner/repo
repo-autopilot run owner/repo --dry-run
repo-autopilot run owner/repo --stale-only
repo-autopilot run owner/repo --dependabot-only
repo-autopilot run owner/repo --days-stale 45Generate a report:
repo-autopilot report owner/repo
repo-autopilot report owner/repo --format markdown
repo-autopilot report owner/repo --format markdown --output weekly-report.mdMaintain multiple repositories:
repo-autopilot config add owner/repo
repo-autopilot config listDefine maintenance schedules:
repo-autopilot schedule add "0 9 * * MON" --repos owner/repo-one,owner/repo-two
repo-autopilot schedule list
repo-autopilot schedule generate-crontabAudit label consistency:
repo-autopilot label-audit owner/repo-one owner/repo-two owner/repo-three
repo-autopilot label-audit owner/repo-one owner/repo-two --sync --dry-runCommands
run <owner/repo>
Runs stale issue detection, Dependabot PR checks, and prints a weekly health summary.
Options:
--dry-run: show pending actions without mutating GitHub--stale-only: only process stale issues--dependabot-only: only process Dependabot PRs--days-stale <n>: override the stale threshold for the current run
report <owner/repo>
Generates a weekly health report in terminal or markdown format.
Options:
--format <fmt>:markdownorterminal--output <file>: write the report to a file
config
repo-autopilot config set-token <token>repo-autopilot config add <owner/repo>repo-autopilot config list
schedule
repo-autopilot schedule add <cron> --repos <repo-a,repo-b>repo-autopilot schedule listrepo-autopilot schedule run <id>repo-autopilot schedule generate-crontab
Schedules are stored in ~/.repo-autopilot/schedules.json. Cron execution is not built into the CLI; generate-crontab prints entries that call repo-autopilot schedule run <id>.
label-audit <owner/repo...>
Audits labels across repositories, shows the shared and repo-specific sets, and can optionally create missing labels so all repos converge on one superset.
Options:
--sync: create missing labels in repos that do not already have them--dry-run: print the planned label creation actions without changing GitHub
Configuration
Configuration lives at ~/.repo-autopilot/config.json.
Example:
{
"githubToken": "ghp_xxx",
"repos": [
"owner/repo-one",
"owner/repo-two"
],
"stale": {
"daysUntilStale": 60,
"daysUntilClose": 90,
"staleLabel": "stale",
"staleComment": "This issue has been marked as stale due to inactivity. It will be closed if there is no further activity.",
"closeComment": "Closing this issue due to prolonged inactivity. Feel free to reopen with fresh context if the problem persists.",
"exemptLabels": [
"pinned",
"security",
"in-progress"
],
"closeQuestionsAfter": 90
},
"dependabot": {
"autoPatch": true,
"autoMinor": true,
"autoMajor": false,
"mergeMethod": "squash",
"skipIfDraft": true
}
}GitHub Token Setup
Use a fine-grained personal access token or GitHub App token with permissions for:
- Issues: read and write
- Pull requests: read and write
- Metadata: read
- Contents: read
You can also set GITHUB_TOKEN in the environment. The config file value takes precedence when present.
Use Case
repo-autopilot is designed for maintainers who want lightweight automation across multiple repositories without wiring up GitHub Actions or a larger bot stack. It keeps issue queues moving, clears low-risk dependency updates, and produces a repeatable weekly summary for repo health.
