Contributing¶
Contributions to YAICLI are welcome! This page outlines how you can help improve the project.
Ways to Contribute¶
There are several ways to contribute to YAICLI:
- Bug Reports: Open an issue describing the bug and how to reproduce it
- Feature Requests: Suggest new features or improvements
- Code Contributions: Submit a pull request with your changes
- Documentation: Help improve or translate the documentation
Development Setup¶
Prerequisites¶
- Python 3.10 or higher
- uv, the Python project manager (https://github.com/astral-sh/uv)
- Git
- A GitHub account
Setting Up Your Development Environment¶
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/yaicli.git cd yaicli
- Create a virtual environment:
uv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies for development:
uv sync --all-extras
Development Guidelines¶
Code Style¶
YAICLI follows these style guidelines:
- Use Ruff for code formatting
- Follow PEP 8 style guidelines
- Write docstrings for all public functions, classes, and methods
Testing¶
Before submitting a PR, make sure to run the tests:
pytest
Pull Request Process¶
- Create a new branch for your feature or bugfix
- Make your changes
- Run the tests to ensure everything works
- Update the documentation if necessary
- Submit a pull request describing your changes
Adding a New Provider¶
To add a new LLM provider to YAICLI:
- Create a new file in
yaicli/llms/providers/
named after your provider (e.g.,my_provider.py
) - Implement the provider class following the interface pattern of existing providers
- Add the provider to the provider registry in
yaicli/llms/providers/__init__.py
- Update any configuration-related code to recognize the new provider
- Add tests for your provider in the
tests/llms/
directory
Documentation¶
When contributing documentation:
- Follow the existing structure
- Use Markdown for all documentation files
- Test changes locally using MkDocs:
mkdocs serve
License¶
By contributing to YAICLI, you agree that your contributions will be licensed under the project's Apache License 2.0.