Addons¶
Manage addon symlinks, inventories, and third-party downloads.
Modules:
| Name | Description |
|---|---|
add |
Create root-level symlinks for specific addons found in any tracked submodule. |
analyze |
Print a structured summary of an Odoo module. |
compare |
Compare a provided addon list against the local root addons. |
diff |
Show modified Odoo addons between a base ref and HEAD. |
download |
Download addons from a GitHub repository branch. |
list |
List all addons discovered across submodules with their metadata. |
materialize |
Replace addon symlinks with a real copy of the addon directory. |
refactor |
oops addons refactor — apply section headers and docstring skeletons to custom modules. |
oops addons add¶
Create root-level symlinks for specific addons found in any tracked submodule.
Searches all submodules for addons matching the provided names and creates symlinks at the repository root. Skips addons that are already present.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--no-commit |
boolean | If set, created symlinks will not be committed. | False |
--help |
boolean | Show this message and exit. | False |
Examples:
Add mass_editing and web_notify from any tracked submodule:
Stage the symlinks without committing:
oops addons analyze¶
Print a structured summary of an Odoo module.
EXPERIMENTAL — This command is part of the KB pipeline. Its interface may change without notice between releases.
Reads the project KB and the module's source to produce a human- readable (or JSON) overview: manifest header, depends, per-class field and method breakdown, plus counts of declared data files and assets.
This command is read-only. It rebuilds the project KB if stale (same
semantics as oops addons refactor) but performs no source rewriting,
no git operations, and no manifest edits.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--kb |
file | Use an explicit KB file instead of the project KB. | None |
--refresh |
boolean | Force a project KB rebuild before analysis. | False |
--format |
choice (text | json) |
Output format. 'json' is suited for downstream LLM agent consumption. | text |
--verbose, -v |
boolean | Enable verbose KB logging. | False |
--help |
boolean | Show this message and exit. | False |
Experimental
This command is part of the KB pipeline. Its interface may change without notice between releases. The same warning is printed at runtime.
Examples:
Print a text summary of a single module:
Emit JSON for downstream tooling:
Analyse several modules in one invocation:
Force a KB rebuild before analysing:
oops addons compare¶
Compare a provided addon list against the local root addons.
Prints addons missing locally (prefixed with -) and extra local addons not in the list (prefixed with +). With --delete, extra local symlinks are removed.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--delete |
boolean | Remove extra local symlinks not in the provided list. | False |
--no-commit |
boolean | Do not commit changes | False |
--help |
boolean | Show this message and exit. | False |
Examples:
Check which addons from a list are missing or extra in the repo root:
Remove extra local symlinks not in the provided list:
Compare against a file and skip the commit:
oops addons diff¶
Show modified Odoo addons between a base ref and HEAD.
By default compares against the latest tag, or the penultimate tag when HEAD is already at the latest tag. The base can be overridden with --tag, --ref, or --commits. With --save, writes a migration script file.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--tag |
text | Compare against this specific tag. | None |
--ref |
text | Compare against any ref or SHA. | None |
--commits |
integer | Compare against HEAD~N. | None |
-s, --save |
boolean | Write the command in the migration file. | False |
--no-commit |
boolean | Do not commit changes | False |
--help |
boolean | Show this message and exit. | False |
Examples:
Show modified addons since the latest tag:
Compare against a specific tag:
Compare against the last 5 commits:
Write the migration script to migrate.sh and commit:
Write the migration script without committing:
oops addons download¶
Download addons from a GitHub repository branch.
Clones the repository over SSH (depth=1) into a temporary directory, discovers addon directories, and copies them into the current project. Downloaded addons are added to .gitignore (unless --no-exclude is passed).
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--addons |
text | Comma-separated addon names to copy (copies all if omitted). | None |
--exclude / --no-exclude |
boolean | Add downloaded addons to .gitignore. | True |
--help |
boolean | Show this message and exit. | False |
Examples:
Download all addons from a branch:
Download only specific addons:
oops addons list¶
List all addons discovered across submodules with their metadata.
Displays a table with addon name, symlink flag, submodule, upstream branch, PR flag, version, and author. Output can be formatted as text, JSON, or CSV.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--format |
choice (text | json | csv) |
Output format | text |
--init / --no-init |
boolean | Run 'git submodule update --init' for submodules whose path is missing on disk | False |
--name, -n |
text | Limit to these submodule names (as in .gitmodules) | None |
--symlinks-only |
boolean | Show only addons that are symlinked at the repo root | False |
--all |
boolean | List all addons, including those not in submodules (i.e. in the root of the repo) | False |
--help |
boolean | Show this message and exit. | False |
Examples:
Display the addon table:
Export as JSON for scripting:
Limit to a single submodule:
oops addons materialize¶
Replace addon symlinks with a real copy of the addon directory.
Useful when you need to modify a third-party addon locally. The symlink is removed and its target directory is copied in place. Only symlinks are processed; real directories are skipped.
By default all symlinks found at the repository root are processed. Use --include to restrict to a subset, or --exclude to skip specific addons.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--include |
text | Comma-separated list of addon names to materialize (default: all symlinks). | None |
--exclude |
text | Comma-separated list of addon names to skip. | None |
--dry-run |
boolean | Show what would happen, do nothing. | False |
--no-commit |
boolean | Do not commit changes | False |
--help |
boolean | Show this message and exit. | False |
Examples:
Preview all symlinks that would be materialized:
Materialize all symlinks at the repository root:
Materialize only specific addons:
Materialize all symlinks except specific ones:
Materialize without committing:
oops addons refactor¶
oops addons refactor — apply section headers and docstring skeletons to custom modules.
EXPERIMENTAL — This command is part of the KB pipeline. Its interface may change without notice between releases.
Operates on one or more modules in a single run. Reads the project KB, classifies every field and method in every model file, then rewrites each file in-place. By default a dedicated git branch is created and one commit per module is produced. Use --no-branch to stay on the current branch and --no-commit to skip committing (edits are staged but not committed).
What the tool does¶
- Normalises section headers to the canonical
# === SECTION === #format. - Reorganises fields and methods into the section order defined in CONVENTIONS.md.
- Generates minimal Google-style docstring skeletons for every method that does not already have one.
- Inserts a class docstring skeleton on every new model class.
- Creates a git branch (
refactor/doc-<module>for one module,refactor/doc-multifor several) and produces one commit per module whose body lists every rewritten file.
What the tool does NOT do¶
- It never modifies method bodies.
- It never infers business intent.
- It never completes # TODO: markers.
- It never touches non-model Python files, XML, CSV, or manifest.py.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--kb |
file | Path to the project KB database. When set, --refresh is ignored and no auto-rebuild happens. | None |
--branch / --no-branch |
boolean | Create a dedicated git branch before rewriting (use --no-commit to disable commits). | True |
--no-commit |
boolean | Do not commit changes. | False |
--dry-run |
boolean | Print what would be changed without writing any file. | False |
--refresh |
boolean | Force a project KB rebuild before running, even if the KB looks fresh. | False |
--verbose, -v |
boolean | N/A | False |
--help |
boolean | Show this message and exit. | False |
Experimental
This command is part of the KB pipeline. Its interface may change without notice between releases. The same warning is printed at runtime.
Examples:
Rewrite a single module on a dedicated refactor/doc-<module> branch with one commit:
Rewrite several modules in one run (one commit per module on refactor/doc-multi):
Preview the changes without writing any file:
Stay on the current branch and skip the commit (edits are staged):
Force a project KB rebuild before running:
Use an external KB database (skips the project-KB freshness check and --refresh):