Skip to content

Add configurable commit message styles#2

Open
camUrban wants to merge 1 commit intoJohannLai:mainfrom
camUrban:feature/style_configuration
Open

Add configurable commit message styles#2
camUrban wants to merge 1 commit intoJohannLai:mainfrom
camUrban:feature/style_configuration

Conversation

@camUrban
Copy link

@camUrban camUrban commented Mar 4, 2026

Summary

  • Add a style system that lets users configure commit message formats (e.g., conventional commits, simple) instead of relying solely on git history auto-detection
  • Ship two built-in styles (conventional and simple) and support user-created custom styles stored in ~/.claude-commit/styles/
  • Add claude-commit style sub-command for managing styles (list, show, set, clear, create, delete) and a --style CLI flag for per-run overrides

Changes

  • config.py: Add style management methods: get/set/clear default style, list available styles (bundled+user), read style content, and create/delete custom styles
  • main.py: Wire style system into commit generation: resolve style from CLI flag or config, inject style instructions into the system prompt, and skip git history detection when a style is active. Add style sub-command handler and
    --style/-s argument
  • styles/conventional.txt: Built-in conventional commits style definition
  • styles/simple.txt: Built-in simple/plain style definition
  • pyproject.toml: Include styles/*.txt as package data

- Add style management subcommand (list, show, set, clear, create, delete)
- Bundle conventional and simple built-in style templates
- Support --style CLI flag for one-off style override
- Allow user-defined custom styles in ~/.claude-commit/styles/
- Style instructions override auto-detection from git history
@camUrban camUrban changed the title feat: add configurable commit message styles Add configurable commit message styles Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant