Built with:
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.
Here is a short video:
- Core features
- Installation
- Getting started
- Examples
- Documentation
- Chat with developers: OSA_helpdesk
- Publications about OSA
- Contributing
- License
- Acknowledgments
- Citation
-
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.
-
Workflow Generator: Automatically generates customizable CI/CD workflows for Python repositories, including unit tests, code formatting, PEP 8 compliance checks, and PyPI publication.
-
Repository-quality score: Evaluates a repository against formal criteria such as a non-empty README and license file. The score is available as part of paper analysis with
--include-repository-quality. -
Paper repository analysis: The canonical
osa-tool --paper-analysismode extracts or resumes typed paper claims and verifies them against a repository. Formal repository-quality scoring is optional through--include-repository-quality. With--delete-dir, the command removes only a remote clone created by that invocation, never a user-supplied local repository.
Install Open-Source-Advisor using one of the following methods:
Using PyPi:
pip install osa_toolInstall optional features when needed:
# PDF-to-claims extraction and evaluation utilities
pip install "osa_tool[paper-claims]"
# Add the optional local Marker parser
pip install "osa_tool[paper-claims,paper-claims-marker]"The core package and remote PDF parsers support Python 3.11 and later. The optional Marker parser requires Python 3.11--3.14 because its dependency stack is not available for Python 3.15+.
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.txtpoetry install For a source checkout with both optional feature sets:
poetry install --all-extrasdocker build --build-arg GIT_USER_NAME="your-user-name" --build-arg GIT_USER_EMAIL="your-user-email" -f docker/Dockerfile -t {image-name} .OSA requires Python 3.11 or higher.
OSA can be configured in two common ways:
# Subscription-backed Host LLM provider (api = "host")
export HOST_LLM_COMMAND=codex
export GIT_TOKEN=<your_git_token>
# OpenAI-compatible API provider (--api openai)
export OPENAI_API_KEY=<your_api_key>
export GIT_TOKEN=<your_git_token>The Git token (GIT_TOKEN) may be omitted if you plan to work with a public repository without creating a fork (using the
--no-fork option). Instead of GIT_TOKEN, you can use GITHUB_TOKEN, GITLAB_TOKEN, or GITVERSE_TOKEN for GitHub, GitLab,
and Gitverse respectively. AUTHORIZATION_KEY is only needed when using Gigachat.
| Token name | Description | Mandatory |
|---|---|---|
GIT_TOKEN |
Personal GitHub/GitLab/Gitverse token used to clone private repositories, access metadata, and interact with its API. | Yes |
HOST_LLM_COMMAND |
Logged-in Codex CLI command used by the subscription-backed api = "host" provider (codex). |
No |
OPENAI_API_KEY |
API key for accessing OpenAI, vsegpt, and openrouter providers through --api openai. |
No |
AUTHORIZATION_KEY |
API key for gigachat provider | No |
X-API-Key |
API key for the pepy.tech REST API, used to fetch Python package download statistics | No |
Run Open-Source-Advisor using the following command:
python -m osa_tool.run -r {repository} [--api {api}] [--base-url {base_url}] [--model {model_name}] [--attachment {article}] [--convert-notebooks {notebook_paths}]docker run --env-file .env {image-name} -r {repository} [--api {api}] [--base-url {base_url}] [--model {model_name}] [--attachment {article}] [--convert-notebooks {notebook_paths}]Docker runs default to the OpenAI-compatible API-key provider because the container cannot inherit a logged-in host command from the user's machine. Pass --api host only when the container has access to a host command or bridge.
The --attachment 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 --attachment 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 Workflow Generator README.
| Flag | Description | Default |
|---|---|---|
-r, --repository |
URL of the GitHub/GitLab/Gitverse repository (Mandatory) | |
-b, --branch |
Branch name of the repository | Default branch |
--based-on-date |
Analyse the repository version closest to the given date (forces no fork / no PR) | None |
-o, --output |
Path to the output directory | Current working directory |
--api |
LLM API service provider | openai |
--base-url |
URL of the provider compatible with API OpenAI | https://openrouter.ai/api/v1 |
--model |
Specific LLM model to use | gpt-3.5-turbo |
--top-p |
Nucleus sampling probability | 0.95 |
--temperature |
Sampling temperature to use for the LLM output (0 = deterministic, 1 = creative). | 0.05 |
--max-tokens |
Maximum number of output tokens the model can generate in a single response | 4096 |
--context-window |
Total number of model context (Input + Output) | 16385 |
--attachment |
Path to a local PDF or .docx file, or a URL to a PDF resource | None |
-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 |
--artefacts-language |
Language for report generation | English |
Also OSA supports custom configuration via TOML files. Use the --config-file option to specify a path to custom
configuration file. If no custom configuration file is provided, OSA will use the default configuration.
OSA uses the shared [llm] model settings unless a task-specific profile is configured. Task profiles fall back to the
shared settings when they do not override a value. The --use-single-model flag forces all tasks to use the shared
[llm] settings; omit it to allow task-specific profiles and model flags. Supported task model flags include
--model-docstring, --model-readme, --model-general, --model-repository-quality, --model-paper-claims, and
--model-paper-verification. There is no --model-validation option in the current CLI.
To learn how to work with the interactive CLI and view descriptions of all available keys, visit the CLI usage guide.
Examples of generated README files are available in examples.
URL of the GitHub/GitLab/Gitverse repository, LLM API service provider (optional) and Specific LLM model to use (optional) are required to use the generator.
OSA supports the subscription-backed Host LLM provider directly. HOST_LLM_COMMAND currently expects the Codex CLI protocol; use the bridge or an API-backed provider when custom generation controls are required. Other LLM providers are available as part of the
ProtoLLM ecosystem. See the
connectors directory for the full list.
Subscription-backed Host LLM:
export HOST_LLM_COMMAND=codex
python -m osa_tool.run -r https://github.com/aimclub/OSA --api hostOpenAI-compatible API key:
export OPENAI_API_KEY=<your_api_key>
python -m osa_tool.run -r https://github.com/aimclub/OSA --api openai --base-url https://api.openai.com/v1 --model gpt-4oLocal ITMO model:
python -m osa_tool.run -r https://github.com/aimclub/OSA --base-url [ITMO_MODEL_URL]For this API provider itmo model url must be specified in dotenv (ITMO_MODEL_URL=) or in the --base-url argument.
OpenAI:
python -m osa_tool.run -r https://github.com/aimclub/OSA --api openaiVseGPT:
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-turboOpenrouter:
python -m osa_tool.run -r https://github.com/aimclub/OSA --api openai --base-url https://openrouter.ai/api/v1 --model qwen/qwen3-30b-a3b-instruct-2507Ollama:
python -m osa_tool.run -r https://github.com/aimclub/OSA --api ollama --base-url http://[YOUR_OLLAMA_IP]:11434 --model gemma3:27bDetailed description of OSA API is available here.
In our Telegram chat OSA_helpdesk you can ask questions about working with OSA and find the latest news about the project.
In English:
In Russian:
- Report Issues: Submit bugs found or log feature requests for the Open-Source-Advisor project.
This project is protected under the BSD 3-Clause "New" or "Revised" License. For more details, refer to the LICENSE file.
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.
If you use this software, please cite it as below.
Nikitin N. et al. An LLM-Powered Tool for Enhancing Scientific Open-Source Repositories // Championing Open-source DEvelopment in ML Workshop@ ICML25.
@inproceedings{nikitinllm,
title={An LLM-Powered Tool for Enhancing Scientific Open-Source Repositories},
author={Nikitin, Nikolay and Getmanov, Andrey and Popov, Zakhar and
Ulyanova Ekaterina and Aksenkin, Yaroslav and
Sokolov, Ilya and Boukhanovsky, Alexander},
booktitle={Championing Open-source DEvelopment in ML Workshop@ ICML25}}