A modern React application that helps developers generate professional git commit messages from their staged changes using AI. Built with React, Vite, Tailwind CSS, and powered by Puter-JS for AI capabilities.
- AI-Powered Commit Messages: Generate conventional commit messages from git diffs
- Secure Authentication: Sign in with Puter to access AI features
- Input Validation: Validates git diff format and sanitizes input
- GitHub-Style Theme: Dark theme matching GitHub's design system
- CLI-Style Typewriter Effect: Interactive onboarding experience
- Copy to Clipboard: Easy copying of generated commit messages
- Frontend: React 18, Vite
- Styling: Tailwind CSS
- AI Services: Puter-JS SDK
- Authentication: Puter Auth
- Node.js (v18 or higher)
- npm or yarn
-
Clone the repository:
git clone https://github.com/ayced31/git-commit-writer.git cd git-commit-writer
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5173
npm run build
The built files will be in the dist
directory.
- Sign In: Click "Sign in with Puter" in the top-right corner
- Paste Git Diff: Copy your
git diff --staged
output into the left panel - Generate: Click "Generate Commit Messages" to get AI-powered suggestions
- Copy: Click the copy icon next to any generated message to copy it to your clipboard
diff --git a/src/components/Button.jsx b/src/components/Button.jsx
index 1234567..abcdefg 100644
--- a/src/components/Button.jsx
+++ b/src/components/Button.jsx
@@ -1,5 +1,8 @@
export function Button({ children, onClick }) {
return (
- <button onClick={onClick}>
+ <button
+ onClick={onClick}
+ className="px-4 py-2 bg-blue-500 text-white rounded"
+ >
{children}
</button>
The project uses a custom Tailwind configuration with GitHub-style colors:
github-bg
: Main background colorgithub-bg-secondary
: Secondary panelsgithub-border
: Border colorsgithub-text
: Text colors with various opacity levelsgithub-accent
: Green accent colorgithub-danger
: Red colors for actions
The app uses Puter-JS for:
- User authentication (
puter.auth.signIn()
) - AI chat functionality (
puter.ai.chat()
) - No API keys required - users pay for their own usage