kozzy
v2.0.0
Published
Pretty formatter for ktlint output - compact and stylish
Downloads
27
Maintainers
Readme
Kozzy
Pretty formatter for ktlint output. Compact, stylish, and CI-friendly.

Features
- Compact Output — Groups lint errors by file path
- Stylish Formatting — Colored output with line numbers via picocolors
- Exit Codes — Returns proper exit codes for CI/CD integration
- Streaming — Processes ktlint output in real-time via Node.js streams
- Zero Config — Works out of the box with sensible defaults
Installation
npm
npm install -g kozzypnpm
pnpm add -g kozzyyarn
yarn global add kozzybun
bun install -g kozzynpx (no install)
npx kozzyUsage
# Install ktlint first
brew install ktlint
# Pipe ktlint output through kozzy
ktlint | kozzy
# Or use --stdin flag explicitly
ktlint | kozzy --stdinCLI Options
| Option | Description |
|--------|-------------|
| --stdin | Read from stdin explicitly |
| --help | Show help message |
| --version | Show version number |
API
import { CompactStream } from 'kozzy'
const stream = new CompactStream()
ktlintProcess.stdout.pipe(stream).pipe(process.stdout)Development
Install dependencies
# npm
npm install
# pnpm
pnpm install
# yarn
yarn install
# bun
bun installRun tests
# npm
npm test
# pnpm
pnpm test
# yarn
yarn test
# bun
bun testRun tests with coverage
npm run test:coverageBuild
npm run buildLint
npm run lintPackage Managers
Kozzy works with all major JavaScript package managers:
| Package Manager | Install | Run Tests |
|----------------|---------|-----------|
| npm | npm install | npm test |
| pnpm | pnpm install | pnpm test |
| yarn | yarn install | yarn test |
| bun | bun install | bun test |
License
MIT © Sarath C
