Try it offline¶
In this tutorial you run odoo-work-cli without an Odoo server. You list
projects, look at a week, preview an entry, book it and open the TUI. All of
it runs against the built-in fake backend with made-up data. You need about
ten minutes and nothing but the binary.
1. Install the binary¶
No Homebrew? See Install and update for
release binaries and go install.
2. Load the demo data¶
Download the demo state, demo-state.json, and
point the CLI at it. The second variable switches to the fake backend:
curl -sSLo /tmp/demo-state.json https://seletz.github.io/odoo-work-cli/assets/demo-state.json
export ODOO_WORK_CLI_FAKE_STATE=/tmp/demo-state.json
export ODOO_WORK_CLI_BACKEND=fake
The fake backend reads no config file and never calls 1Password. Writes go into the state file, so what you book stays there until you download it again.
Without the download
Skip the curl line and the fake backend creates its own, smaller data
set on the first call. The outputs then differ from the ones below.
3. Who are you?¶
$ odoo-work-cli whoami
ID: 2
Name: Alex Demo
Login: alex.demo@example.invalid
Email: alex.demo@example.invalid
Company: Example Consulting
4. Find something to book on¶
Projects, then the tasks of project 1:
$ odoo-work-cli projects
ID Name Customer Company Phase Project Manager Active
------ ------------------------------ -------------------- --------------- --------------- -------------------- ------
1 Lighthouse Portal Example Harbor Ltd Example Consulting In Progress Alex Demo true
2 Orchard Mobile App Example Orchard Inc Example Consulting In Progress Alex Demo true
3 Internal Example Consulting In Progress Alex Demo true
4 Riverbank Data Migration Example River Co Wildflower Labs In Progress Alex Demo true
$ odoo-work-cli tasks 1
ID Name Project Stage
-------- ---------------------------------------- ------------------------------ --------------------
11 Backend API Lighthouse Portal In Progress
12 Frontend Lighthouse Portal In Progress
13 Code review Lighthouse Portal In Progress
5. Look at a day¶
The demo world is frozen in ISO week 2026-W15. Thursday, 9 April, is "today". Look at Wednesday:
$ odoo-work-cli entries --date 2026-04-08
Date: 2026-04-08
ID Date ProjID Project TaskID Task Hours Status Description
-------- ------------ -------- ------------------------- -------- ------------------------- ------ ---------- ------------------------------
4016 2026-04-08 3 Internal 32 Training 1:30 draft Accessibility workshop
4015 2026-04-08 2 Orchard Mobile App 22 Support 2:30 draft Crash report on login
4014 2026-04-08 1 Lighthouse Portal 12 Frontend 4:00 draft Result list layout
Total: 8:00 (3 entries)
6. Preview an entry¶
Before you write anything, ask for a dry run. It validates the input, resolves project and task, and writes nothing:
$ odoo-work-cli entries add --project-id 1 --task-id 13 --date 2026-04-09 --hours 1:30 --description "Review fuzzy matching" --dry-run
Dry run: would create this entry; nothing was written.
Date: 2026-04-09
Project: Lighthouse Portal (1)
Task: Code review (13)
Hours: 1:30
Description: Review fuzzy matching
Warning: possible duplicate of entry 4018 (same day, project, task and description)
The warning tells you that the same entry already exists. Good thing you looked.
7. Book an entry¶
Book something new instead, on the support task of project 2:
$ odoo-work-cli entries add --project-id 2 --task-id 22 --date 2026-04-09 --hours 0:45 --description "Answer support mail"
Created entry 5000
Check it with odoo-work-cli entries --date 2026-04-09. The new entry is
listed with ID 5000.
8. The same as JSON¶
Scripts and agents ask for JSON:
$ odoo-work-cli projects --search portal --json
[
{
"id": 1,
"name": "Lighthouse Portal",
"active": true,
"customer": "Example Harbor Ltd",
"company": "Example Consulting",
"stage": "In Progress",
"project_manager": "Alex Demo",
"extra_fields": {}
}
]
9. Open the TUI¶
You see the week from the screenshot on the home page, with your new entry in the row Orchard Mobile App / Support. Press ? for help and Q to quit. The TUI tour shows the rest.
Clean up¶
Next¶
- Connect to your own Odoo: Your first booking.
- Everything about the fake backend: Test without Odoo.