@tao-thewarat/odex
v0.1.0
Published
A TypeScript CLI for Odoo addon update workflows.
Maintainers
Readme
Odex
Odex is a TypeScript CLI for Odoo development workflows. The current version focuses on one practical job first: updating Odoo modules inside a Docker container with a shorter, repeatable command.
The idea is to start with something useful every day, then grow into a broader Odoo developer tool over time.
Goals
- Shorten repetitive Odoo update commands
- Standardize common update flags for local development
- Make Docker-based Odoo updates easier to run and repeat
- Keep the CLI scriptable and friendly to future expansion
Current Scope
Right now Odex ships with a single command:
update
This keeps the project small while solving a real pain point first.
Why Odex
- Short
- Easy to remember
- Sounds like a real developer tool
- Fits the Odoo + CLI use case well
- Professional enough to grow into a real product name
Tech Stack
Odex uses a small TypeScript stack that fits a lightweight CLI:
commanderfor commands and optionsexecafor running Docker commandszodfor validating input and optionstsxfor running TypeScript during development without rebuilding every timeesbuildfor bundling the CLIjavascript-obfuscatorfor producing a harder-to-read build output
Why Commander
For the first version, commander is a better fit than a larger framework like oclif because:
- The main need is parsing arguments and flags
- The tool primarily builds and runs Dockerized Odoo commands
- The current scope is still small
- It is faster to start with and easier to maintain
If Odex grows significantly later, with many commands or a real plugin system, moving to oclif can be considered then.
CLI Direction
Odex should prefer explicit flag-based commands instead of starting with interactive prompts so it is:
- Easy to repeat
- Easy to reuse in shell scripts
- Easy to integrate into CI/CD workflows
Current command style:
odex update sale_management --db dev
odex update sale_management,stock --db dev
odex update sale_management --db dev --container odoo-web
odex update sale_management --db dev --dry-runInstallation
yarn install
yarn build
yarn linkIf you use fish shell, make sure Yarn's global bin directory is on your PATH:
fish_add_path $HOME/.yarn/bin
source ~/.config/fish/config.fishThen you can run:
odex --helpAvailable Command
update
Updates one or more Odoo modules inside a Docker container by running odoo -d <db> -u <modules>.
Default behavior:
- Runs through
docker exec -it - Uses container name
odooif--containeris not provided - Includes
--stop-after-initby default - Includes
--no-httpby default - Supports comma-separated module names
- Supports
--dry-runto preview the generated command
Examples:
odex update sale_management --db dev
odex update sale_management,stock --db dev
odex update sale_management --db dev --container odoo-web
odex update sale_management --db dev --dry-run
odex update sale_management --db dev --no-stop-after-initGenerated command example:
docker exec -it odoo odoo -d dev -u sale_management --stop-after-init --no-httpDevelopment
yarn dev update sale_management --db dev --dry-run
yarn typecheck
yarn buildBuild outputs:
dist/odex.jsmain runnable CLI builddist/odex.obf.jsobfuscated build output
Project Structure
src/
main.ts
commands/
update.ts
lib/
run-odoo.tsFile responsibilities:
src/main.tsCLI entry point and command registrationsrc/commands/update.tsupdate command definition and option parsingsrc/lib/run-odoo.tsDocker command building and execution logic
Roadmap
Near-term ideas:
scanupdate changedupdate allodex docker-update <module> -d <db> -s <service>odex update changedodex logs grep RPC_ERRORodex addon new <module_name>odex validate manifestodex xpath find "<expr>"
Summary
Odex is a TypeScript CLI for Odoo development, currently centered on a Docker-based update command. It keeps the first version small and practical, while leaving room to expand into a fuller Odoo developer workflow tool later.
