Code of Conduct
Be respectful, collaborative, and constructive. We’re building something useful together.Getting Started
Prerequisites
- Python ≥3.11
- Git
- A text editor or IDE
Development Setup
- Fork and clone the repository
- Install in development mode
- Set up your config
~/.nanobot/config.json to add your API keys for testing.
- Verify installation
Development Workflow
Making Changes
- Create a feature branch
- Make your changes
nanobot/ directory.
- Test your changes
- Verify code quality
- Follows the existing style (simple, readable, minimal)
- Includes docstrings for public functions and classes
- Handles errors gracefully with logging
- Keeps the line count low (remember: ~4,000 lines of core agent code)
Submitting Changes
- Commit your changes
- Start with a verb (Add, Fix, Update, Remove)
- Keep the first line under 50 characters
- Add details in the body if needed
- Push to your fork
- Open a Pull Request
- Go to the main nanobot repository
- Click “New Pull Request”
- Select your branch
- Fill in the PR template with:
- What changes you made
- Why you made them
- How to test them
What to Contribute
Priority Areas
Check the roadmap for high-priority features:- Multi-modal support (images, voice, video)
- Long-term memory improvements
- Better reasoning capabilities
- New channel integrations
- New provider integrations
Good First Issues
Look for issues labeledgood-first-issue in the GitHub repository. These are:
- Well-defined
- Limited in scope
- Good for learning the codebase
Bug Fixes
Found a bug? Great!- Check if it’s already reported in GitHub Issues
- If not, open a new issue with:
- Steps to reproduce
- Expected behavior
- Actual behavior
- Your environment (OS, Python version)
- Wait for confirmation, then submit a fix
Code Style Guidelines
Python Style
- Follow PEP 8 loosely (readability over strict compliance)
- Use type hints for function signatures
- Keep functions small and focused
- Prefer explicit over implicit
- Use
logurufor logging
Example
Code Organization
- One class or feature per file when possible
- Use
__init__.pyto expose public APIs - Keep imports at the top, grouped:
- Standard library
- Third-party
- Local imports
Testing
Manual Testing
Before submitting:- Test CLI mode
- Test gateway mode (if you modified channels)
- Test edge cases
- Empty input
- Very long messages
- Special characters
- Error conditions
Integration Testing
If you modified core components:- Test with multiple providers (OpenRouter, Anthropic, etc.)
- Test with different channels (Telegram, Discord, etc.)
- Test with MCP servers enabled
- Test with restrictToWorkspace enabled
Documentation
If you add a new feature:- Update docstrings in the code
- Update README.md if it affects user-facing features
- Add examples in comments or docs
Getting Help
- Discord: Join the Discord community
- Discussions: Start a GitHub Discussion
- Issues: Search existing GitHub Issues
Review Process
- A maintainer will review your PR
- They may request changes or ask questions
- Make requested changes by pushing to your branch
- Once approved, a maintainer will merge your PR
License
By contributing, you agree that your contributions will be licensed under the MIT License.Recognition
All contributors are recognized in:- The README contributors section
- The GitHub contributors graph
- Release notes (for significant contributions)