Thanks for helping! api-kit turns a declarative description of a REST API into a command-line tool: definitions, authentication, fetching, joins, calls, and the commands that expose them. Contributions that make these pieces more robust or more broadly useful are welcome.
You need Go 1.27 or newer and golangci-lint v2.
git clone https://github.com/mittwald/api-kit.git
cd api-kit
make check # vet, lint, race tests, cross-compile, go mod tidy check
make test-min # run the tests on Go 1.27.0, the oldest supported release- No API of its own. api-kit contains no resource definitions, URLs,
header names, environment variable names or product names of any real
API. Everything specific comes from the definition a tool embeds or from
the options it passes. Tests and examples use invented APIs on
example.test. - One module. All packages share one
go.modand one version. - Few dependencies. Every dependency is paid for by every user of the
module. Prefer the standard library,
golang.org/xand cli-kit. Explain any new dependency in the pull request. - Go 1.27 compatibility. Do not use standard-library APIs newer than the
godirective ingo.mod. CI runs the tests on Go 1.27.0 to catch this. - Platforms. Everything must build on Linux, macOS and Windows.
- Libraries do not print or exit. Packages below
clireturn typed errors and diagnostics; onlycliwrites to the terminal and chooses an exit code. - No hidden global state. Configuration is passed in as options.
- Never print secrets. Errors and logs must not contain tokens or passwords.
- Run
make fmtandmake lintbefore you push. - Every exported identifier has a godoc comment that ends with a period.
Each package has its overview in
doc.go. - Write comments and documentation in US English.
- Add tests for new behavior. Add an
Examplefunction where the output is deterministic: it documents the package and is tested at the same time.
- Keep a pull request to one topic.
- Use Conventional Commits for commit
messages, for example
feat(engine): retry idempotent requestsorfix(expr): keep a literal dollar sign before a brace. - Mark breaking API or definition-schema changes with
!(feat(definition)!: …) and thebreaking-changelabel. api-kit isv0.x, so breaking changes are allowed, but they bump the minor version and are listed first in the release notes.
Maintainers tag releases from main as vMAJOR.MINOR.PATCH. Pushing the
tag runs the release workflow: it tests the tagged commit, creates the
GitHub release with generated notes, and asks the Go module proxy to fetch
the version so it appears on pkg.go.dev. Tags are never moved or deleted;
a broken release is withdrawn with a retract directive in go.mod.
Please do not open public issues for vulnerabilities. See SECURITY.md.