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 manifestsync-env: Sync the environment file from manifestconfig: Update or show OdooFlow CLI configurationclone: Clone a module and its dependencies from a git repositoryremote: Manage remote connections for Git and deployment serverssh-keygen: Generate a secure SSH key pairpush: 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.
- Fork the repository
- Create a new branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/your-feature) - 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10c5bab7bb787ad2ed99f231487b1163494122d22b242b870e174e2716bb9054
|
|
| MD5 |
0960ebfde9687ad57fe0ace84a080120
|
|
| BLAKE2b-256 |
dcba9bef809a4e7cf71a60ca0dbc1915d08654b29c10a5383c0ba64cab9a2eee
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adc4dd5c17eada8d28e8899e10671565c999b27bb3013e693a8badcb835ce58b
|
|
| MD5 |
775952c9598b7c5b745ed3120fb462ba
|
|
| BLAKE2b-256 |
0444a9a97625ba4a44962428ee205a5046101315bb95be1847ad093e74405717
|