Skip to main content
The OdooLS language server is distributed as a single binary named odoo_ls_server. In normal use your editor launches it automatically via the LSP extension. You can also invoke it directly for parse-mode batch analysis or debugging.
odoo_ls_server [OPTIONS]

Parse mode flags

Parse mode runs OdooLS as a one-shot diagnostic extractor: it analyzes the codebase, writes diagnostics to a JSON file, then exits. Enable it with --parse.
--parse
bool
Short form: -pRun in parse mode. OdooLS extracts diagnostics from the codebase and exits instead of starting a long-running language server.
odoo_ls_server --parse \
  --community-path /opt/odoo/17.0 \
  --addons /opt/odoo/custom_addons \
  --python python3 \
  --output diagnostics.json
--community-path
string
Short form: -cPath to the Odoo community source directory. Required when running in parse mode.
--community-path /opt/odoo/17.0
--addons
string[]
Short form: -aOne or more addon directories to analyze in parse mode. Pass the flag multiple times or space-separate values.
--addons /opt/odoo/17.0/addons --addons /opt/custom_addons
--tracked-folders
string[]
Short form: -tRestrict diagnostic output to files inside these directories. By default, all Odoo source directories and addon paths are tracked. Use this flag to limit the report to a specific subset.
--tracked-folders /opt/custom_addons/my_module
--python
string
Path to the Python executable to use during parse mode analysis.
--python /home/user/.venv/bin/python
--output
string
default:"output.json"
Short form: -oFile path where parse mode writes diagnostic results in JSON format.
--output /tmp/ols-diagnostics.json
--stubs
string[]
Short form: -sOne or more directories containing additional type stubs. Each stub package must be in a subdirectory named after the package it stubs.
--stubs /opt/my-stubs
--no-typeshed-stubs
bool
Disable the bundled typeshed stubs for external packages. Standard library stubs are still included — they are required for analysis. Use this when supplying your own third-party package stubs via --stubs.
--stdlib
string
Alternative path to Python standard library stubs. When not supplied, OdooLS uses its bundled typeshed stdlib stubs.
--stdlib /opt/custom-stdlib-stubs

Server flags

These flags control how the long-running language server process behaves.
--config-path
string
Explicit path to an odools.toml configuration file. Overrides the default file-discovery behavior (walking up the directory tree).
odoo_ls_server --config-path /etc/odools/odools.toml
--clientProcessId
u32
Process ID (PID) to watch. When the watched process stops, OdooLS exits automatically. This is the standard LSP mechanism editors use to ensure the server is cleaned up when the editor closes.
This flag is available on Unix only.
odoo_ls_server --clientProcessId 12345
--use-tcp
bool
Connect over TCP instead of stdio. Intended for debugging; not needed in normal editor integration.

Logging flags

--log-level
trace | debug | info | warn | error
default:"trace"
Minimum log level to emit. Lower levels produce more output. Use error for quiet operation in CI.
LevelDescription
traceExtremely verbose; logs every internal step
debugDetailed debugging information
infoGeneral operational events
warnPotentially unexpected conditions
errorFailures only
odoo_ls_server --log-level debug
--logs-directory
string
Directory where log files are written. Defaults to a logs/ subdirectory next to the odoo_ls_server binary.
odoo_ls_server --logs-directory /tmp/odoo-ls-logs

Examples

Run parse mode

odoo_ls_server --parse \
  --community-path /opt/odoo/17.0 \
  --addons /opt/odoo/custom_addons \
  --python python3 \
  --output diagnostics.json

Run parse mode with restricted tracking

odoo_ls_server --parse \
  --community-path /opt/odoo/17.0 \
  --addons /opt/odoo/17.0/addons /opt/custom_addons \
  --tracked-folders /opt/custom_addons/my_module \
  --output my_module_diags.json

Start the server with debug logging

odoo_ls_server \
  --log-level debug \
  --logs-directory /tmp/odoo-ls-logs

Use an explicit config file

odoo_ls_server --config-path /etc/odools/odools.toml

Build docs developers (and LLMs) love