Skip to content

dills122/kyn

Repository files navigation

Kyn

CI Release Docs Go Version License

Kyn is a stateless Go CLI for enforcing related-file change policy in CI.

It answers questions like:

  • If source changed, did tests/stories/specs change too?
  • If a sidecar exists, should a CI flag be emitted?
  • Are file-family rules enforced consistently across repos?

Why Teams Use Kyn

  • Deterministic output suitable for CI parsing and diffing
  • Stable exit codes (0 pass, 1 policy fail, 2 usage/config, 3 runtime)
  • Fast local and CI runs with no daemon, service, or plugin system
  • Config-driven policy instead of brittle shell glue

Install / Build

go build -o ./bin/kyn ./cmd/kyn
./bin/kyn --help

Quick Start

./bin/kyn check \
  --cwd testdata/angular \
  -c kyn.config.yaml \
  -f libs/ui/button/button.component.ts,libs/ui/button/button.component.html

Core Commands

# CI baseline
kyn check -c kyn.config.yaml --base origin/main --head HEAD -o json

# Auto git mode (default when no input mode is provided)
kyn check -c kyn.config.yaml -o json

# Explain per-rule diagnostics
kyn explain -c kyn.config.yaml --base origin/main --head HEAD

# Bootstrap starter config
kyn init --preset web-ui

# Migrate config v1 -> v2 safely
kyn config migrate -c kyn.config.yaml --from v1 --to v2

Output Formats

  • text
  • json
  • sarif
  • rdjson
  • checkstyle

Documentation

Project Scope

Kyn intentionally stays focused:

  • Stateless CLI only
  • Deterministic behavior and stable contracts
  • No daemon/watch mode, no plugin system, no PR API integrations

Development

make hooks
make fmt
make lint
make test
make vet
make build

About

Sibling file rule engine & detection, create checks on CI to ensure everything is in good order

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages