Skip to main content

Odoo databases management CLI tool

Project description

odoo-db

CLI tool for Odoo database management. Connects to local PostgreSQL via Unix socket (peer auth — no credentials needed). Designed for developers running Odoo locally.

Installation

uv tool install git+https://github.com/trobz/odoo-db

Or for development:

git clone https://github.com/trobz/odoo-db
cd odoo-db
make install                       # install deps + pre-commit hooks
uv tool install --editable .       # make `odoo-db` available globally

Usage

odoo-db [OPTIONS] COMMAND [DB]

Global options:

Option Default Description
--output-file - (stdout) Write output to file
--output-format text Output format: text, json, prometheus
--log-level WARNING Logging level: DEBUG, INFO, WARNING, ERROR
--log-file logs/odoo-db.log Log file path (auto-created)

Commands:

Command Description
list List all Odoo DBs with version and neutralization status
modules <db> List installed modules with version
crons <db> List active scheduled actions
jobs <db> Queue job counts by state (requires queue_job module)
users <db> List active users with connection status
locks <db> Show active PostgreSQL locks
stats <db> Per-table record counts and sizes by year (--years N, --top N)
not-odoo <db> Show non-Odoo database objects: custom views, triggers, functions, and stored procedures
prepare-audit <db> Combine summary + modules + stats + not-odoo into audits/<db>.json for /odoo-dev:audit-db (--years N, --top N; --top 0 means all tables)

Examples

# List all local Odoo databases
odoo-db list

# Verbose: also show module count and user count
odoo-db list --verbose

# Output as JSON
odoo-db --output-format json list

# Export prometheus metrics to file
odoo-db --output-format prometheus --output-file /tmp/odoo.prom list

# Show installed modules for a specific database
odoo-db modules my_db

# Show queue jobs
odoo-db jobs my_db

# Per-table stats: record counts and sizes for last 3 years
odoo-db stats my_db

# Top 10 tables, last 5 years
odoo-db stats my_db --top 10 --years 5

# Debug mode with full logging
odoo-db --log-level debug list

# Show non-Odoo objects: custom views, triggers, functions, stored procedures
odoo-db not-odoo my_db

# Export not-odoo report as JSON
odoo-db --output-format json not-odoo my_db

# Prepare an audit bundle (writes audits/my_db.json — gitignored)
odoo-db prepare-audit my_db

# Custom output path
odoo-db --output-file /tmp/audit.json prepare-audit my_db

Dev

make install   # Install deps + pre-commit hooks
make check     # Lint, format, type-check
make test      # Run tests

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_db-1.4.0.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

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

odoo_db-1.4.0-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file odoo_db-1.4.0.tar.gz.

File metadata

  • Download URL: odoo_db-1.4.0.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for odoo_db-1.4.0.tar.gz
Algorithm Hash digest
SHA256 74fa8784623522e1b0d4072cbd5f895f093cbd008cbb93233a271be83be9b38b
MD5 361e27d3940516190b15a99bab2b4869
BLAKE2b-256 7f63bd909aafc9968ff5f2d2312a93e8e54974cc33d17c2da8ac016d27340402

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_db-1.4.0.tar.gz:

Publisher: release.yaml on trobz/odoo-db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file odoo_db-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: odoo_db-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for odoo_db-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7eed692345971b269d0d9159e0870f5e2e7aa3576595074500c1b6b6be390a60
MD5 9efd0ff4d3e43d6f0af5cd9f7e1b0046
BLAKE2b-256 ed78e7abd732a689a0a97c5d2b570a50f9ade2a91ca9ebe8bd3deb06cd80e625

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_db-1.4.0-py3-none-any.whl:

Publisher: release.yaml on trobz/odoo-db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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