@kazoottt/github-repo-cleaner
v0.1.2
Published
Local TUI for cleaning GitHub repositories with gh authentication.
Readme
github-repo-cleaner
Local terminal UI for cleaning GitHub repositories.
The tool reuses GitHub CLI authentication, loads repositories for the active GitHub user, makes forks easy to identify, and supports archive/delete workflows with a page-level second confirmation.
Install
npm install -g @kazoottt/github-repo-cleanerRun either command:
repo-cleaner
github-repo-cleanerAuthentication
This tool expects gh to own credentials:
gh auth login
gh auth refresh -h github.com -s delete_repoThe app reads the active token from gh auth token and does not store PATs or GitHub tokens.
Usage
repo-cleaner
repo-cleaner --owner KazooTTTKeys:
up/down move
space select repository
f toggle forks-only
s toggle sort oldest/newest
/ search
a archive mode
d delete mode
enter review selected repositories
esc cancel review
q quitDevelopment
npm install
npm run dev
npm test
npm run typecheck
npm run buildRelease
Releases are created locally with bumpp and published by GitHub Actions when a v* tag is pushed.
npm run releaseThe release script runs tests, typecheck, and build before bumpp creates the version commit and tag.
npm trusted publishing setup
This project is configured for npm trusted publishing with provenance. No NPM_TOKEN secret is required.
Expected identities:
GitHub owner: KazooTTT
GitHub repository: github-repo-cleaner
npm package: @kazoottt/github-repo-cleaner
Workflow filename: publish.ymlSetup steps:
- Push this repository to GitHub as
KazooTTT/github-repo-cleaner. - Sign in to npm as the owner of the
@kazootttscope. - Open the npm package access/settings page for
@kazoottt/github-repo-cleaner:https://www.npmjs.com/package/@kazoottt/github-repo-cleaner/access. - Add a trusted publisher with:
- Owner:
KazooTTT - Repository:
github-repo-cleaner - Workflow filename:
publish.yml - Environment name: leave empty unless the workflow is changed to use one
- Owner:
- For the first publish only, either:
- Run
npm publish --access publiclocally as the npm owner of the@kazootttscope. - Or add a temporary
NPM_TOKENrepository secret with publish access and rerun thePublishworkflow.
- Run
- Add the trusted publisher in the package settings.
- Remove the temporary
NPM_TOKENsecret if you used one for bootstrap. - For later releases, run
npm run releaselocally. - Confirm the pushed tag triggers the
Publishworkflow in GitHub Actions.
After trusted publishing is configured, the publish workflow runs:
npm ci
npm test
npm run typecheck
npm run build
npm publishIssue Tracker
Local implementation issues live under .scratch/issues/.
