Kyn

Kyn is a stateless CLI that turns related-file review conventions into
deterministic local and CI policy.
It answers questions like:
- A component changed—did its existing Storybook story change too?
- An API handler changed—was its test included in the same change?
- A Terraform module changed—should a missing README update warn or block?
- A design sidecar exists—should CI emit a follow-up flag?
Why teams use Kyn
- Replace repeated review comments and brittle shell scripts with readable YAML.
- Get the same sorted results and stable exit codes locally and in CI.
- Start with advisory warnings, then tighten policy when the signal proves useful.
- Use text, JSON, SARIF, RDJSON, or Checkstyle without a daemon or hosted service.
Install a released version
Release and package channels verified for v0.1.3 (2026-09-05).
| Environment | Recommended command |
|---|
| macOS | brew tap dills122/tap && brew install --cask dills122/tap/kyn |
| Linux with Homebrew | brew tap dills122/tap && brew install --cask dills122/tap/kyn |
| Go 1.22+ | go install github.com/dills122/kyn/cmd/kyn@v0.1.3 |
| Windows | Add the Scoop bucket, then scoop install kyn |
| Container CI (GitHub Packages / GHCR) | docker pull ghcr.io/dills122/kyn:0.1.3 |
Kyn also publishes checksummed
GitHub Release archives and
native DEB/RPM/APK packages through public Fury repositories. The permanent
WinGet ID is DylanSteele.Kyn; its
current catalog submission
is under Microsoft review.
See Install Kyn for every command,
upgrade instructions, architecture support, Fury's unsigned-repository caveat,
and the current recommendation for each platform.
Quick start
Generate the closest starter policy:
cd your-repository
kyn init --preset web-ui
Available presets are web-ui, api, proto, and iac. Adjust the
generated globs to match your repository, then preview the relationships:
kyn check -c kyn.config.yaml \
--files path/to/example.component.ts \
--dry-run-resolve
Run policy against a real change set:
kyn check -c kyn.config.yaml \
--files path/to/example.component.ts,path/to/example.stories.ts \
--show-passes
Inside a Git repository, kyn check -c kyn.config.yaml automatically compares
origin/main...HEAD. CI can keep the refs explicit:
kyn check -c kyn.config.yaml \
--base origin/main \
--head HEAD \
--format json
How a policy reads
version: 2
families:
- id: go-handler
groups:
source:
include: ["internal/**/*_handler.go"]
kin:
test: "{dir}/{name}_test.go"
rules:
- id: handler-tests-sync
family: go-handler
severity: error
if:
changedAny: [source]
kinExists: [test]
assert:
kinChanged: [test]
message: "Handler changed but its existing test file did not."
Kyn matches changed handler files, resolves the corresponding test path, and
exits 1 when that existing test is missing from the change set. See
Configure families and rules for the
complete model.
Core commands
# Evaluate policy
kyn check -c kyn.config.yaml
# Explain why rules apply, pass, or fail
kyn explain -c kyn.config.yaml --base origin/main --head HEAD
# Generate a starter config
kyn init --preset api
# Migrate v1 YAML to v2
kyn config migrate -c kyn.config.yaml --from v1 --to v2
Kyn's stable process contract is:
0: policy passed at the selected threshold
1: rule failure
2: invalid usage or config
3: runtime/provider failure
Documentation
Project scope
Kyn intentionally stays focused:
- Stateless CLI only
- Deterministic behavior and stable contracts
- No daemon/watch mode, plugin system, or PR API integrations
Development
make hooks
make ci
make ci runs formatting checks, golangci-lint, vet, unit tests, the
minimum-coverage check, a build, and the black-box scenarios under
e2e/projects — the same checks the GitHub Actions lint,
test, and coverage jobs enforce, so a passing make ci locally means
those jobs will pass too. It does not cover the release-config, docs-site,
cross-platform build-matrix, or containerized smoke-test jobs, which need
goreleaser, mkdocs, and Docker/QEMU. Install
golangci-lint before running
make ci or make lint.
License
Kyn is available under the MIT License.