klaudiush works out of the box with no config files. These examples cover common setups - copy one, trim what you don't need, and you're done.
Config files go in ~/.klaudiush/config.toml (global) or .klaudiush/config.toml (per-project). Project settings override global ones through deep merge - only the fields you set get overridden.
Start with minimal.toml to turn off a few validators. Use full.toml as a reference for every available option. Language-specific files (javascript.toml, rust.toml) show how to wire up external tools like oxlint and rustfmt.
See the configuration guide for the full hierarchy, environment variables, and CLI flags.
Minimal
Disable specific validators with the simplest possible config.
minimal.toml10 lines
#:schema https://klaudiu.sh/schema/v1/config.json# Minimal# Disable specific validators with the simplest possible config.# Disable specific validators[validators.git.commit]enabled = false[validators.file.markdown]enabled = false
Backtick validation
Strict shell safety for all Bash commands, not just git and gh.
comprehensive-backticks.toml39 lines
#:schema https://klaudiu.sh/schema/v1/config.json# Backtick validation# Strict shell safety for all Bash commands, not just git and gh.[validators.shell.backtick]# Enable comprehensive backtick checking for all Bash commands (default: false)# When false, only validates git commit, gh pr create, gh issue createcheck_all_commands = true# Detect unquoted backticks (default: true)# Only applies when check_all_commands = true (comprehensive mode)# Examples:# echo `date` # Blocked# ls `pwd`/files # Blockedcheck_unquoted = true# Suggest single quotes when no variables are present (default: true)# Examples:# echo "Fix `parser`" # Blocked, suggests: echo 'Fix `parser`'# echo "Fix `parser` for $VERSION" # Blocked, suggests escaping (variables present)suggest_single_quotes = true# Example scenarios this catches:## 1. Unquoted backticks (dangerous):# curl https://api.example.com/`whoami`# → Suggests: curl 'https://api.example.com/`whoami`'## 2. Backticks in double quotes without variables (unnecessary risk):# git commit -m "Update `config.toml` handling"# → Suggests: git commit -m 'Update `config.toml` handling'## 3. Backticks in double quotes with variables (needs escaping):# echo "Fix `parser` for version $VERSION"# → Suggests: echo "Fix \`parser\` for version $VERSION"## 4. Multiple issues in one command:# command "arg1 `test`" `arg2` "arg3 `foo` with $VAR"# → Reports all three issues with context-specific suggestions
Crash dumps
Automatic crash diagnostics with retention and pruning settings.
crashdump.toml75 lines
#:schema https://klaudiu.sh/schema/v1/config.json# Crash dumps# Automatic crash diagnostics with retention and pruning settings.[crash_dump]# Enable automatic crash dump creation on panic# When enabled, klaudiush will capture diagnostic information whenever it crashes# Default: trueenabled = true# Directory where crash dumps are stored# Supports tilde expansion for home directory# Default: "~/.klaudiush/crash_dumps"dump_dir = "~/.klaudiush/crash_dumps"# Maximum number of crash dumps to keep# When this limit is exceeded, oldest dumps are removed automatically# Set to 0 for unlimited (not recommended)# Default: 10max_dumps = 10# Maximum age of crash dumps before they are pruned# Accepts duration strings: "24h", "720h", "30d"# Set to "0" for unlimited retention (not recommended)# Default: "720h" (30 days)max_age = "720h"# Include sanitized configuration snapshot in crash dumps# Config is automatically sanitized to remove sensitive fields:# - Fields matching: *token*, *secret*, *password*, *key*, *credential*# Useful for debugging configuration-related crashes# Default: trueinclude_config = true# Include hook context in crash dumps# Captures the tool invocation that triggered the crash:# - Event type (PreToolUse, PostToolUse, Notification)# - Tool name (Bash, Write, Edit, etc.)# - Command or file path being processed# Essential for reproducing crashes# Default: trueinclude_context = true# Example configurations for different use cases:# Production: Extended retention with more dumps# [crash_dump]# enabled = true# dump_dir = "~/.klaudiush/crash_dumps"# max_dumps = 20# max_age = "2160h" # 90 days# include_config = true# include_context = true# Development: More dumps, shorter retention# [crash_dump]# enabled = true# dump_dir = "~/.klaudiush/crash_dumps"# max_dumps = 15# max_age = "336h" # 14 days# include_config = true# include_context = true# Minimal storage: Conservative limits# [crash_dump]# enabled = true# dump_dir = "~/.klaudiush/crash_dumps"# max_dumps = 5# max_age = "168h" # 7 days# include_config = false# include_context = true# Disabled: No crash dumps created# [crash_dump]# enabled = false
Full reference
Every available option with its default value.
full.toml173 lines
#:schema https://klaudiu.sh/schema/v1/config.json# Full reference# Every available option with its default value.# Git Validators[validators.git]# Git Add Validator[validators.git.add]enabled = trueseverity = "error"blocked_patterns = ["tmp/*", "*.secret"]# Git Commit Validator[validators.git.commit]enabled = trueseverity = "error"required_flags = ["-s", "-S"]check_staging_area = trueenable_message_validation = true# Commit Message Validation[validators.git.commit.message]title_max_length = 50body_max_line_length = 72body_line_tolerance = 5check_conventional_commits = truevalid_types = [ "feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert"]require_scope = trueblock_infra_scope_misuse = trueblock_pr_references = trueblock_ai_attribution = true# Forbidden patterns (regex) that are not allowed in commit messages# Default: ["\\btmp/", "\\btmp\\b"] (blocks tmp directory mentions)forbidden_patterns = [ "\\btmp/", # Block tmp/ path references "\\btmp\\b" # Block standalone tmp word]expected_signoff = "Your Name <your.email@klaudiu.sh>"# Git Push Validator[validators.git.push]enabled = trueseverity = "error"# Git PR Validator[validators.git.pr]enabled = trueseverity = "error"title_max_length = 50enable_conventional_commits = truevalid_types = [ "feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert"]require_changelog = falsecheck_ci_labels = falserequire_body = false# Markdownlint rules to disable for PR body validation# Default: ["MD013", "MD034", "MD041"]markdown_disabled_rules = ["MD013", "MD034", "MD041"]# Forbidden patterns (regex) that are not allowed in PR title and body# Default: ["\\btmp/", "\\btmp\\b"] (blocks tmp directory mentions)forbidden_patterns = [ "\\btmp/", # Block tmp/ path references "\\btmp\\b" # Block standalone tmp word]# Git Branch Validator[validators.git.branch]enabled = trueseverity = "error"protected_branches = ["main", "master"]valid_types = ["feat", "fix", "chore", "docs", "refactor", "test"]require_type = trueallow_uppercase = false# Git No-Verify Validator[validators.git.no_verify]enabled = trueseverity = "error"# File Validators[validators.file]# Markdown Validator[validators.file.markdown]enabled = trueseverity = "error"timeout = "10s"context_lines = 2# Custom rules (always enabled)heading_spacing = truecode_block_formatting = truelist_formatting = true# markdownlint-cli integration (external tool, opt-in)use_markdownlint = false # Default: false# markdownlint_path = "/custom/path/to/markdownlint" # Optional: custom path# Enable/disable specific markdownlint-cli rules# Only used when use_markdownlint = true# [validators.file.markdown.markdownlint_rules]# MD022 = true # Blanks around headings# MD041 = false # First line in file should be a top level heading# Or use a markdownlint config file# markdownlint_config = ".markdownlint.json"# Shell Script Validator[validators.file.shellscript]enabled = trueseverity = "error"timeout = "10s"context_lines = 2# Terraform Validator[validators.file.terraform]enabled = trueseverity = "error"timeout = "10s"context_lines = 2check_format = trueuse_tflint = true# GitHub Actions Workflow Validator[validators.file.workflow]enabled = trueseverity = "error"timeout = "10s"gh_api_timeout = "5s"enforce_digest_pinning = truerequire_version_comment = truecheck_latest_version = trueuse_actionlint = true# Go Code Formatter Validator[validators.file.gofumpt]enabled = trueseverity = "error"timeout = "10s"extra_rules = false # Enable -extra flag for stricter ruleslang = "" # Go version (e.g., "go1.21", auto-detected from go.mod if empty)modpath = "" # Module path (auto-detected from go.mod if empty)# gofumpt_path = "" # Custom gofumpt binary path# Shell Validators[validators.shell]# Backtick Validator[validators.shell.backtick]enabled = trueseverity = "error"# check_all_commands = false # Default: only validates git commit, gh pr/issue create # Set to true for comprehensive mode (all Bash commands)# check_unquoted = true # Detect unquoted backticks (e.g., echo `date`)# suggest_single_quotes = true # Suggest single quotes when no variables present# Notification Validators[validators.notification]# Bell Validator[validators.notification.bell]enabled = true# custom_command = "osascript -e 'beep'" # macOS notification sound
JavaScript/TypeScript
oxlint integration for dev, production, and custom rule setups.
javascript.toml47 lines
#:schema https://klaudiu.sh/schema/v1/config.json# JavaScript/TypeScript# oxlint integration for dev, production, and custom rule setups.# Minimal configuration - uses all defaults[validators.file.javascript]enabled = true# Development environment - relaxed rules, warnings only# [validators.file.javascript]# enabled = true# severity = "warning" # Don't block, just warn# exclude_rules = ["no-console", "no-debugger"] # Allow console/debugger in dev# Production environment - strict rules, blocks commits# [validators.file.javascript]# enabled = true# severity = "error" # Block on errors (default)# timeout = "15s" # Increase timeout for large projects# use_oxlint = true # Enable oxlint (default)# oxlint_config = ".oxlintrc.json" # Use custom config# Disable JavaScript validation entirely# [validators.file.javascript]# enabled = false# Custom rules exclusion# [validators.file.javascript]# enabled = true# exclude_rules = [# "no-unused-vars", # Allow unused variables# "no-undef", # Allow undefined variables# "no-console", # Allow console statements# "no-debugger", # Allow debugger statements# ]# Custom binary path (useful if oxlint is not in PATH)# [validators.file.javascript]# enabled = true# oxlint_path = "/custom/path/to/oxlint"# Context lines for edit validation# When using the Edit tool, this controls how many lines of context# are included around the edit for validation# [validators.file.javascript]# enabled = true# context_lines = 5 # Default: 2
Project overrides
Override global settings for a single repository.
project-override.toml32 lines
#:schema https://klaudiu.sh/schema/v1/config.json# Project overrides# Override global settings for a single repository.# Override commit message validation for this project[validators.git.commit]enabled = true[validators.git.commit.message]# This project allows longer commit titlestitle_max_length = 72# This project doesn't require conventional commitscheck_conventional_commits = false# This project uses a different signoffexpected_signoff = "Project Bot <bot@project.klaudiu.sh>"# Allow tmp references in this project (remove forbidden patterns)forbidden_patterns = []# Disable Markdown validation for this project[validators.file.markdown]enabled = false# Allow more time for Terraform operations in this project[validators.file.terraform]timeout = "30s"# This project doesn't enforce digest pinning for GitHub Actions[validators.file.workflow]enforce_digest_pinning = false
Rust
rustfmt integration with edition and path options.
rust.toml27 lines
#:schema https://klaudiu.sh/schema/v1/config.json# Rust# rustfmt integration with edition and path options.[validators.file.rust]enabled = trueseverity = "error"[validators.file.rust.config]# Timeout for rustfmt operations (default: "10s")timeout = "10s"# Number of context lines before/after edit for validation (default: 2)context_lines = 2# Enable rustfmt integration (default: true)use_rustfmt = true# Rust edition: "2015", "2018", "2021", "2024"# If not specified, auto-detected from Cargo.toml (default: "2021")edition = "2021"# Custom rustfmt binary path (default: "" = use PATH)rustfmt_path = ""# Path to rustfmt.toml configuration file (default: "" = auto-discover)rustfmt_config = ""