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. Its standalone artifact is a provenance-bearing report.json; run it independently with python -m osa_tool.tools.repository_quality or as part of paper analysis.

  7. Standalone paper claims pipeline: Extracts technical claims from PDF papers through the reusable paper_claims operation and batch utilities. This pipeline is available as a separate module and is not registered in the scheduler yet.

  8. 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; the focused python -m osa_tool.tools.paper_analysis wrapper runs the same pipeline. With --delete-dir, both entry points remove 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]"

The core package supports Python 3.11 and later. The paper-claims PDF conversion workflow currently requires Python 3.11--3.14 because its Marker 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.

The .env file is required to specify the LLM API key (OPENAI_API_KEY or AUTHORIZATION_KEY) and optionally a 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).

Alternatively, instead of GIT_TOKEN, you can use GITHUB_TOKEN, GITLAB_TOKEN, or GITVERSE_TOKEN for GitHub, GitLab, and Gitverse respectively.

When running osa-tool from CLI, you need to set the GIT_TOKEN and API key first:

# Linux / macOS (bash/zsh)
export OPENAI_API_KEY=<your_api_key>
export GIT_TOKEN=<your_git_token>

# Windows (PowerShell)
setx OPENAI_API_KEY "<your_api_key>"
setx GIT_TOKEN "<your_git_token>"

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
OPENAI_API_KEY API key for accessing OpenAI, vsegpt and openrouter providers 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}]

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

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.

By default, OSA uses a single model for all tasks (specified via --model). If you want to use different models for different types of tasks, disable the --use-single-model flag and specify models for each task type ( --model-docstring, --model-readme, --model-validation, --model-general).

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.

Supported LLM providers are available as part of the ProtoLLM ecosystem. See the connectors directory for the full list.

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

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.1
File Size Uploaded
osa_tool-0.3.1.tar.gz 1.5 MB Details

Built distribution (wheel)

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

Total release size: 3.0 MB

Release files / osa_tool-0.3.1.tar.gz

Download URL osa_tool-0.3.1.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
b2256b56c8b8b163589771f6327a0ff82dba6e90e1bd8563ad796ec964d84bf6
BLAKE2b-256 checksum
How to use checksums
47b399950852e365fc3a5ad2ab2ff1f6fc59109da8b645ec456be323fdf757bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 15, 2026.

Transparency log

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

Download URL osa_tool-0.3.1-py3-none-any.whl
Size 1.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
523f35f7039ff15ad24a8b8a170b153da741daecf504b83e85a30853f95ff349
BLAKE2b-256 checksum
How to use checksums
814be517c85b88f86140dbb5475d453db6bbc35ac2aa0aac79dc006a7a1e8a97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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