🧩 OPM — Odoo Plugin Manager (CLI)
OPM is a modern and lightweight command-line tool for Odoo developers.
It automates cache refresh, hot reload, quick module upgrades, and test execution — all without restarting Odoo.
Compatible with Odoo 15 → 18, supporting both Docker and bare-metal environments.
⚙️ Installation
Install from PyPI:
pip install odoo-plugin-manager
Or update to the latest version:
pip install -U odoo-plugin-manager
📁 Configuration (opm.yaml)
When you first run any OPM command, it automatically creates an opm.yaml file in your working directory.
This file defines your Odoo connection details and runtime environment.
Example configuration
runtime:
odoo_url: "http://localhost:10017"
db: "main"
user: "admin"
pass: "admin"
addons:
- "/path/to/your/addons"
container: "odoo18" # Docker container name OR "" if running on host
ws_host: "127.0.0.1"
ws_port: 8765
Container rule:
- For Docker: set
container: "your-container-name"- For bare-metal: set
container: ""
🚀 Core Commands
🪄 opm init
Creates a new opm.yaml configuration file interactively.
opm init
Example output:
[opm] Creating opm.yaml configuration...
[opm] ✅ Configuration created successfully at ./opm.yaml
⚙️ opm dev
Starts development mode — a live-reload watcher that detects file changes and automatically refreshes your browser or flushes Odoo caches.
opm dev
🔁 What happens under the hood:
- Watches your addon folders (
addons/) for file changes - When
.xml,.js, or.scssfiles change → triggers a cache flush - When
.pyor__manifest__.pychanges → triggers a quick module upgrade - Notifies all connected browsers via WebSocket to auto-reload the page
💡 Keyboard Shortcuts
While opm dev is running in your terminal:
- Press
r→ manually trigger a browser reload - Press
Ctrl+C→ safely stop the development server
🌐 WebSocket Setup
When opm dev runs, it opens a WebSocket server (default: ws://127.0.0.1:8765).
Your Odoo frontend connects to this server to receive reload notifications.
If Odoo is hosted behind Nginx, configure it like this:
location /__opm__/ws {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_pass http://127.0.0.1:8765;
}
🔒 Notes
- If running on localhost, the WebSocket connects directly.
- On production/staging behind Nginx, it connects via
/__opm__/ws.
🧩 opm update <module>
Updates (or installs) a single module — automatically flushes caches and triggers live reload if opm dev is running.
opm update my_module
What it does:
- Detects Odoo binary automatically (works in Docker or locally)
- Runs
-iand-uflags for your module - Flushes Odoo caches via RPC after success
- If
opm devis active → triggers browser reload automatically
Example output:
[opm] 🧪 Starting update run…
[opm] ▶️ Executing update command…
✅ Update finished successfully.
[opm] Post-update: caches flushed via RPC.
🧪 opm test <module>
Runs tests for the specified Odoo module.
If the module is not yet installed, OPM installs or upgrades it before testing.
opm test my_module
Example output:
[opm] Odoo binary detected: /usr/bin/odoo
[opm] Running tests for module: my_module
✅ Tests finished successfully.
Failed tests:
❌ Tests failed. See .opm/artifacts/test_last.log for details.
All test logs are automatically saved in:
.opm/artifacts/
🩺 opm diagnose
Runs a diagnostic check to ensure Odoo and OPM configuration are correct.
opm diagnose
Example output:
[opm] 🔍 Running environment diagnostics...
[opm] Docker CLI: ✅ Found
[opm] Odoo binary: ✅ Found (/usr/bin/odoo)
[opm] Testing Odoo URL: http://localhost:10017
[opm] ✅ Odoo instance reachable.
[opm] 🏁 Diagnose complete.
🧠 Features
| Feature | Description |
|---|---|
| ⚙️ Automatic Cache Refresh | Detects XML, QWeb, or JS changes and flushes Odoo caches instantly. |
| 🧪 Module Install/Upgrade | Automatically installs or upgrades modules before running tests. |
| 🗱 Docker Integration | Detects and executes inside Odoo containers automatically. |
| 📦 Artifact Logging | Saves logs and test outputs under .opm/artifacts/. |
| ⚡ YAML Config System | Uses a single opm.yaml file for all environment details. |
| 🧠 RPC-Based Architecture | Works with Odoo via XML-RPC — no code injection or patching needed. |
🔮 Future Roadmap
These are upcoming features currently under development:
- 🔁 Hot Reload — true live reload support for Odoo front-end assets
- 🧩 Advanced Helper Addon (
opm_dev_helper) — deeper cache and UI refresh controls - 📊 Improved Test Reporting — detailed test result summaries and coverage integration
🧠 Technical Overview
| Key | Details |
|---|---|
| Language | Python 3.10+ |
| Dependencies | typer, rich, watchdog, requests, pyyaml, websockets |
| Odoo Compatibility | 15 → 18 |
| Platforms | macOS / Linux |
| Configuration File | opm.yaml (auto-created on first run) |
🦦 Example Workflow
A simple developer workflow might look like this:
# 1️⃣ Initialize config
opm init
# 2️⃣ Check your setup
opm diagnose
# 3️⃣ Start development mode (watch for file changes)
opm dev
# 4️⃣ Run tests for your module
opm test my_module
# 5️⃣ Update your module and auto-reload browser
opm update my_module
This setup keeps your Odoo instance responsive and your local development cycle short — no manual restarts needed.
📜 License
Licensed under the GNU General Public License v3 (GPL-3.0-or-later).
The OPM CLI is open source.
Future Odoo-specific helper addons may be released under a separate commercial license.
© 2025 Ahmet Atakan — Crafted for real Odoo developers who build faster, smarter, and cleaner.
Metadata
Release files for odoo-plugin-manager 0.6.8
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 |
|---|---|---|---|---|
| odoo_plugin_manager-0.6.8.tar.gz | 19.3 kB | Without provenance | Details for odoo_plugin_manager-0.6.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| odoo_plugin_manager-0.6.8-py3-none-any.whl | Python 3 | none | any | Details for odoo_plugin_manager-0.6.8-py3-none-any.whl |
Total release size: 44.2 kB
Release files / odoo_plugin_manager-0.6.8.tar.gz
| Download URL | odoo_plugin_manager-0.6.8.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1d38b19f05a74b94d90359c12c934e56d68ec43fa1a203ed608c292a4a190c5
|
|
BLAKE2b-256 checksum How to use checksums |
965b4dfd6e1124a482eaeaa24adc0c4a7abeefbe09de4ddcdb2b70dfdc0c4b70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / odoo_plugin_manager-0.6.8-py3-none-any.whl
| Download URL | odoo_plugin_manager-0.6.8-py3-none-any.whl |
|---|---|
| Size | 24.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7b3e649b6ec2982b064932db502c15a64db55e5b9daba2b86a9b24b54b93499b
|
|
BLAKE2b-256 checksum How to use checksums |
1bb926516f849a63693c31b5d97e95ab72a7dbba4ea649332518219b6bf89238
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for odoo-plugin-manager 0.6.8
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.