Stage your changes and run. CommitBee handles the rest — no configuration needed.
Defaults to Ollama with qwen3.5:4b out of the box.
What's New
UI/UX
- Interactive message refinement — Added a "Refine" option to the candidate selection and confirmation menu. Users can provide feedback to the LLM (e.g., "more detail about the API change") to regenerate the message with natural language guidance.
- Native clipboard support — Replaced external commands (
pbcopy,xclip) with thearboardcrate for a native, cross-platform clipboard implementation. - Interactive commit editing — Added an "Edit" option to the candidate selection and confirmation menu. Users can now refine the generated message using their system editor before committing.
Semantic Analysis
- Full AST diffs for structs and enums —
AstDiffernow supports structured diffing for structs, enums, classes, interfaces, and traits. Detects added/removed fields, changed variants, and type modifications. - Parent scope extraction — Methods inside
impl,class, ortraitblocks now show their parent in the prompt:CommitValidator > pub fn validate(...). Walks the AST tree through intermediate nodes (declaration_list, class_body). Verified across 7 languages (Rust, Python, TypeScript, Java, Go, Ruby, C#). - Import change detection — New
IMPORTS CHANGED:prompt section shows added/removed import statements. Supports Rustuse, JS/TSimport, Pythonfrom/import, Noderequire(), and C/C++#include. Capped at 10 entries. - Doc-vs-code distinction —
SpanChangeKindenum classifies modified symbols as WhitespaceOnly, DocsOnly, Mixed, or Semantic. Doc-only changes suggestdocstype. Modified symbols show[docs only]or[docs + code]suffix in the prompt. - Test file correlation — New
RELATED FILES:prompt section shows when source files and their matching test files are both staged. Stem-based matching, capped at 5 entries. - Structural AST diffs —
AstDiffercompares old and new tree-sitter nodes for modified symbols, producing structuredSymbolDiffdescriptions (parameter added, return type changed, visibility changed, async toggled, body modified). Shown asSTRUCTURED CHANGES:section in the prompt. - Whitespace-aware body comparison — Body diff uses character-stream stripping so reformatting doesn't produce false
BodyModifiedresults. - Structured changes in prompt — New
STRUCTURED CHANGES:section in the LLM prompt shows concise one-line descriptions of what changed per symbol (e.g.,CommitValidator::validate(): +param strict: bool, return bool → Result<()>, body modified). Omitted when no structural diffs exist. - Semantic markers —
AstDiffernow detectsunsafeadded/removed,#[derive()]changes, decorator additions/removals, export changes, mutability changes, and generic constraint changes. Shown as+unsafe,+derive(Debug, Clone), etc. in the STRUCTURED CHANGES section.
Type Inference
- Test-to-code ratio — When >80% of additions are in test files, suggests
testtype even with source files present. Uses cross-multiplication to avoid integer truncation.
Change Intent Detection
- Diff-based intent patterns — Scans added lines for error handling (
Result,?,Err()), test additions (#[test],assert!), logging (tracing::,debug!), and dependency updates. Shown asINTENT:section in the prompt with confidence scores. - Conservative type refinement — High-confidence performance optimization patterns can override the base type to
perf.
Security
- Accurate secret scan line numbers — The secret scanner now parses
@@hunk headers to report accurate source line numbers for potential secrets, instead of absolute diff line numbers. - API key validation ordering —
set-key,get-key,init,config,completions, andhookcommands no longer require an API key to be present. CLI--providerflag now applies before keyring lookup. - Platform-native keyring backends — keyring v3 now uses macOS Keychain (
apple-native), Windows Credential Manager (windows-native), and Linux Secret Service (linux-native) instead of a mock file-based backend. - SecretString for API keys — API keys stored as
secrecy::SecretStringin Config and provider structs. Memory zeroed on drop, never exposed except at HTTP header insertion. - Overflow checks in release builds —
overflow-checks = trueadded to release profile for ANSSI-FR compliance.
Performance
- Optimized symbol dependency merging — Improved
CommitSplitterperformance for large commits by pre-indexing symbols and optimizing diff scanning.
Prompt Quality
- Token budget rebalance — Symbol budget reduced from 30% to 20% when structural diffs are available, freeing space for the raw diff. SYSTEM_PROMPT updated to guide the LLM to prefer STRUCTURED CHANGES for signature details.
- Unsafe constraint rule — When
unsafeis added to a function, a CONSTRAINTS rule instructs the LLM to mention safety justification in the commit body.
Testing
- 442 tests total (up from 367 at v0.5.0).
Install
cargo install commitbeeOr build from source:
git clone https://github.com/sephyi/commitbee.git
cd commitbee && cargo build --releaseFull changelog: CHANGELOG.md