Dev environment notes specific to this repo. Shared conventions for agents and contributors live in AGENTS.md; this file collects the rough edges around the local toolchain.
npm install
npm test # fast test suite
npm run typecheck # type check
npm run lint # ESLintLefthook wires three fast checks into pre-commit — lint, then typecheck, then npm run test:guards — and the full test suite into pre-push.
The pre-commit guards (tests/guards/) are pure-introspection invariants with no I/O: no bundle build, no SQLite DB, no git fixtures. They run in ~2s and exist to catch the implemented-but-unregistered / unfunctional command class before a commit lands, rather than discovering it later at push or in CI. Keep them fast — do not move the full suite, the built-bundle smoke tests, or the command matrix into pre-commit.
The heavy coverage stays on pre-push / CI: the full suite plus the built-bundle command matrix (tests/command_matrix_e2e.test.ts), which runs every registered command against the shipped dist/token-goat.mjs. The suite is occasionally racy on Windows under heavy disk pressure; the gating fact is CI on origin/main, so when the pre-push hook hangs intermittently it is reasonable to push with --no-verify.
Git Bash (the shell that ships with Git for Windows) rewrites POSIX-looking paths that start with / into Windows paths, so a call like gh api /repos/DFKHelper/token-goat/... becomes gh api C:/Program Files/Git/repos/DFKHelper/... and fails with invalid API endpoint. Two ways around it:
# Option A — omit the leading slash (works for gh):
gh api repos/DFKHelper/token-goat/actions/runs/<id>
# Option B — disable MSYS path conversion for the call:
MSYS_NO_PATHCONV=1 gh api /repos/DFKHelper/token-goat/actions/runs/<id>The same trick applies to any tool that takes URL-style paths on the command line.
- Bump
versioninpackage.jsonand runnpm installto updatepackage-lock.json. - Fold
[Unreleased]CHANGELOG entries into the new[X.Y.Z] - YYYY-MM-DDheading. - Commit, push
main, create the GitHub release (gh release create vX.Y.Z). - The release event triggers
.github/workflows/publish.ymlwhich runsnpm publish. - Verify at
https://www.npmjs.com/package/token-goat.