Skip to main content

OdooFlow CLI - streamline your Odoo development workflow

Project description

๐ŸŒ€ Odooflow CLI

OdooFlow CLI is a command-line interface tool designed to streamline the development workflow for Odoo projects. It helps clone Odoo modules (and their dependencies), handles GitLab lookups, and provides bounded recursive cloning via a configurable depth.

๐Ÿš€ Features

  • Clone an Odoo module by Git URL
  • Recursively resolve and clone dependencies up to a configurable depth
  • Smart skip of Odoo core modules
  • Branch selection for cloning
  • Post-push command execution on the remote server
  • Built-in SSH key generation
  • Helpful and colorful CLI output
  • Built using Typer and Python 3.7+

๐Ÿ“ฆ Installation

git clone https://github.com/anomalyco/odooflow-cli.git
cd odooflow-cli
pip install .

Or install directly from source for development (with test/lint extras):

pip install -e .[dev]

Install from PyPI (once published):

pip install odooflow-cli

๐Ÿ› ๏ธ Usage

Once installed, you can use the CLI by running:

odooflow --help

Available Commands:

  • init: Initialize the Odoo module environment file and sync metadata with manifest
  • sync-env: Sync the environment file from manifest
  • config: Update or show OdooFlow CLI configuration
  • clone: Clone a module and its dependencies from a git repository
  • remote: Manage remote connections for Git and deployment server
  • ssh-keygen: Generate a secure SSH key pair
  • push: Push the current Git branch and upload the project to the test server

Clone Command Options:

Flag Description
--url Full HTTP URL of the module repo
--branch/-b (Optional) Git branch to clone from
--depth/-d Max dependency depth to clone. 1 clones only the target module, 2 clones target + immediate deps, etc. (default: 1)

Push Command Options:

Flag Description
--remote-only Skip Git push and only upload to server
--exec Custom shell command to execute on the server after pushing

๐Ÿ” Examples:

Clone a single module:

odooflow clone --url https://gitlab.com/mygroup/my_odoo_module.git

Clone with specific branch:

odooflow clone --url https://gitlab.com/mygroup/my_odoo_module.git --branch 17.0

Clone target + immediate dependencies (depth 2):

odooflow clone --url https://gitlab.com/mygroup/my_odoo_module.git --depth 2

Clone the full dependency tree (depth 5):

odooflow clone --url https://gitlab.com/mygroup/my_odoo_module.git --depth 5

Push current branch to Git and upload to the configured server:

odooflow push

Push and execute a custom command on the remote server after upload:

odooflow push --exec "sudo systemctl restart odoo"

Skip Git push, only upload to server:

odooflow push --remote-only

๐Ÿ“ Project Structure

odooflow/
โ”œโ”€โ”€ odooflow/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ cli.py
โ”‚   โ”œโ”€โ”€ config_manager.py
โ”‚   โ”œโ”€โ”€ commands/
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ”œโ”€โ”€ clone_module.py
โ”‚   โ”‚   โ”œโ”€โ”€ config.py
โ”‚   โ”‚   โ”œโ”€โ”€ init_module_env.py
โ”‚   โ”‚   โ”œโ”€โ”€ keygen.py
โ”‚   โ”‚   โ”œโ”€โ”€ push.py
โ”‚   โ”‚   โ”œโ”€โ”€ remote.py
โ”‚   โ”‚   โ””โ”€โ”€ sync_env.py
โ”‚   โ””โ”€โ”€ utils/
โ”‚       โ”œโ”€โ”€ env.py
โ”‚       โ””โ”€โ”€ ssh.py
โ”œโ”€โ”€ tests/
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ LICENSE

๐Ÿค Contributing

Contributions are welcome! Please open an issue or submit a pull request with any improvements, bug fixes, or new features.

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -am 'Add new feature')
  4. Push to the branch (git push origin feature/your-feature)
  5. Open a Pull Request

๐Ÿ“ License

This project is licensed under the MIT License. See the LICENSE file for details.


WISH-LIST:

Move this CLI into fully-integrated Odoo environment, using Odoo, users can create issues, add the amount of details, then sync these issues with Odooflow.

We can do integration with any code agent to help developers to achieve these issues

same thing for pipelines, I think it will be amazing if developers can build pipelines using Odoo, then apply the same pipelines using Odooflow.

I have many things in my head, I will back soon to this project.

๐Ÿ‘จโ€๐Ÿ’ป Author

Made with โค๏ธ by Mohammad A. Hamdan


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odooflow_cli-0.2.0.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odooflow_cli-0.2.0-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

Details for the file odooflow_cli-0.2.0.tar.gz.

File metadata

  • Download URL: odooflow_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for odooflow_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 10c5bab7bb787ad2ed99f231487b1163494122d22b242b870e174e2716bb9054
MD5 0960ebfde9687ad57fe0ace84a080120
BLAKE2b-256 dcba9bef809a4e7cf71a60ca0dbc1915d08654b29c10a5383c0ba64cab9a2eee

See more details on using hashes here.

File details

Details for the file odooflow_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: odooflow_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 25.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for odooflow_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 adc4dd5c17eada8d28e8899e10671565c999b27bb3013e693a8badcb835ce58b
MD5 775952c9598b7c5b745ed3120fb462ba
BLAKE2b-256 0444a9a97625ba4a44962428ee205a5046101315bb95be1847ad093e74405717

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page