Thank you for taking the time to contribute! Here's everything you need to get started.
git clone https://github.com/iamsrikanth-dev/write-commit.git
cd write-commit
npm install
npm run build
npm link # makes `write-commit` available globally from your local cloneTo run without building every time:
npm run dev # uses tsx — runs TypeScript directlysrc/
├── index.ts CLI entry point (Commander setup)
├── commands/
│ ├── commit.ts Main commit flow
│ └── log.ts Unpushed commits display
├── config/
│ ├── setup.ts First-run and re-config wizard
│ └── store.ts Read/write ~/.write-commit/config.json
├── services/
│ ├── openrouter.ts OpenRouter API + model fallback chain
│ ├── ollama.ts Ollama local API
│ └── modelResolver.ts Fetches live free models from OpenRouter
├── prompts/
│ └── commitPrompt.ts System + user prompt templates (full & short mode)
├── git/
│ └── git.ts isGitRepo / getStagedDiff / commit helpers
├── utils/
│ ├── logger.ts Coloured terminal output
│ └── validation.ts Input guards
├── types/
│ └── index.ts TypeScript interfaces
└── constants/
└── index.ts API URLs, default models, limits
- Fork the repo and create a branch:
git checkout -b feat/your-feature - Make your changes in
src/ - Run
npm run build— must compile with zero errors - Run
npm run lint— must pass - Test manually with a real git repo
- Open a pull request against
main
This project uses Conventional Commits. The write-commit tool itself is great for this:
git add .
write-commitOr write it manually: feat(scope): what changed.
Open an issue at https://github.com/iamsrikanth-dev/write-commit/issues and include:
- Your OS and Node version (
node -v) - The command you ran
- The full error output
- Your provider (OpenRouter / Ollama)
Open an issue with the enhancement label and describe the use case — not just the solution.