Thanks for your interest — external contributions are welcome.
This CLI is small and intentionally so. Before you invest time, please
open an issue for anything larger than a typo or a one-line fix so we
can agree on scope. The surface area is pre-1.0 and we'd rather
discuss trade-offs up front than ask you to redo work in review.
- Bug reports — file using the
bug template. Include the
Node version,
userback-cliversion, and the full command output. - Feature requests — file using the feature template. Explain the user problem, not the proposed solution.
- Docs — typo fixes and clarifications can go straight to a PR. Larger restructures should start as an issue.
- Code — follow the flow below.
Requires Node.js 24+ (pinned in .nvmrc).
git clone https://github.com/beflagrant/userback-cli
cd userback-cli
nvm use # optional, if you use nvm
npm installnpm test # full test suite (unit + subprocess)
npm run test:watch # re-run on change
npm run typecheck # tsc --noEmit
npm run build # emit dist/ (needed for the post-build smoke test)
./bin/ub.js --help # run the built CLITests don't hit the real Userback API. The HTTP client is exercised
via undici's MockAgent;
the CLI is exercised by spawning ./bin/ub.js against a local
node:http server running inside the test process.
- Open or claim an issue describing the change.
- Create a branch from
main. - Write tests first — the codebase is TDD'd; a PR that adds behavior without a failing test first is a red flag in review.
- Keep commits small and atomic. Prefer "Add ub foo subcommand" over "WIP". The commit history is part of the documentation.
- Run the full gate before pushing:
npm run typecheck && npm test && npm run build
- Update docs in the same PR if you change behavior. This
includes the README,
docs/commands.md, and — for larger changes — an ADR indocs/adr/. - Open a PR using the PR template. CI runs on every PR and must pass before merge.
Imperative mood, under 72 characters on the first line, optional body explaining why:
Add ub list --sort flag for chronological output
The default API order surfaces stale items first. Users pulling
feedback into a triage script want newest-first without post-hoc
sorting in jq.
Good recent examples live in git log —
Unwrap {data: [...]} envelope from live /feedback response and
Default close stage to "Resolved" (ships with every Userback project)
both pair the what with the why.
TypeScript, ESM-only, native fetch, Commander 12. Two-space
indentation. See ADR 0002
for the stack rationale.
- No new runtime dependencies without discussion in an issue.
undiciis dev-only (tests); the runtime depends oncommanderand Node built-ins and that's it. - No
// TODOleft behind. If it's worth a TODO, it's worth an issue. - Tests colocated by filename:
src/client.ts→test/client.test.ts. - Output contract is law. Any change to stdout vs stderr behavior or exit codes must reference ADR 0003 and ideally amend it if the contract itself is changing.
Out of scope without an ADR:
- New runtime dependencies.
- Hitting the live Userback API in automated tests.
- Caching, persistent state, or configuration files on disk.
userback-clireads env vars and writes nothing. - Interactive prompts. The CLI is designed to be non-interactive so it composes with scripts and agent workflows.
- Update
CHANGELOG.mdwith the new section and commit it. npm run release -- <patch|minor|major>(or an explicit version like0.2.0). This runs typecheck + tests, bumpspackage.json, creates thevX.Y.Zcommit and tag, and pushes both withgit push --follow-tags.- The
release.ymlworkflow publishes to npm on tag push. RequiresNPM_TOKENin the repo's GitHub Actions secrets; the workflow also verifies the tag matchespackage.jsonbefore publishing with provenance.
Be kind. Assume good faith. If something feels off, email
jim@beflagrant.com.