Configure the TypeScript CLI fallback (XML-RPC). Use when you cannot run the MCP server (no python3 3.9+) or want a lightweight scriptable surface. Odoo 17/18/SaaS tested.
Installs into .claude/skills of the current project.
Are you the author of Odoo Setup Cli?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/transgenia-odoo-setup-cli)
---
name: odoo-setup-cli
description: Configure the TypeScript CLI fallback (XML-RPC). Use when you cannot run the MCP server (no python3 3.9+) or want a lightweight scriptable surface. Odoo 17/18/SaaS tested.
---
# Setup — Odoo CLI (fallback)
The CLI is a lightweight XML-RPC client (Node.js only, no Python). Use it when
the MCP server can't run in your environment, or for scripted batch access.
The MCP server remains the primary, fuller surface.
## Step 1 — Node.js
```bash
node --version # need 18+
```
If missing: https://nodejs.org/ (LTS), `brew install node`, or `apt install nodejs npm`.
## Step 2 — Locate the bundled CLI
```bash
PLUGIN_CLI="${CLAUDE_PLUGIN_ROOT}/cli"
# or, if the variable is not set in your shell:
PLUGIN_CLI=$(find ~/.claude/plugins/cache -path "*/odoo-tools/cli" -type d 2>/dev/null | head -1)
echo "$PLUGIN_CLI"
```
## Step 3 — Install to a stable location
```bash
CLI_DIR="$HOME/.claude/tools/odoo-cli"
mkdir -p "$CLI_DIR/src/commands"
cp "$PLUGIN_CLI/package.json" "$CLI_DIR/"
cp "$PLUGIN_CLI/package-lock.json" "$CLI_DIR/" 2>/dev/null
cp "$PLUGIN_CLI/tsconfig.json" "$CLI_DIR/"
cp "$PLUGIN_CLI/src/odoo-client.ts" "$CLI_DIR/src/"
cp "$PLUGIN_CLI/src/cli.ts" "$CLI_DIR/src/"
cp "$PLUGIN_CLI/src/commands/"*.ts "$CLI_DIR/src/commands/"
```
## Step 4 — Credentials (.env)
Create the file with placeholders only, readable by the current user alone
(`umask 077` in a subshell, so it does not leak into the rest of the session).
Fill in the URL, database and login with the user; **do not ask for the API key
or password in the chat and never write the secret yourself**:
```bash
( umask 077; cat > "$HOME/.claude/tools/odoo-cli/.env" << 'ENVEOF'
ODOO_URL=<url>
ODOO_DB=<db>
ODOO_USER=<login-email>
ODOO_API_KEY=<api-key> # Odoo >= 14 (recommended); ignored on older lines
# ODOO_PASSWORD=<password> # Odoo < 14 instead (incl. Odoo 10-12): use the
# account password — those versions have no API keys
ENVEOF
)
```
Then tell the user to open `~/.claude/tools/odoo-cli/.env` in their own editor
and replace `<api-key>` (or uncomment the password line) themselves. Only one
credential is required: `ODOO_API_KEY` wins when both are set. The file stays
on their machine; delete it when they stop using the CLI.
## Step 5 — Build and verify
```bash
cd "$HOME/.claude/tools/odoo-cli" && npm install && npm run build
node dist/cli.js contacts '{"limit":1}'
```
A returned contact confirms the connection.
## Usage
```bash
node ~/.claude/tools/odoo-cli/dist/cli.js invoices '{"state":"posted","limit":20}'
node ~/.claude/tools/odoo-cli/dist/cli.js fields '{"model":"res.partner"}'
```
> Note: the CLI targets modern model names (e.g. `account.move`) and has no
> compat mapping. For Odoo ≤ 12 use the historical name you actually mean
> (`account.invoice` for invoices, `account.move` for journal entries), or
> prefer the MCP server. The MCP resolver never rewrites `account.move` →
> `account.invoice` on older versions (merge, not a rename). On Odoo ≤ 13
> authenticate the CLI with `ODOO_PASSWORD` (account password), not an API key.
## Help
Blocked, or need maintenance, support, training or an assisted deployment?
Transgenia provides it through its official channels: **dev@transgenia.org** · WhatsApp **+52 55 8034 0405** (https://wa.me/525580340405).