Skip to content
appKODEPublic

About

Danger-style merge request validation in one native binary. Declarative YAML or Kotlin DSL rules for titles, commits, JIRA, CODEOWNERS, size and secrets, plus AI review. Works with GitHub, GitLab, Bitbucket, Azure DevOps, Gitea, Gerrit and more. Zero-config start, runs in CI or locally.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Karandash

Platforms

Merge request checks for GitLab, GitHub, Bitbucket and more.

What is Karandash?

Karandash checks merge requests and pull requests against your rules before they get merged. You write the rules once in YAML or the Kotlin DSL and run them in CI or locally, so problems show up before review starts.

  • Works without a config file: run it on a PR and get the default checks.
  • 21 built-in validators: title format, commit messages, JIRA tickets, AI review, secret scanning and more.
  • 8 platforms: GitLab, GitHub, Bitbucket, Azure DevOps, Gerrit, Gitea, AWS CodeCommit, Jenkins.
  • CI templates for GitHub Actions and GitLab CI, plus Docker images.
  • Plugins in Kotlin, JavaScript, WASM or native code.

It is for teams that want the same MR/PR checks across all their repositories.

Feature Highlights

Built-in Validators

Validator Description
Title Format Enforce title patterns and length limits
Commit Messages Validate commit message format
JIRA Ticket Require JIRA ticket references
Branch Naming Enforce branch naming conventions
File Changes Rules based on modified files
CODEOWNERS Enforce code owner approvals
Approvals Minimum approval requirements
Reviewers Required reviewers or teams
CI/CD Status Block merge until pipelines pass
Merge Conflicts Block MRs with conflicts
Draft Detection Prevent merging draft PRs
Labels Label requirements and constraints
Size Limits Prevent overly large MRs
Security Scan for secrets and sensitive files
Conditional Rules Apply rules based on conditions
AI Rules AI review via Anthropic, OpenAI, Ollama
JIRA Enrichment Fetch JIRA ticket data for rules and AI review
Description Format MR description format validation
Cross-Entity Consistency Cross-entity consistency checks
Context Tags Context tag validation
Language Policy Language policy enforcement

See the full rules reference for configuration details.

Platforms

GitLab | GitHub | Bitbucket | Azure DevOps | Gerrit | Gitea | AWS CodeCommit | Jenkins (provider only - no mutator or comment-poster)

Each platform has a dedicated guide: Platform documentation

Output Formats

Console | JSON | SARIF 2.1.0 | Reviewdog rdjsonl/rdjson | Comment poster | Email (SMTP) | Slack (Block Kit) | Webhook (HTTP POST)

Quick Start

Install

Releases are published to GitHub Releases. Download the fat JAR (Java 17+) and check it against SHA256SUMS:

BASE=https://github.com/appKODE/karandash/releases/download/v1.0.1
curl -fsSLO "$BASE/karandash.jar" -fsSLO "$BASE/SHA256SUMS"
grep ' karandash.jar$' SHA256SUMS | sha256sum -c -
java -jar karandash.jar --version

Native binaries (karandash-linux-x64, karandash-macos-arm64, karandash-macos-x64, karandash-windows-x64.exe) are attached to the same release; swap the file name.

Docker: rinekri/karandash:v1.0.1 (native binary) and rinekri/karandash:v1.0.1-jvm on Docker Hub; latest and latest-jvm track the newest release.

See the installation guide for all options, or the documentation site.

First Validation

No config file needed. Set your platform token and validate:

export GITLAB_TOKEN="your-token-here"
karandash validate

Or validate any PR/MR by URL:

karandash validate --pr https://gitlab.com/myorg/myrepo/-/merge_requests/123

This uses zero-config mode with sensible defaults. See the zero-config guide for details.

Interactive Setup

For guided configuration with auto-detection:

karandash wizard

The wizard detects your platform, helps choose a template (minimal, standard, strict), and optionally generates CI/CD workflow files. See the wizard documentation.

Other useful commands:

karandash init       # scaffold a config file in the current repository
karandash doctor     # diagnose configuration, connectivity, and token issues
karandash generate   # generate CI/CD workflow files for your platform

Configuration

Karandash supports YAML and Kotlin DSL configuration. Create .karandash/config.yaml in your repository root:

YAML:

rules:
  title-format:
    pattern: "^(feat|fix|chore|docs):.*"
    max-length: 120
  size-limits:
    max-lines: 500
  approval:
    min-approvals: 2
  draft-prevention:
    block-draft: fail
reporters:
  console: true
  markdown: true

Kotlin DSL (.karandash/config.kts):

rules {
    titleFormat {
        pattern = "^(feat|fix|chore|docs):.*"
        maxLength = 120
    }
    sizeLimits { maxLines = 500 }
    approval { minApprovals = 2 }
    draftPrevention { blockDraft = "fail" }
}
reporters {
    console = true
    markdown = true
}

Both formats support config inheritance with extends and environment variable interpolation with ${VAR}.

Documentation

Full documentation is available at appkode.github.io/karandash and in the docs/ directory.

Section Description
Getting Started Installation, first validation, configuration basics
Rules Reference All 21 validators with configuration options
Platform Guides Setup guides for each supported platform
Plugin Development Build custom validators in Kotlin, JS, or native
CI/CD Integration GitHub Actions, GitLab CI, Jenkins, and more
Reviewdog Integration Inline PR annotations with reviewdog
Architecture Multiplatform architecture deep dive
Troubleshooting Common issues and solutions
CLI Reference All commands and flags
Contributing Contributor guide and roadmap

CI/CD Integration

GitHub Actions: add to .github/workflows/karandash.yml:

name: Karandash
on: pull_request
jobs:
  validate:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
    steps:
      - uses: actions/checkout@v4
      - uses: appKODE/karandash@v1.0.1
        with:
          version: v1.0.1

GitLab CI: add to .gitlab-ci.yml:

karandash:
  stage: test
  image: rinekri/karandash:v1.0.1
  rules:
    - if: $CI_MERGE_REQUEST_IID
  script:
    - karandash validate

Both work without config files using zero-config defaults. See CI/CD templates for Bitbucket Pipelines, Jenkins, Azure Pipelines, and CircleCI.

Building

Karandash supports JVM and native targets for macOS, Linux, and Windows. By default, builds compile for your current platform only.

Quick start:

./gradlew build

This builds the JVM target and native target(s) for your host OS automatically. For detailed build instructions, platform requirements, and CI/CD setup, see docs/advanced/build-from-source.md.

Contributing

Contributions are welcome. See the contributor guide for details.

# Build from source
./gradlew build

# Run tests
./gradlew jvmTest

# Build distributable JAR
./gradlew :cli:shadowJar

Areas for contribution: new validators, platform providers, output reporters, plugins, documentation.

License

MIT License


Documentation | Changelog | Examples | CI/CD Templates

About

Danger-style merge request validation in one native binary. Declarative YAML or Kotlin DSL rules for titles, commits, JIRA, CODEOWNERS, size and secrets, plus AI review. Works with GitHub, GitLab, Bitbucket, Azure DevOps, Gitea, Gerrit and more. Zero-config start, runs in CI or locally.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages