Skip to main content

odoogci

A utility for cloning Git repositories, removing unnecessary files, and installing dependencies from requirements.txt. It is specifically designed to facilitate building Odoo Docker images.

Features

  • Recursive Cloning: Automatically handles submodules recursively.
  • Authentication Support: Easy integration with GitHub and GitLab tokens.
  • JSON Batch Processing: Clone multiple repositories with a single command.
  • Verbose Mode: Detailed real-time progress of cloning, updates, and submodule processing.
  • Safe Authentication: Prevents hangs by disabling interactive prompts during Git operations.

Requirements

Ensure you have the following tools installed on your system:

  • Python ^3.9
  • Git
  • pip (Python package manager)

Installation

Via pipx (Recommended for CLI)

pipx install odoogci

Via pip

pip install odoogci

In a Dockerfile (From source)

Add the following line to your Dockerfile:

RUN pip3 install git+https://github.com/Alitux/odoogci.git

Usage

The general usage of the tool is:

odoogci [URL] [OPTIONS]

Arguments

  • URL: URL of the repository to clone.

Options

  • --branch TEXT: Branch of the repository.
  • --repositories TEXT: JSON string with a list of repositories to clone.
  • --requirements / --no-requirements: Install dependencies from requirements.txt. [default: no-requirements]
  • --repopath TEXT: Local path where the repository will be cloned.
  • --token TEXT: Access token for the repository (supports GitHub and GitLab).
  • --verbose / -v: Enable detailed output of all operations.

Examples

Simple Clone

odoogci https://github.com/ingadhoc/odoo-argentina --branch 16.0

Clone Multiple Repositories using JSON

You can specify the token, branch, and path per repository.

odoogci --repositories '[
    {
        "url": "https://github.com/org/repo1",
        "branch": "18.0",
        "repo_path": "repo1",
        "token": "your_github_token"
    },
    {
        "url": "https://github.com/OCA/commission",
        "branch": "18.0",
        "repo_path": "oca/commission"
    }
]'

Verbose Output

See exactly what is happening, including submodule updates:

odoogci https://github.com/ingadhoc/odoo-argentina -v

Usage in a Dockerfile

RUN cd /usr/lib/python3/dist-packages/odoo/addons/ && \
    odoogci https://github.com/ingadhoc/odoo-argentina --branch 16.0 && \
    odoogci https://github.com/ingadhoc/account-invoicing --branch 16.0

Parameter Precedence

When using the --repositories (JSON) option:

  1. Branch: If a global --branch is provided, it overrides all branches in the JSON. If not, the branch in the JSON is used. If none is specified, it clones the default branch.
  2. Token: If a global --token is provided, it overrides all tokens in the JSON.
  3. Recursivity: All operations (clones and updates) are performed with --recursive by default.

Metadata

Release files for odoogci 0.2.6

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

Source distribution (sdist)

Source distribution for odoogci 0.2.6
File Size Uploaded Provenance
odoogci-0.2.6.tar.gz 4.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for odoogci 0.2.6
File Interpreter ABI Platform
odoogci-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / odoogci-0.2.6.tar.gz

Download URL odoogci-0.2.6.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2c7b8b74835bd12d7bb28e7d71a945878637c473e6c5ca0d5e468964096b1700
BLAKE2b-256 checksum
How to use checksums
a3b14a90b6d3834520fc9b57e55b600342c3e14b3a2f2ee3a22573d131d96134
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.4 CPython/3.14.4 Linux/7.0.3-arch1-2

Release files / odoogci-0.2.6-py3-none-any.whl

Download URL odoogci-0.2.6-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c03fc0a2fbad3bb197fdcd8e99a05239f0c4c370e2166df01b6f40a4de5ee8d
BLAKE2b-256 checksum
How to use checksums
72fd018dc1a2e0f887754df972f8dd03d57fb8ebfc1cea4cd6db68e62b2a2903
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.4 CPython/3.14.4 Linux/7.0.3-arch1-2

Security for odoogci 0.2.6

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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