We love your input! We want to make contributing to WispGPT as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
- Fork the repo and create your branch from
main - If you've added code that should be tested, add tests
- If you've changed APIs, update the documentation
- Ensure the test suite passes
- Make sure your code lints
- Issue that pull request!
- Update the README.md with details of changes to the interface, including new environment variables, exposed ports, useful file locations, and container parameters
- Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent
- You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you
In short, when you submit code changes, your submissions are understood to be under the same MIT License that covers the project. Feel free to contact the maintainers if that's a concern.
Report bugs using GitHub's issue tracker
We use GitHub issues to track public bugs. Report a bug by opening a new issue.
Great Bug Reports tend to have:
- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
- Use 2 spaces for indentation
- Follow the existing code style in the repository
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions small and focused
- Use modern JavaScript features (ES6+)
To add a new AI provider:
- Create a new file in
lib/providers/following the pattern of existing providers - Extend the
BaseProviderclass - Implement required methods:
generateResponse(),validateConfig(),getName() - Add the provider to
lib/providers/index.js - Update documentation and examples
- Add tests
Example:
import { BaseProvider } from './base.js';
export class NewProvider extends BaseProvider {
constructor(config) {
super(config);
// Initialize your provider
}
async generateResponse(messages, options = {}) {
// Implement API call to your provider
}
validateConfig() {
// Validate required configuration
}
getName() {
return 'New Provider';
}
}To add support for a new programming language:
- Update
lib/core/language-detector.js:- Add patterns to
LANGUAGE_PATTERNS - Add comment removal function to
COMMENT_REMOVERS
- Add patterns to
- Update
lib/core/prompts.js:- Add language-specific prompt if needed
- Update documentation with the new language
- Add test cases
- Write unit tests for new features
- Test with multiple AI providers if possible
- Include edge cases in your tests
- Test CLI commands manually
- Verify examples work correctly
Run tests with:
npm test- Update README.md for user-facing changes
- Add JSDoc comments for new functions
- Update examples if APIs change
- Include provider-specific notes when relevant
# Clone your fork
git clone https://github.com/yourusername/wispgpt-code-explainer.git
cd wispgpt-code-explainer
# Install dependencies
npm install
# Set up environment
cp .env.example .env
# Add your API keys to .env
# Run tests
npm test
# Start development server
npm run dev
# Test CLI
npm link
wispgpt --helpWe welcome feature requests! Please:
- Check if the feature already exists or is planned
- Open an issue with the "enhancement" label
- Provide a clear description of the problem and proposed solution
- Include examples of how the feature would be used
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone.
Examples of behavior that contributes to a positive environment:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement.
By contributing, you agree that your contributions will be licensed under its MIT License.