Thank you for your interest in contributing to CTINexus! We welcome contributions in various forms, including bug reports, feature requests, documentation improvements, and code contributions.
If you find a bug, please open an issue on our GitHub repository. Provide as much information as possible, including:
- A clear and descriptive title.
- Steps to reproduce the bug.
- Expected and actual behavior.
- Screenshots, logs, or code snippets, if applicable.
- Environment details (OS, Python version, API provider).
If you have an idea for a new feature or an improvement, please open an issue with the following details:
- A clear and descriptive title.
- A detailed description of the feature.
- Any relevant use cases or examples.
Good documentation is key to a successful project. If you find areas in our documentation that need improvement, feel free to submit a pull request. Here are some ways you can help:
- Fix typos or grammatical errors.
- Clarify confusing sections.
- Add missing information.
- Update CLI documentation or add examples.
-
Fork the Repository: Fork the repository to your own GitHub account.
-
Clone the Fork: Clone your fork to your local machine:
git clone https://github.com/YOUR-USERNAME/CTINexus cd CTINexus -
Create a virtual environment and install dependencies:
python -m venv .venv source .venv/bin/activate # On macOS/Linux # .venv\Scripts\activate # On Windows pip install -e ".[dev]"
-
Set up pre-commit hooks:
pre-commit install
This installs git hooks that automatically run code quality checks before each commit.
-
Configure environment variables:
cp .env.example .env # Edit .env with your API keys (OpenAI, Gemini, AWS) # OR set up Ollama for local models
-
Create a Branch: Create a new branch for your work:
git checkout -b feature-name
-
Make Changes: Make your changes in your branch.
-
Run tests: Run the test suite to ensure your changes don't break existing functionality:
# Run all tests uv run pytest tests/ -v # Run with coverage report uv run pytest tests/ --cov=ctinexus --cov-report=term-missing
All tests must pass before submitting a pull request. If you've added new features, include tests for them.
-
Format and Lint your code: Before committing, ensure your code follows our style guidelines:
pre-commit run --all-files
-
Test your changes manually: Ensure your changes work correctly in practice:
ctinexus
-
Commit Changes: Commit your changes with a descriptive commit message. Use a category to indicate the type of change. Common categories include:
feat: New featurefix: Bug fixdocs: Documentation changesrefactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
Example:
git commit -m "feat: add support for new AI provider"If pre-commit hooks are installed, they will automatically run when you commit. If any checks fail, fix the issues and commit again.
-
Push to Fork: Push your changes to your forked repository:
git push origin feature-name
-
Open a Pull Request: Open a pull request from your fork to the main repository. Include a detailed description of your changes and any related issues.
When you open a pull request, GitHub Actions will automatically run code quality checks. These checks must pass before your PR can be merged. If they fail:
- Review the error messages in the GitHub Actions log
- Run the checks locally:
ruff check . --fix && ruff format . - Commit and push the fixes
- The checks will run again automatically
Please follow the code style used in the project. We use PEP 8 for Python code.
All pull requests are reviewed by our maintainers. We strive to provide feedback promptly, typically within a few days. Thank you for helping to improve CTINexus.