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, connect
  • 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.
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.

  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.1.tar.gz (53.0 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.1-py3-none-any.whl (64.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: odooflow_cli-0.3.1.tar.gz
  • Upload date:
  • Size: 53.0 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.1.tar.gz
Algorithm Hash digest
SHA256 8b04144e53be564b09cc1d899d7b5b33815afbc71549c8cd0e4d120e3eefa934
MD5 f165d6ae0b8fcf651954d37e897ddc63
BLAKE2b-256 565c439ff87a48f87d4a94f158dc0569aeedc61c9818c197f5ca0982b5b97872

See more details on using hashes here.

File details

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

File metadata

  • Download URL: odooflow_cli-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 64.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd601189bf6ef96f2e90504ad5bbb72fc7024cc920bd5b466118d03f833b59b4
MD5 269e8fb4db11d7d3836b6f6b81ae9482
BLAKE2b-256 95272e49bc9f0392084d81202adef866bc249f36d78a2d33e2393558d795e80a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 files

0.3.0

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