Miscellaneous¶
Miscellaneous project utilities.
Modules:
| Name | Description |
|---|---|
build_global |
oops misc build-kb — build the global Odoo KB (once per version). |
create_workspace |
Generate a VSCode workspace file for the current Odoo project. |
edit_config |
Open an oops configuration file in the default editor. |
new_project |
Create a new GitHub repository from a template and clone it locally. |
usage |
Show oops command usage counters from the local stats file. |
view_doc |
Open the oops documentation in the default browser. |
oops misc create-workspace¶
Generate a VSCode workspace file for the current Odoo project.
Reads the Odoo version from odoo_version.txt at the repository root,
falling back to manifest.odoo_version in config, then writes a
The sources directory is read from odoo.sources_dir in ~/.oops.yaml.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--output |
file | Workspace file path. Defaults to |
None |
--without-download |
boolean | Don't download Odoo sources if missing. | False |
--include-sources |
boolean | Include the Odoo sources as folders in the workspace. | False |
--help |
boolean | Show this message and exit. | False |
Examples:
Generate a workspace file for the current project:
Write the workspace file to a specific path:
Include the Odoo sources as folders in the workspace (useful for navigation and go-to-definition):
Example output file (my-project.code-workspace):
{
"folders": [
{
"path": "."
}
],
"settings": {
"python.analysis.extraPaths": [
"~/odoo-sources/17.0/community",
"~/odoo-sources/17.0/enterprise"
],
"python.autoComplete.extraPaths": [
"~/odoo-sources/17.0/community",
"~/odoo-sources/17.0/enterprise"
]
}
}
With --include-sources, the Odoo source directories are added as workspace folders:
{
"folders": [
{"path": "."},
{"path": "~/odoo-sources/17.0/community"},
{"path": "~/odoo-sources/17.0/enterprise"}
],
"settings": { "..." }
}
oops misc edit-config¶
Open an oops configuration file in the default editor.
Opens ~/.oops.yaml (global) by default, or .oops.yaml in the current directory (local) when --local is passed. Creates the file with a starter template if it does not exist yet.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--local |
text | Edit the local config (.oops.yaml in the current directory) | False |
--global |
text | Edit the global config (~/.oops.yaml) [default] | True |
--help |
boolean | Show this message and exit. | False |
Examples:
Open the global config in the default editor:
Open the local project config instead:
oops misc new-project¶
Create a new GitHub repository from a template and clone it locally.
Prompts for a project name, slugifies it, asks for confirmation, then delegates to the gh CLI to create the repository and optionally trigger a workflow_dispatch event on a separate "action repository".
Reads default template, owner, visibility, and action settings from github in ~/.oops.yaml. All values can be overridden with CLI options.
Requires gh to be authenticated (run 'gh auth login' if needed).
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--no-clone |
boolean | Create the repo but do not clone it | False |
--help |
boolean | Show this message and exit. | False |
Experimental
This command requires gh to be authenticated (gh auth login) and a
github section in ~/.oops.yaml. Behaviour may change in future releases.
Configuration (~/.oops.yaml):
github:
template: "apikcloud/odoo-repository-template"
owner: "apikcloud"
visibility: "private"
prefix: "odoo"
team: "developers"
action_repo: "apikcloud/workflows"
action_workflow: "update.yml"
action_inputs:
branch: "main"
update: false
Examples:
Create a new project (prompts for name, slugifies, confirms):
Create without cloning locally:
oops misc usage¶
Show oops command usage counters from the local stats file.
Reads ~/.local/share/oops/stats.jsonl and prints a table of invocation counts per command, sorted from most to least used.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Examples:
Show per-command invocation counts:
oops misc view-doc¶
Open the oops documentation in the default browser.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
oops misc build-kb¶
oops misc build-kb — build the global Odoo KB (once per version).
EXPERIMENTAL — This command is part of the KB pipeline. Its interface may change without notice between releases.
Scans Odoo community (addons/ + odoo/addons/) and enterprise sources from the
standard oops source directories (config.odoo.sources_dir/
<cache_dir>/<version>.db
where
The global KB is version-specific and shared across all projects on the same Odoo version — it should never be stored inside a project repository. Run this once per Odoo version. The resulting database is shared across all projects on the same version.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--version |
text | Odoo version string (e.g. 17.0). Defaults to the version declared in the current project's odoo_version.txt. | None |
--cache-dir |
directory | Directory where |
None |
--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:
Build the global KB for the current project's Odoo version (auto-detected from odoo_version.txt):
Build for a specific Odoo version:
Write the database to a custom cache directory (default is ~/.cache/oops/kb/):
Show the addons roots being scanned in detail: