staged-diff-aware commit message generation
Analyzes git staged changes via `git diff --cached` output, filters out noise (lockfiles, binaries, artifacts) using configurable exclusion patterns, and sends the cleaned diff to either a hosted Groq API endpoint or local Ollama instance to generate semantically meaningful commit messages. The tool maintains zero-configuration defaults while allowing customization of tone, length, format, and emoji usage through a YAML-based config system.
Unique: Uses a hosted Groq API endpoint (diny-cli.vercel.app/api/v2/commit) as the default backend with zero API key requirement, eliminating onboarding friction while maintaining local Ollama as a privacy-preserving fallback. Implements noise filtering at the diff level before sending to AI, reducing token usage and improving message relevance.
vs alternatives: Faster onboarding than Copilot or other AI commit tools (no API key setup) and lower cost than cloud-only solutions due to the hosted free tier, while maintaining local-first option via Ollama for teams with data residency requirements.
interactive commit workflow with regeneration and editing
Presents generated commit messages in an interactive terminal UI where users can accept, regenerate with different parameters, or manually edit the message before committing. Uses Cobra CLI framework for command routing and a custom UI layer (ui/ package) for theme-aware terminal rendering, allowing users to iterate on AI-generated suggestions without leaving the CLI.
Unique: Implements a three-layer command execution flow (cmd/ → business logic → infrastructure) with Cobra routing and theme-aware UI rendering, allowing users to stay in the CLI without spawning external editors. The ui/ package abstracts terminal rendering, enabling consistent theming across all interactive workflows.
vs alternatives: More responsive than editor-based workflows (no subprocess overhead) and more transparent than black-box commit tools because users see and approve each message before committing.
noise filtering in git diffs before ai processing
Filters out non-essential files (lockfiles, binaries, artifacts, node_modules) from git diffs before sending to AI backends, reducing token usage and improving message relevance. The commit/ package applies configurable exclusion patterns to the diff output, removing lines matching patterns like *.lock, *.bin, dist/, build/, etc. Filtered diffs are smaller and focus AI attention on meaningful changes.
Unique: Applies configurable regex-based filtering to git diffs before AI processing, reducing token usage and improving message relevance without requiring users to manually exclude files. The commit/ package abstracts filtering logic, allowing easy addition of new exclusion patterns.
vs alternatives: More efficient than sending full diffs to AI because filtered diffs are smaller and cheaper, and more intelligent than simple file exclusion because pattern matching can target specific file types or directories.
non-interactive batch commit message generation
Supports non-interactive mode (via --accept flag or environment variables) for automated commit message generation in CI/CD pipelines and scripts. In non-interactive mode, diny generates a message, skips the interactive approval step, and directly commits without user input. This enables integration into automated workflows, pre-commit hooks, and CI/CD systems that cannot interact with the terminal.
Unique: Implements non-interactive mode via --accept flag and environment variables, allowing diny to be integrated into CI/CD pipelines and scripts without requiring terminal interaction. The commit/ package detects non-interactive mode and skips the interactive UI layer, enabling automated workflows.
vs alternatives: More flexible than commit message templates because AI can adapt to varying change types, and more reliable than manual commit scripts because AI generates contextually appropriate messages.
multi-provider ai backend abstraction with groq and ollama
Abstracts AI service calls behind a provider interface supporting both Groq (cloud-hosted, free default endpoint) and Ollama (local/self-hosted). The infrastructure layer (groq/ and ollama/ packages) handles provider-specific API contracts, request formatting, and response parsing, allowing users to switch backends via configuration without code changes. Groq backend uses a hosted endpoint at diny-cli.vercel.app/api/v2/commit; Ollama requires local server setup.
Unique: Implements provider abstraction at the infrastructure layer (groq/ and ollama/ packages) with a hosted Groq endpoint as the zero-config default, eliminating API key management while maintaining local Ollama as a privacy-first alternative. The abstraction allows adding new providers without modifying business logic.
vs alternatives: Offers both free cloud (Groq) and self-hosted (Ollama) options in a single tool, whereas most competitors force choice between cloud-only (Copilot, ChatGPT) or require manual API key management (LLaMA-based tools).
configuration system with yaml-based preferences and auto-recovery
Manages user preferences (tone, length, format, emoji usage, AI provider, theme) via a YAML configuration file with embedded defaults and automatic recovery from corruption. The config/ package implements LoadOrRecover() which validates config on startup, backs up corrupt files, and restores defaults, ensuring the tool never fails due to configuration issues. Users customize via `diny config` command without manual file editing.
Unique: Implements automatic configuration recovery (LoadOrRecover pattern) that backs up corrupt files and restores defaults without user intervention, combined with embedded defaults that allow zero-configuration usage. The config/ package abstracts platform-specific paths and YAML parsing, enabling consistent behavior across macOS, Linux, and Windows.
vs alternatives: More resilient than tools requiring manual config editing (no syntax errors break the tool) and more discoverable than environment-variable-only configuration because `diny config` provides an interactive interface.
conventional commits and emoji format support
Generates commit messages conforming to Conventional Commits specification (feat:, fix:, docs:, etc.) with optional emoji prefixes based on user configuration. The commit/ package applies format rules during message generation by including format preferences in the AI prompt, and validates output against the configured format before presenting to the user. Supports both strict conventional format and relaxed variants with emoji.
Unique: Encodes format preferences directly into AI prompts (commit/ package) rather than post-processing generated text, improving format compliance and reducing regeneration cycles. Supports both strict conventional commits and emoji variants without separate code paths.
vs alternatives: More flexible than commitlint (which only validates) because diny generates compliant messages automatically, and more reliable than manual emoji addition because format is enforced at generation time.
git ecosystem integration with aliases and lazygit support
Integrates with Git workflows via command aliases (diny auto, diny link) and LazyGit integration, allowing users to invoke diny from within LazyGit's commit interface or via git aliases. The auto/ and link/ packages implement Git hook patterns and alias registration, enabling diny to be invoked as `git commit` replacement or within existing Git tools without context switching.
Unique: Implements Git ecosystem integration via both alias registration (diny link) and LazyGit-specific support, allowing diny to be invoked from multiple entry points without requiring users to learn new commands. The auto/ and link/ packages abstract platform-specific alias syntax and LazyGit integration details.
vs alternatives: More seamless than standalone AI tools because it integrates into existing Git workflows (aliases, LazyGit) rather than requiring separate command invocation, reducing context switching and learning curve.
+4 more capabilities