🌀 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
- Named server profiles (staging/QA/prod) with first-class
odooflow server list|add|show|use|remove|test - Built-in SSH key generation
- Helpful and colorful CLI output
- Built using Typer and Python 3.7+
📦 Installation & first-run setup
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
First-run wizard
After installing, configure odooflow with your GitLab access token:
odooflow setup
The wizard writes ~/.odooflowrc (with chmod 600 permissions), prompting for:
- GitLab access token — kept private in the rc file; typed input is masked.
- GitLab URL — defaults to the bundled one, override for self-hosted.
- Core modules — comma-separated list, used to skip framework deps.
If you don't have a token yet, create one at GitLab → Preferences → Access Tokens with scopes api, read_api, and write_repository.
Prefer environment variables? You can skip the rc entirely:
export ODOOFLOW_ACCESS_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx
odooflow clone <your-module-url>
🛠️ Usage
Once installed, you can use the CLI by running:
odooflow --help
Available Commands:
setup: Interactive wizard for first-run configuration (~/.odooflowrc).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 serverserver: Manage named server profiles (staging/QA/prod) —list,add,show,use,remove,test,connectssh-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 |
|---|---|
--server/-s |
Named server profile from odooflow server list (defaults to the configured default). |
--remote-only |
Skip Git push and only upload to server |
--exec |
Custom shell command to execute on the server after pushing |
Server Profile Commands:
| Command | What it does |
|---|---|
odooflow server list |
Tabular view of every configured profile. |
odooflow server list --json |
Machine-readable output (passwords omitted). |
odooflow server add <name> |
Interactive wizard (or --host, --user, --key-path for non-interactive). Validates inputs and tests SSH on save. |
odooflow server show [<name>] |
Show fields of a profile. Default = the current default. Passwords are masked unless --reveal-password. |
odooflow server use <name> |
Set the default profile used by odooflow push. |
odooflow server remove <name> |
Delete a profile (the default reverts to another if any are left). |
odooflow server test [<name>] |
Verify TCP reachability, SSH auth, and directory existence without uploading anything. |
odooflow server connect [<name>] |
Open an interactive SSH shell against a profile, with color-coded prompts, live stdout/stderr, in-memory command history, and auto-reconnect on session drop. |
🔍 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
Push to a specific server (when you have several profiles):
odooflow push --server staging
odooflow push --server prod --remote-only --exec 'sudo systemctl restart odoo-prod'
📡 Server profiles — a faster flow for staging / qa / prod
Add as many named profiles as you want. The first one you create is the default for odooflow push:
# Interactive wizard — validates every field and tests SSH before saving.
odooflow server add staging
# Non-interactive / scriptable:
odooflow server add qa \
--host 10.0.0.5 --port 22 --user deploy \
--directory /opt/odoo/qa --key-path ~/.ssh/odooflow_rsa
# Review what you have:
odooflow server list
odooflow server show staging # password is masked; --reveal-password to see it
# Switch the default:
odooflow server use prod
# Verify connectivity without uploading:
odooflow server test staging
# Reorder / remove:
odooflow server remove qa
Existing single-server configs are auto-migrated into a default profile on first odooflow server add, so nothing you've already configured is lost.
📁 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
│ │ ├── server.py
│ │ └── sync_env.py
│ └── utils/
│ ├── env.py
│ ├── server_profile.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
Metadata
Release files for odooflow-cli 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| odooflow_cli-0.3.1.tar.gz | 53.0 kB | Without provenance | Details for odooflow_cli-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| odooflow_cli-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for odooflow_cli-0.3.1-py3-none-any.whl |
Total release size: 117.0 kB
Release files / odooflow_cli-0.3.1.tar.gz
| Download URL | odooflow_cli-0.3.1.tar.gz |
|---|---|
| Size | 53.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b04144e53be564b09cc1d899d7b5b33815afbc71549c8cd0e4d120e3eefa934
|
|
BLAKE2b-256 checksum How to use checksums |
565c439ff87a48f87d4a94f158dc0569aeedc61c9818c197f5ca0982b5b97872
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Release files / odooflow_cli-0.3.1-py3-none-any.whl
| Download URL | odooflow_cli-0.3.1-py3-none-any.whl |
|---|---|
| Size | 64.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd601189bf6ef96f2e90504ad5bbb72fc7024cc920bd5b466118d03f833b59b4
|
|
BLAKE2b-256 checksum How to use checksums |
95272e49bc9f0392084d81202adef866bc249f36d78a2d33e2393558d795e80a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Security for odooflow-cli 0.3.1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.