@@ -41,6 +41,21 @@ English · [简体中文](./README.zh-CN.md) · [Changelog](./CHANGELOG.md) · [
4141- [ 🔗 Links] ( #-links )
4242 - [ More Products] ( #more-products )
4343 - [ Credits] ( #credits )
44+ - [ 🚀 Advanced Features] ( #-advanced-features )
45+ - [ File Filtering] ( #file-filtering )
46+ - [ Enhanced Prompts] ( #enhanced-prompts )
47+ - [ Message Templates] ( #message-templates )
48+ - [ Diff Compression] ( #diff-compression )
49+ - [ Full GitMoji Support] ( #full-gitmoji-support )
50+ - [ 🔧 Configuration Reference] ( #-configuration-reference )
51+ - [ New Configuration Options] ( #new-configuration-options )
52+ - [ File Filtering Rules] ( #file-filtering-rules )
53+ - [ 📊 Comparison with OpenCommit] ( #-comparison-with-opencommit )
54+ - [ 🎯 Best Practices] ( #-best-practices )
55+ - [ Optimal Workflow] ( #optimal-workflow )
56+ - [ Performance Tips] ( #performance-tips )
57+ - [ Quality Guidelines] ( #quality-guidelines )
58+ - [ 🔄 Migration from OpenCommit] ( #-migration-from-opencommit )
4459
4560####
4661
@@ -282,6 +297,158 @@ This project is [MIT](./LICENSE) licensed.
282297
283298<!-- LINK GROUP -->
284299
300+ ## 🚀 Advanced Features
301+
302+ ### File Filtering
303+
304+ Lobe Commit supports intelligent file filtering to exclude irrelevant files from analysis:
305+
306+ #### Default Exclusions
307+
308+ - Lock files (` *-lock.* ` , ` *.lock ` )
309+ - Binary files (images, videos, archives)
310+ - Build artifacts (` dist/ ` , ` node_modules/ ` , etc.)
311+ - Minified files (` *.min.js ` , ` *.min.css ` )
312+
313+ #### Custom Exclusions
314+
315+ Create a ` .lobecommitignore ` file in your project root:
316+
317+ ``` gitignore
318+ # Custom ignore patterns
319+ path/to/large-asset.zip
320+ **/*.custom-extension
321+ docs/api/*.json
322+
323+ # Environment-specific files
324+ .env.staging
325+ config/secrets.yaml
326+ ```
327+
328+ ### Enhanced Prompts
329+
330+ The new prompt system provides:
331+
332+ - ** Context Awareness** : Analyzes file paths, function names, and change patterns
333+ - ** Business Impact Focus** : Emphasizes user-facing changes and business value
334+ - ** Technical Precision** : Better understanding of architectural decisions
335+ - ** WHY Explanations** : Optional explanations of change motivations
336+
337+ #### Configuration Options
338+
339+ ``` bash
340+ # Include "why" explanations in commit messages
341+ lobe-commit --config
342+
343+ # Select "includeWhy" and set to true
344+ ```
345+
346+ ### Message Templates
347+
348+ Support for custom message templates with placeholders:
349+
350+ ``` bash
351+ # Example: Include issue references
352+ git commit # message: "feat: add user authentication"
353+ # With template: "feat: add user authentication (#123)"
354+ ```
355+
356+ Configure template in settings:
357+
358+ - ` messageTemplate ` : Pattern like ` "$msg (#123)" ` or ` "[PROJ-456] $msg" `
359+
360+ ### Diff Compression
361+
362+ Intelligent diff compression for large changes:
363+
364+ - Prioritizes actual code changes over context
365+ - Maintains file headers and change indicators
366+ - Truncates verbose output while preserving meaning
367+ - Maximum 200 lines by default (configurable)
368+
369+ ### Full GitMoji Support
370+
371+ Toggle between:
372+
373+ - ** Simplified** : 10 most common emojis (default)
374+ - ** Full Specification** : Complete gitmoji.dev standard
375+
376+ ``` bash
377+ # Enable full GitMoji specification
378+ lobe-commit --config
379+ # Set "useFullGitmoji" to true
380+ ```
381+
382+ ## 🔧 Configuration Reference
383+
384+ ### New Configuration Options
385+
386+ | Option | Type | Default | Description |
387+ | ----------------- | ------- | -------- | ---------------------------------------------- |
388+ | ` includeWhy ` | boolean | ` false ` | Include explanation of why changes were made |
389+ | ` messageTemplate ` | string | ` "$msg" ` | Template for commit messages with placeholders |
390+ | ` oneLineCommit ` | boolean | ` false ` | Force single-line commit messages |
391+ | ` useFullGitmoji ` | boolean | ` false ` | Use complete GitMoji specification |
392+
393+ ### File Filtering Rules
394+
395+ 1 . ** Default patterns** are always applied
396+ 2 . ** Custom patterns** from ` .lobecommitignore ` are added
397+ 3 . ** Glob patterns** supported (e.g., ` **/*.test.js ` )
398+ 4 . ** Comments** supported with ` # ` prefix
399+ 5 . ** Case sensitive** pattern matching
400+
401+ ## 📊 Comparison with OpenCommit
402+
403+ | Feature | Lobe Commit | OpenCommit |
404+ | ----------------- | ---------------------- | ---------------------- |
405+ | Interactive UI | ✅ Rich CLI UI | ❌ Simple prompts |
406+ | File Filtering | ✅ ` .lobecommitignore ` | ✅ ` .opencommitignore ` |
407+ | Streaming | ✅ Real-time | ❌ Batch only |
408+ | Issue Integration | ✅ GitHub Issues | ❌ Manual only |
409+ | Custom Prompts | ✅ Enhanced system | ✅ Basic templates |
410+ | Diff Compression | ✅ Intelligent | ❌ Raw diff |
411+ | Multi-language | ✅ Built-in | ✅ Via config |
412+
413+ ## 🎯 Best Practices
414+
415+ ### Optimal Workflow
416+
417+ 1 . ** Stage relevant changes** : ` git add <specific-files> `
418+ 2 . ** Use file filtering** : Create ` .lobecommitignore ` for project
419+ 3 . ** Configure templates** : Set up issue/PR reference patterns
420+ 4 . ** Enable WHY mode** : For complex architectural changes
421+ 5 . ** Review and edit** : Use the interactive interface to refine
422+
423+ ### Performance Tips
424+
425+ - Use ` .lobecommitignore ` to exclude large files
426+ - Enable diff compression for complex changes
427+ - Use specific staging rather than ` git add . `
428+ - Configure appropriate ` maxLength ` for your team
429+
430+ ### Quality Guidelines
431+
432+ - Enable ` includeWhy ` for refactoring commits
433+ - Use full GitMoji for detailed categorization
434+ - Configure locale for international teams
435+ - Set up message templates for consistency
436+
437+ ## 🔄 Migration from OpenCommit
438+
439+ If you're migrating from OpenCommit:
440+
441+ 1 . ** Rename ignore file** : ` .opencommitignore ` → ` .lobecommitignore `
442+ 2 . ** Update config** : Most settings transfer directly
443+ 3 . ** Enable streaming** : For better user experience
444+ 4 . ** Try interactive mode** : Leverage the rich UI features
445+
446+ ``` bash
447+ # Quick migration
448+ cp .opencommitignore .lobecommitignore
449+ lobe-commit --config # Set up your preferences
450+ ```
451+
285452[ back-to-top ] : https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square
286453[ bun-link ] : https://bun.sh
287454[ bun-shield ] : https://img.shields.io/badge/-speedup%20with%20bun-black?logo=bun&style=for-the-badge
0 commit comments