@technomoron/repo-check
v0.1.1
Published
Small repo maintenance CLI for generic repository housekeeping.
Readme
repo-check
Small repo maintenance CLI for generic repository housekeeping.
Commands
repo-check check [path]
repo-check check --all [path]
repo-check sync [path]
repo-check sync --all [path]
repo-check clonerepo-check check checks the current package directory by default.
repo-check check --all recursively finds package directories under the target
directory and checks each one.
repo-check sync runs git pull for the enclosing git repo of the target path.
repo-check sync --all recursively finds git repositories under the target
directory and runs git pull in each one.
repo-check clone is reserved but not implemented yet.
What It Checks
For each package directory it checks, repo-check currently verifies:
- the directory contains a
package.json - the directory is inside a git repository
- the enclosing git repo path follows a two-tier structure:
<org>/<repo> - the package identity is
@<org>/<package-dir-name> package.jsonexists and is valid JSONpackage.json.nameis exactly@<org>/<package-dir-name>package.json.versionexists and is non-emptypackage.json.licenseexists and is non-emptypackage.json.copyrightexists and is non-empty- a package-local
LICENSEfile exists - the package
LICENSEfile contains the exact copyright string frompackage.json.copyright - a package-local
CHANGESfile exists - the first
Version ...line inCHANGESmatchesVersion <package.json.version> (<YYYY-MM-DD>) - the year in the top
CHANGESversion line appears inpackage.json.copyright - the enclosing git repo
originremote matches<org>/<repo> - the enclosing git repo branch has an upstream configured
- the enclosing git repo can fetch upstream updates
- the enclosing git repo branch is exactly in sync with its upstream
- the enclosing git repo does not contain agent files or agent directories such as
AGENTS.md,CLAUDE.md,codex.md,.claude, or.codex - the enclosing git repo has a repo-root lockfile such as
pnpm-lock.yaml,package-lock.json,yarn.lock,bun.lockb, orbun.lock - any GitHub workflow under
.github/workflowsusesactions/setup-node@v6 - any GitHub workflow under
.github/workflowssetsnode-version: 24 - GitHub workflows do not reference
node20ornode22 - the git working tree is clean for files under that package directory
- if there are modifications beyond
CHANGESin that package directory, then that package'sCHANGESmust also be modified
Exit status:
0if every checked repository passes1if any check fails or if the CLI usage is invalid
Install
npm install -g @technomoron/repo-check