First of all, thank you for your interest in contributing to gpt-code-ui! We appreciate the time and effort you're willing to invest in making our project better. This document provides guidelines and information to make the contribution process as smooth as possible.
All contributors are expected to adhere to our Code of Conduct. Please read it before participating in the gpt-code-ui community.
- Fork the repository and clone it to your local machine.
- Set up the development environment as follows:
To install the package as an editable Python package run:
pip install -e .
To run the backend:
gptcode
To run the frontend in dev mode such that frontend code changes automatically update, set the following environment variable such that the frontend knows where to find the backend API server.
export VITE_WEB_ADDRESS=http://localhost:8080
Run the frontend in development mode (served by Vite):
cd frontend
npm run dev
The HMR/auto reloading version of the frontend can now be found at http://localhost:5173 (default Vite port)
Note, the frontend served at http://localhost:8080
is stale comes from the static bundled files that can
be generated by running make compile_frontend
.
With this setup, code changes to the Flask backend still require restarting gptcode
(backend).
- Explore the codebase, run tests, and verify that everything works as expected.
If you encounter a bug or issue while using gpt-code-ui, please open a new issue on the GitHub Issues page. Provide a clear and concise description of the problem, steps to reproduce it, and any relevant error messages or logs.
We welcome ideas for improvements and new features. To suggest an enhancement, open a new issue on the GitHub Issues page. Describe the enhancement in detail, explain the use case, and outline the benefits it would bring to the project.
- Create a new branch for your feature or bugfix. Use a descriptive name like
feature/your-feature-name
orfix/your-bugfix-name
. - Make your changes, following the Style Guidelines below.
- Test your changes and ensure that they don't introduce new issues or break existing functionality.
- Commit your changes, following the commit message guidelines.
- Push your branch to your fork on GitHub.
- Open a new pull request against the
main
branch of the gpt-code-ui repository. Include a clear and concise description of your changes, referencing any related issues.
gpt-code-ui uses Black as its code style guide. Please ensure that your code follows these guidelines.
Write clear and concise commit messages that briefly describe the changes made in each commit. Use the imperative mood and start with a capitalized verb, e.g., "Add new feature" or "Fix bug in function".
Thank you once again for your interest in contributing to gpt-code-ui. We look forward to collaborating with you and creating an even better project together!