- Fork and clone the repository.
- Install dependencies:
npm install
- Build the project:
npm run build
- Run a smoke test:
node dist/index.js --help
- TypeScript source lives in
src/. - Run
npm run buildto compile – no separate dev server needed. - Before opening a PR, ensure the project builds cleanly.
src/
├── index.ts # CLI entry point (Commander)
├── types.ts # Shared types
├── commands/ # Command implementations (init, suggest, history)
├── config/ # Config persistence
├── git/ # Git operations (diff)
├── history/ # History JSONL + style learner
├── llm/ # Prompt builder + API client
└── providers/ # LLM provider adapters
- Style: Minimal, no comments unless necessary. Match the existing code style.
- Imports: Use ESM
importsyntax ("type": "module"). - Formatting: Prettier is configured via
.prettierrc. Runnpm run formatto auto-format the supported source files, ornpm run format:checkto verify formatting in CI. - No linter is configured – review your own diffs carefully.
- Create a feature branch from
main. - Make your changes and verify
npm run buildsucceeds. - Keep PRs focused – one feature or fix per PR.
- Write a clear, concise PR description explaining what and why.
When opening an issue, use the closest template from .github/ISSUE_TEMPLATE/:
- Bug report for reproducible defects
- Feature request for product or workflow improvements
- Good first issue for small, newcomer-friendly tasks with clear acceptance criteria
- Create a file in
src/providers/implementing the provider interface fromsrc/types.ts. - Add a new entry to the
BUILTIN_PROVIDERSarray insrc/providers/registry.tswith the following fields:key: Unique identifier (e.g.,my-provider)name: Display name (e.g.,My Provider)baseUrl: API base URLapiKeyEnv: Environment variable name for the API key (e.g.,MY_PROVIDER_API_KEY)website: Provider website URLdocsUrl: Provider documentation URLneedsApiKey:trueif an API key is required,falsefor local providers like Ollama
- Add any needed configuration keys in
src/config/.
By contributing, you agree that your contributions will be licensed under the MIT License.