Thank you for your interest in contributing to Nanocoder! We welcome contributions from developers of all skill levels. This guide will help you get started with contributing to the project.
- Getting Started
- Development Setup
- Making Changes
- Testing
- Coding Standards
- Submitting Changes
- Issue Guidelines
- Community and Communication
Before contributing, please:
- Read our README to understand what Nanocoder does
- Check our issue tracker for existing issues
- Look for issues labeled
good first issueorhelp wantedif you're new to the project
- Node.js 18+
- npm or pnpm
- Git
-
Fork and clone the repository:
git clone https://github.com/YOUR-USERNAME/nanocoder.git cd nanocoder -
Install dependencies:
npm install
-
Build the project:
npm run build
-
Test your setup:
npm run start
-
For development with auto-rebuild:
npm run dev
- Bug Fixes: Address existing issues or problems
- New Features: Add functionality (new AI providers, tools, commands)
- Improvements: Enhance existing features or performance
- Documentation: Improve README, comments, or guides
- Testing: Add or improve tests
-
Create a branch:
git checkout -b feature/your-feature-name
-
Make your changes:
- Follow the existing code style
- Add appropriate TypeScript types
- Update documentation if needed
-
Test your changes:
npm run build npm run start
-
Commit your changes:
git add . git commit -m "feat: add your feature description"
We follow conventional commits:
feat:- New featuresmod:– Smaller modifications to existing featuresfix:- Bug fixesdocs:- Documentation changesrefactor:- Code refactoringtest:- Adding or modifying testschore:- Build process or auxiliary tool changes
Since Nanocoder is a CLI tool, most testing is currently manual:
-
Test different AI providers:
- Ollama (local)
- OpenRouter (API)
- OpenAI-compatible endpoints
-
Test core functionality:
- File operations (read, write, edit)
- Bash command execution
- Custom commands
- MCP server integration
-
Test error scenarios:
- Network failures
- Invalid configurations
- Missing dependencies
We welcome contributions that add automated testing:
- Unit tests for core functions
- Integration tests for AI providers
- CLI interaction tests
- Strict Mode: The project uses strict TypeScript settings
- Types First: Always define proper TypeScript types
- No
any: Avoid usinganytype; use proper type definitions - ESNext: Use modern JavaScript/TypeScript features
- Formatting: Code is auto-formatted (maintain existing style)
- Naming: Use descriptive variable and function names
- Comments: Add comments for complex logic, not obvious code
- Error Handling: Always handle errors gracefully
- Imports: Group external imports, then internal imports
- Exports: Use named exports; avoid default exports where possible
- Modules: Keep files focused on a single responsibility
- Update Documentation: If your change affects user-facing behavior
- Test Thoroughly: Ensure your changes work across different scenarios
- Create Pull Request: With a clear title and description
## Description
Brief description of what this PR does
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Tested with Ollama
- [ ] Tested with OpenRouter
- [ ] Tested with OpenAI-compatible API
- [ ] Tested MCP integration (if applicable)
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Documentation updated (if needed)
- [ ] No breaking changes (or clearly documented)- Maintainers will review your PR
- Address feedback promptly
- Be open to suggestions and changes
- Once approved, we'll merge your contribution
When reporting bugs, please include:
- Environment: OS, Node.js version, Nanocoder version
- AI Provider: Which provider you were using
- Configuration: Relevant config (sanitize API keys)
- Steps to Reproduce: Clear, step-by-step instructions
- Expected vs Actual: What should happen vs what actually happens
- Logs: Any relevant error messages or debug output
For feature requests:
- Use Case: Explain why this feature would be useful
- Proposed Solution: If you have ideas on implementation
- Alternatives: Other ways you've considered solving this
- Additional Context: Screenshots, examples, or references
bug- Something isn't workingenhancement- New feature or improvementgood first issue- Good for newcomershelp wanted- Extra attention neededdocumentation- Documentation improvementsquestion- Questions or discussions
- GitHub Issues: For bugs, features, and questions
- Discord Server: Join our community Discord server for real-time discussions, help, and collaboration: Join our Discord server
- Be respectful and inclusive
- Focus on constructive feedback
- Help create a welcoming environment for all contributors
- Remember that everyone is learning and contributing voluntarily
All contributors are recognized in the project. We appreciate:
- Code contributions
- Bug reports and testing
- Documentation improvements
- Feature suggestions and feedback
- Community support and discussions
- Test with multiple providers to ensure compatibility
- Handle API failures gracefully
- Respect rate limits and API quotas
- New tools should implement the common tool interface
- Always validate inputs and handle errors
- Document tool capabilities clearly
- Follow MCP protocol specifications
- Test with real MCP servers
- Handle connection failures properly
- Maintain consistent CLI interface
- Provide clear feedback to users
- Handle long-running operations gracefully
Thank you for contributing to Nanocoder! Your efforts help make local-first AI coding tools more accessible and powerful for everyone.