Thank you for your interest in contributing to nocommit! This guide will help you get started with the development setup and contribution process.
- Prerequisites
- Setting up the project
- Development workflow
- Code quality guidelines
- Contributing process
- Project structure
- Getting help
Before you begin, ensure you have the following installed:
- Node.js: Version 18 or higher (as specified in
.nvmrc) - npm: Comes with Node.js
- nvm: For managing Node.js versions (optional but recommended)
- Git: For version control
- Gemini API Key: Get one from Google AI Studio
git clone https://github.com/asimar007/no-commit.git
cd no-commitIf you have nvm installed:
nvm install
nvm usenpm installnode dist/index.js config set GEMINI_API_KEY=your_api_key_hereCompile TypeScript to JavaScript:
npm run buildOutput will be in the dist/ directory.
Automatically rebuild on file changes:
npm run devRun TypeScript type checking without emitting files:
npm run type-checkAfter building, you can run the CLI directly:
node dist/index.jsOr link it globally for testing:
npm link
nocommit- Use strict TypeScript configuration
- Ensure all functions have proper type annotations
- Use meaningful variable and function names
- Handle errors appropriately using
KnownErrorclass
- Follow the existing code patterns in the project
- Keep functions focused and single-purpose
- Use descriptive variable names
- Code should be self-documenting
- Avoid unnecessary complexity
Use conventional commit format:
feat: add new feature
fix: resolve issue with X
docs: update README
refactor: improve code structure
chore: update dependencies
Fork the repository on GitHub and clone your fork locally.
git checkout -b feature/your-feature-name- Write your code following the project's style guidelines
- Update documentation if needed
- Ensure the project builds without errors
# Run type checking
npm run type-check
# Build the project
npm run build
# Test the CLI manually
node dist/index.js --helpgit add .
git commit -m "feat: add your feature description"git push origin feature/your-feature-nameThen create a pull request on GitHub.
nocommit/
├── src/
│ ├── index.ts # Main CLI entry point
│ ├── ai.ts # Gemini AI integration
│ ├── config.ts # Configuration management
│ ├── git.ts # Git operations
│ └── error.ts # Error handling utilities
├── dist/ # Compiled output
├── package.json # Project configuration
├── tsconfig.json # TypeScript configuration
├── .nvmrc # Node.js version
├── .gitignore # Git ignore rules
├── .npmignore # npm publish ignore rules
├── LICENSE # MIT License
└── README.md # Documentation
| File | Description |
|---|---|
src/index.ts |
Main CLI entry point using Commander.js |
src/ai.ts |
Google Gemini API integration |
src/config.ts |
Configuration management with Conf |
src/git.ts |
Git diff and commit operations |
src/error.ts |
Custom error handling |
| Package | Purpose |
|---|---|
@google/genai |
Google Gemini AI client |
commander |
CLI framework |
@clack/prompts |
Interactive CLI prompts |
conf |
Configuration storage |
execa |
Process execution |
picocolors |
Terminal colors |
- Check existing Issues
- Create a new issue for bugs or feature requests
- Open a discussion for questions