Thanks for your interest in the NodeRings CLI (nr).
git clone https://github.com/noderings/cli.git
cd cli
go mod download
make build
make testRequirements:
- Go version matching
go.mod - Make
- Optional: golangci-lint,
govulncheck
make fmt
make vet
make lint
make test
make vulnDo not edit generated files under internal/api/generated/ by hand.
The client in internal/api/generated/ contains only the backend operations
the CLI calls. They are listed in scripts/openapi-allowlist.txt. To call a
new operation, add its operationId there and regenerate from the backend
Swagger file:
make generate-api-client SWAGGER_SPEC=/path/to/proto.swagger.jsonscripts/openapi-allowlist.py drops every other operation, the schemas only
they use, and all descriptions. make leak-check (also run in CI) fails if the
client contains an operation that is not on the allow-list or not called by
the CLI, or admin, billing, or internal infrastructure details. Maintainers can
add private patterns with OPENAPI_LEAK_EXTRA_PATTERNS_FILE=/path/to/file.
- Go, with packages under
internal/ - Prefer small, focused commits and PRs
- Handle errors; do not ignore with
_ - Do not commit secrets, tokens, kubeconfigs, or hypervisor instances files
- Describe the problem and approach
- Ensure CI passes (tests, lint, govulncheck)
- Update the README or
docs/when user-facing behavior changes
By contributing, you agree that your contributions are licensed under the Apache License 2.0.