You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A dedicated CLI flag or slash command (/commit) that strictly reads the current git diff and generates a conventional commit message.
Use Case
Developers often struggle with writing good commit messages. While they can ask Nanocoder "write a commit message for my changes", having a dedicated shortcut is much faster and guarantees a consistent, formatted output without conversational fluff.
Proposed Solution
Running nanocoder --commit (or typing /commit in the extension) will automatically fetch git diff --staged, send it to the model with a strict system prompt, and return just the message. Optionally, it could offer to actually execute the commit.
Alternatives Considered
Forcing the user to manually type the prompt, which is repetitive.
Additional Context
I have searched existing issues to ensure this is not a duplicate
This feature aligns with the project's goals (local-first AI assistance)
Implementation Notes (optional)
This is a highly requested feature in tools like Aider. It bypasses the standard "chat" loop and acts as a one-shot utility.
Contribution Guidelines
If you would like to work on this issue, please comment below to ask for assignment first.
Before opening a Pull Request, please briefly share your implementation plan in this thread so we can align on the approach!
Hi @akramcodez, I'd like to work on this. I have two PRs currently open (#740, #761) but nothing else actively assigned, so happy to take this on. Could you assign it to me?
I've finished investigating the existing command architecture and this is the implementation I'm planning.
Scope
Add a /commit command that reads the staged git diff.
Generate a conventional commit message.
Display the generated message only (no automatic git commit execution).
Implementation
Use hasStagedChanges() to detect an empty index.
Return a warning if nothing is staged.
Fetch the staged diff with execGit(["diff", "--cached"]).
Generate the message with a conventional-commit prompt and return it via the existing message factory.
Tests
Empty staged diff.
Successful generation (mocked LLM).
LLM failure/error handling.
One question before I start: I couldn't find an existing slash command that reuses metadata.client; my current plan is to create the client via createLLMClient(). If there's a preferred pattern for slash commands, I'm happy to follow it instead.
Hi @akramcodez, just checking in on #819 when you get a chance as all automated checks are passing, and I'm happy to address any review feedback. Thanks!
Activity
DeepamJha commentedon Aug 4, 2026
Hi @akramcodez, I'd like to work on this. I have two PRs currently open (#740, #761) but nothing else actively assigned, so happy to take this on. Could you assign it to me?
akramcodez commentedon Aug 4, 2026
sure @DeepamJha if you need any help just let me know
DeepamJha commentedon Aug 5, 2026
@akramcodez
I've finished investigating the existing command architecture and this is the implementation I'm planning.
Scope
/commitcommand that reads the staged git diff.git commitexecution).Implementation
hasStagedChanges()to detect an empty index.execGit(["diff", "--cached"]).Tests
One question before I start: I couldn't find an existing slash command that reuses
metadata.client; my current plan is to create the client viacreateLLMClient(). If there's a preferred pattern for slash commands, I'm happy to follow it instead.DeepamJha commentedon Aug 9, 2026
Hi @akramcodez, just checking in on #819 when you get a chance as all automated checks are passing, and I'm happy to address any review feedback. Thanks!