Skip to main content

CLI tool to manage and develop local Odoo instances

Project description

odoo-cli

A CLI tool to manage and develop local Odoo instances: one workspace, git worktrees for multitasking across versions, shared venvs, derived database names, and automatic port allocation — with the filesystem, the database, and odoo/odoo/release.py as the only sources of truth. The full design lives in docs/ (requirements.md, architecture.md, usecase.md).

Install

uv tool install odoo-cli-official   # installs the `odoo` executable

Runtime is the Python standard library plus a vendored click (Python 3.11+); nothing else.

Quick start

odoo init                 # workspace at ~/odoo, latest stable, empty db
odoo module install crm
odoo start                # foreground; Ctrl-C to stop

The workspace looks like:

~/.config/odoo/odoo.conf  <- the only config file (Odoo's own format/location)
~/odoo/
    .repositories/        <- shared bare clones (presence = enabled)
    .venvs/19.0/          <- one venv per detected Odoo version
    .run/19.0/19.0/ports  <- allocated ports per (worktree, database)
    19.0/                 <- a worktree: odoo/, documentation/, ...

Daily commands

Command Description
odoo start [-d DB] [--new-port] [--prod] Start the server (foreground)
odoo where [--json] Show the resolved context + exact odoo-bin command
odoo update [modules] Update modules (default: all installed)
odoo module install <modules> Install modules (creates the db if needed)
odoo test <module|installed|all> [-t tag] Run tests in {db}-test
odoo shell [-c CODE] Odoo Python REPL / one-shot execution
odoo db reset Drop + recreate, reinstalling the db's module set
odoo config get/set/list Edit the shared odoo.conf
odoo repo enable <enterprise|themes|upgrade> Enable an optional repo
odoo repo add <name> <url> Clone a custom addon repository
odoo worktree create <name> [version] [--linked-from SRC --addon REPO] New worktree
odoo venv Rebuild the venv for the current worktree

Commands infer their target from the current directory (or -w/-d); the database defaults to the worktree name.

Development

# any Python >= 3.11 (a bare `python` may resolve to an older interpreter)
python3 -m unittest discover           # unit + cli + integration (fast, no network)
ODOO_CLI_E2E=1 ODOO_CLI_E2E_ODOO_REPO=~/src/odoo \
    python3 -m unittest discover tests/e2e -v  # real-Odoo flows (slow, opt-in)
ODOO_CLI_DOCKER_E2E=1 \
    python3 -m unittest tests.integration.test_postgres_install_environments -v

Architecture, layering rules, and the testing strategy are documented in docs/architecture.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odoo_cli_official-0.2.2.tar.gz (224.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odoo_cli_official-0.2.2-py3-none-any.whl (176.0 kB view details)

Uploaded Python 3

File details

Details for the file odoo_cli_official-0.2.2.tar.gz.

File metadata

  • Download URL: odoo_cli_official-0.2.2.tar.gz
  • Upload date:
  • Size: 224.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.14

File hashes

Hashes for odoo_cli_official-0.2.2.tar.gz
Algorithm Hash digest
SHA256 83f43b5bca242eff89a22f85be7f72b29a97eb835bfbc7c0450ce1b979de2560
MD5 f2e9730879356a9876c4f4898fe57b66
BLAKE2b-256 9de804521f0dea9b75c60cc657a76d711dee9563f1d299edfb7dff7fb3dc5e97

See more details on using hashes here.

File details

Details for the file odoo_cli_official-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo_cli_official-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 425e9a1c9e41a5a219eeff154658fa2fbd1e2f8c696d4e03cb6af8b9c969d3e5
MD5 3a4d95af3aba641c2dd4cf86737d50fd
BLAKE2b-256 ea0899f7c218a4a59a78d14313b4d92af231596acbeb124555d172823162d57b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page