Skip to main content

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

  1. GitLab access token — kept private in the rc file; typed input is masked.
  2. GitLab URL — defaults to the bundled one, override for self-hosted.
  3. 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 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
  • server: Manage named server profiles (staging/QA/prod) — list, add, show, use, remove, test
  • 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
--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.

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

  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


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.3.0.tar.gz (46.2 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.3.0-py3-none-any.whl (55.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: odooflow_cli-0.3.0.tar.gz
  • Upload date:
  • Size: 46.2 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.3.0.tar.gz
Algorithm Hash digest
SHA256 11385b5cc52e57e93fdec47dea12f63217876ffdea20ed492428ea2f76f4e708
MD5 c6c848152b5d56e826d131ed82a1188f
BLAKE2b-256 0984dd676d1e9a07de5a1b3fb092c395b222107b627152c6053104c2bff3cdab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: odooflow_cli-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 55.9 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a17a98fdf34e82083f0c6e9152b65219b641224089e27fda98cf280a9f9c2ab
MD5 0ce9f9e5851384709f8703cb79483ab9
BLAKE2b-256 034212926043d91faa32323b743b27beeec506b0f8c78b4af90f2cf2ed60174a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.1

2 files

This release

0.3.0 This release

2 files

0.2.0

2 files

0.1.0

2 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