Tool that just makes your open source project better!
Project description
OSA: OPEN-SOURCE ADVISOR
Built with:
Overview
OSA (Open-Source-Advisor) is a LLM-based tool for improving the quality of scientific open source projects and helping create them from scratch. It automates the generation of README, different levels of documentation, CI/CD scripts, etc. It also generates advices and recommendations for the repository.
OSA is currently under development, so not all features are implemented.
How it works?
Here is a short demo:
Table of contents
- Core features
- Installation
- Getting started
- Examples
- Documentation
- Contributing
- License
- Acknowledgments
- Citation
Core features
-
README file generation: Automates the creation of a clear and structured README file for a repository, including projects based on research papers.
-
Documentation generation: Automatically generates docstrings for Python code.
-
Automatic implementation of changes: Clones the repository, creates a branch, commits and pushes changes, and creates a pull request with proposed changes.
-
Various LLMs: Use OSA with an LLM accessible via API (e.g., OpenAI, VseGPT, Ollama), a local server, or try an osa_bot hosted on ITMO servers.
-
GitHub Action Workflow Generator: Automatically generates customizable CI/CD workflows for Python repositories, including unit tests, code formatting, PEP 8 compliance checks, and PyPI publication.
Installation
Install Open-Source-Advisor using one of the following methods:
Using PyPi:
pip install osa_tool
Build from source:
- Clone the Open-Source-Advisor repository:
git clone https://github.com/aimclub/OSA
- Navigate to the project directory:
cd Open-Source-Advisor
- Install the project dependencies:
pip install -r requirements.txt
poetry install
docker build --build-arg GIT_USER_NAME="your-user-name" --build-arg GIT_USER_EMAIL="your-user-email" -f docker/Dockerfile -t {image-name} .
Getting started
Prerequisites
OSA requires Python 3.10 or higher.
File .env is required to specify GitHub token (GIT_TOKEN) and LLM API key (OPENAI_API_KEY or VSE_GPT_KEY)
When running osa-tool from CLI, you need to set the GIT_TOKEN and API key first:
export OPENAI_API_KEY=<your_api_key>
export GIT_TOKEN=<your_git_token>
Tokens
| Token name | Description | Mandatory |
|---|---|---|
GIT_TOKEN |
Personal GitHub/GitLab token used to clone private repositories, access metadata, and interact with the GitHub/GitLab API. | Yes |
OPENAI_API_KEY |
API key for accessing OpenAI's language models. | No |
VSE_GPT_KEY |
API key for vsegpt LLM provider compatible with OpenAI's API format. | No |
X-API-Key |
API key for the pepy.tech REST API, used to fetch Python package download statistics | No |
Usage
Run Open-Source-Advisor using the following command:
python -m osa_tool.run -r {repository} [--api {api}] [--base-url {base_url}] [--model {model_name}] [--article {article}] [--convert-notebooks {notebook_paths}]
docker run --env-file .env {image-name} -r {repository} [--api {api}] [--base-url {base_url}] [--model {model_name}] [--article {article}] [--convert-notebooks {notebook_paths}]
The --article option enables you to choose a README template for a repository based on an article. You can provide either a link to a PDF file of the article or a path to a local PDF file after the --article option. If you are using Docker, ensure that you upload the PDF file to the OSA folder before building the image, then, specify the path as /app/OSA/... or just use volume mounting to access the file.
The --generate-workflows option is intended to create customizable CI/CD pipelines for Python repositories. For detailed documentation, see the GitHub Action Workflow Generator README.
Configuration
| Flag | Description | Default |
|---|---|---|
-r, --repository |
URL of the GitHub repository (Mandatory) | |
-b, --branch |
Branch name of the GitHub repository | Default branch |
--api |
LLM API service provider | llama |
--base-url |
URL of the provider compatible with API OpenAI | https://api.openai.com/v1 |
--model |
Specific LLM model to use | gpt-3.5-turbo |
-m, --mode |
Operation mode for repository processing: basic, auto (default), or advanced. |
auto |
--delete-dir |
Enable deleting the downloaded repository after processing | disabled |
--no-fork |
Avoid create fork for target repository | False |
--no-pull-request |
Avoid create pull request for target repository | False |
--top_p |
Nucleus sampling probability | null |
--temperature |
Sampling temperature to use for the LLM output (0 = deterministic, 1 = creative). | null |
--max_tokens |
Maximum number of tokens the model can generate in a single response | null |
To learn how to work with the interactive CLI and view descriptions of all available keys, visit the CLI usage guide.
Examples
Examples of generated README files are available in examples.
URL of the GitHub repository, LLM API service provider (optional) and Specific LLM model to use (optional) are required to use the generator.
To see available models go there:
Local Llama ITMO:
python -m osa_tool.run -r https://github.com/aimclub/OSA
OpenAI:
python -m osa_tool.run -r https://github.com/aimclub/OSA --api openai
VseGPT:
python -m osa_tool.run -r https://github.com/aimclub/OSA --api openai --base-url https://api.vsegpt.ru/v1 --model openai/gpt-3.5-turbo
Ollama:
python -m osa_tool.run -r https://github.com/aimclub/OSA --api ollama --base-url http://[YOUR_OLLAMA_IP]:11434 --model gemma3:27b
Documentation
Detailed description of OSA API is available here.
Publications about OSA
In English:
In Russian:
Contributing
- Report Issues: Submit bugs found or log feature requests for the Open-Source-Advisor project.
License
This project is protected under the BSD 3-Clause "New" or "Revised" License. For more details, refer to the LICENSE file.
Acknowledgments
The project is supported as ITMO University Research Project in AI Initiative (RPAII).
OSA is tested by the members of ITMO OpenSource community. Useful content from community is available in Open-source-ops
Also, we thank Readme-ai for their code that we used as a foundation for our own version of README generator.
Citation
If you use this software, please cite it as below.
APA format
ITMO, NSS Lab (2025). Open-Source-Advisor repository [Computer software]. https://github.com/aimclub/OSA
BibTeX format
@misc{Open-Source-Advisor,
author = {ITMO, NSS Lab},
title = {Open-Source-Advisor repository},
year = {2025},
publisher = {github.com},
journal = {github.com repository},
howpublished = {\url{https://github.com/aimclub/OSA.git}},
url = {https://github.com/aimclub/OSA.git}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file osa_tool-0.2.0.tar.gz.
File metadata
- Download URL: osa_tool-0.2.0.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
401958dfe9b9b0b914e82230950b29531606cc7a5a0ab3036bf05d60e8596ae4
|
|
| MD5 |
d1a31f5f7d23e303ba51fd99ede3a08f
|
|
| BLAKE2b-256 |
4a53b227556ef0128ce479d36719c2db99a349a1fb33a6c0b6a27c63bfc7ad38
|
Provenance
The following attestation bundles were made for osa_tool-0.2.0.tar.gz:
Publisher:
release.yml on aimclub/OSA
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
osa_tool-0.2.0.tar.gz -
Subject digest:
401958dfe9b9b0b914e82230950b29531606cc7a5a0ab3036bf05d60e8596ae4 - Sigstore transparency entry: 310216404
- Sigstore integration time:
-
Permalink:
aimclub/OSA@e48fd4c675be786f8642b5fc627bc143009a6150 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/aimclub
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e48fd4c675be786f8642b5fc627bc143009a6150 -
Trigger Event:
push
-
Statement type:
File details
Details for the file osa_tool-0.2.0-py3-none-any.whl.
File metadata
- Download URL: osa_tool-0.2.0-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92365c737b710f6c13a7c9498169d9c946c7878b3a0c34d9bd85ec6921a38bee
|
|
| MD5 |
af05fa324ea3ae9434db367b878c832d
|
|
| BLAKE2b-256 |
07993ac2832d1aebfdf36e9549d09befcd388ab733097a91968164c5c8562ea1
|
Provenance
The following attestation bundles were made for osa_tool-0.2.0-py3-none-any.whl:
Publisher:
release.yml on aimclub/OSA
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
osa_tool-0.2.0-py3-none-any.whl -
Subject digest:
92365c737b710f6c13a7c9498169d9c946c7878b3a0c34d9bd85ec6921a38bee - Sigstore transparency entry: 310216427
- Sigstore integration time:
-
Permalink:
aimclub/OSA@e48fd4c675be786f8642b5fc627bc143009a6150 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/aimclub
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e48fd4c675be786f8642b5fc627bc143009a6150 -
Trigger Event:
push
-
Statement type: