Thanks for contributing to Bitnob CLI.
This guide covers how to set up locally, make safe changes, and open PRs that are easy to review.
Prerequisites:
- Go 1.24+
- Git
- A Bitnob client ID and secret key (for integration/manual checks)
Clone and run:
git clone git@github.com:bitnob/bitnob-cli.git
cd bitnob-cli
go mod download
go run ./cmd/bitnob version- Create a branch from
main. - Make focused changes (one concern per PR when possible).
- Run formatting and tests before pushing.
- Update docs when behavior or flags change.
Recommended commands:
make fmt
make test
go test ./...Build and run locally:
make build
./bitnob versionBefore opening a PR:
- Run
go test ./...and ensure all tests pass. - Add or update tests for command behavior, API/client behavior, or config/auth behavior you changed.
- For staging checks, use the smoke script:
BITNOB_CLIENT_ID=your-client-id \
BITNOB_SECRET_KEY=your-secret-key \
./scripts/staging_smoke.shUse RUN_WRITE=1 only when you intentionally want write-path checks.
- Keep changes backward compatible unless a breaking change is explicitly planned.
- Prefer small, composable functions over large command handlers.
- Return clear errors with actionable context.
- Avoid introducing new dependencies without strong need.
- Keep security-sensitive data out of logs and command output.
When adding or changing commands:
- Keep command names and flags consistent with existing patterns.
- Provide helpful
--helptext and examples. - Preserve machine-friendly output for scripts when possible.
- Ensure failure messages explain how users can recover.
Update README.md when you change:
- commands or flags
- install/upgrade instructions
- release behavior
- config/auth behavior
PRs should include:
- clear summary of what changed and why
- linked issue/context (if available)
- test evidence (
go test ./...output summary) - docs updates where relevant
Review checklist:
- tests pass
- no secret leakage
- no unrelated file churn
- release/install docs still accurate
Use short, imperative messages. Example:
Add config restore commandFix keyring fallback warningUpdate README install instructions
Releases are tag-driven via GitHub Actions. If your change impacts users directly, include release-note-ready text in your PR description so maintainers can summarize it quickly.