Skip to main content

OSA: OPEN-SOURCE ADVISOR

Acknowledgement ITMO Open-source-ops website License CI Pipeline PyPi OSA-improved Telegram Chat

Built with:

Python Docker GitHub%20Actions AIOHTTP OpenAI Pydantic


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.


How it works?

Here is a short video:

Watch the video


Table of contents


Core features

  1. README file generation: Automates the creation of a clear and structured README file for a repository, including projects based on research papers.

  2. Documentation generation: Automatically generates docstrings for Python code.

  3. Automatic implementation of changes: Clones the repository, creates a branch, commits and pushes changes, and creates a pull request with proposed changes.

  4. 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.

  5. Workflow Generator: Automatically generates customizable CI/CD workflows for Python repositories, including unit tests, code formatting, PEP 8 compliance checks, and PyPI publication.

  6. 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.

  7. Paper repository analysis: The canonical osa-tool --paper-analysis mode 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.


Installation

Install Open-Source-Advisor using one of the following methods:

Using PyPi:

pip install osa_tool

Install 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:

  1. Clone the Open-Source-Advisor repository:
git clone https://github.com/aimclub/OSA
  1. Navigate to the project directory:
cd Open-Source-Advisor
  1. Install the project dependencies:

Using pip  

pip install -r requirements.txt

Using poetry  

poetry install 

For a source checkout with both optional feature sets:

poetry install --all-extras

Using docker  

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.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.

Tokens

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

Usage

Run Open-Source-Advisor using the following command:

Using pip  

python -m osa_tool.run -r {repository} [--api {api}] [--base-url {base_url}] [--model {model_name}] [--attachment {article}] [--convert-notebooks {notebook_paths}]

Using docker  

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.

Configuration

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

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 host

OpenAI-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-4o

Local 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 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

Openrouter:

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-2507

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.


Chat with developers: OSA_helpdesk

In our Telegram chat OSA_helpdesk you can ask questions about working with OSA and find the latest news about the project.


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.

Simple format

Nikitin N. et al. An LLM-Powered Tool for Enhancing Scientific Open-Source Repositories // Championing Open-source DEvelopment in ML Workshop@ ICML25.

BibTeX format

    @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}}

Metadata

Release files for osa-tool 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for osa-tool 0.3.3
File Size Uploaded Provenance
osa_tool-0.3.3.tar.gz 20.3 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for osa-tool 0.3.3
File Interpreter ABI Platform
osa_tool-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 40.8 MB

Release files / osa_tool-0.3.3.tar.gz

Download URL osa_tool-0.3.3.tar.gz
Size 20.3 MB
Tags Source
SHA-256 checksum
How to use checksums
06015708906046035de275e79ab2a7fe86cf5ad54ef569d0fe915a3d91c16635
BLAKE2b-256 checksum
How to use checksums
5c1720966a55ed92d27a8072e7718384f7ae030f7c999b09b5f9e3b2ae5b3e46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / osa_tool-0.3.3-py3-none-any.whl

Download URL osa_tool-0.3.3-py3-none-any.whl
Size 20.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
de986ca62561b14830a3cae3c5f0f9cbdcc203dc6cdee9522e107ae591ea3cc8
BLAKE2b-256 checksum
How to use checksums
30e47abc5a2fc3e596a3c50012756d73d69037fc0eba95a879461e8769d5b706
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for osa-tool 0.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for osa_tool-0.3.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page