MCPcopy Index your code
hub / github.com/chermed/kodoo

github.com/chermed/kodoo @v0.3.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.2 ↗ · + Follow
189 symbols 595 edges 54 files 1 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Overview

Terminal UI for Odoo

The kodoo tool is a Terminal UI for Odoo that allows to navigate data, it's destined to developers and end users, it supports the odoo versions from 8.0 to 15.0.

asciicast

Zen mode :

asciicast

Installation :

Visit the last release page

The release page contains all compiled binaries of this tool

Via script for macOS and Linux

curl -sSL https://raw.githubusercontent.com/chermed/kodoo/main/install.sh | sh

Via Homebrew for macOS or LinuxBrew for Linux

brew tap chermed/kodoo
brew install chermed/kodoo/kodoo

Upgrade :

brew upgrade chermed/kodoo/kodoo

Via a GO install

go get -u github.com/chermed/kodoo

For Windows

Get the executable from the release page

Using docker

The image is docker.io/chermed/kodoo

docker run -it --rm -v $(pwd):/.kodoo --net host chermed/kodoo:latest init-config

Edit the generated file, then run:

docker run -it --rm -v $(pwd):/.kodoo --net host chermed/kodoo:latest

Get started

  1. Install the command following the instructions
  2. Initialize the configuration using the command kodoo init-config
  3. Edit the configuration (only the list of servers is mandatory)
  4. Run the command kodoo
  5. Type ? to see the help page, and ESC to go back to the main page
  6. Start to query the data from a database

Features

  1. Switch between many Odoo servers
  2. Manage and run macros
  3. Query objects and automatic refresh
  4. Pagination support
  5. Quick access to related records
  6. Auto detection of fields to show as columns in the table
  7. Run remote function on a selected records
  8. Sort and filter records
  9. Show metadata and details of a record
  10. Change dynamically the database or the user to use
  11. Zen mode (focus on data with auto page rotation)
  12. Readonly mode

Query and filter

Let's assume the following query:

sale.order +id -name partner_id state state=sent,sale partner_id.name~gem %10

It will be parsed to :

  1. Model: sale.order
  2. Fields: id, name, partner_id and state
  3. Domain: [["state", "in", ["sent","sale"]], ["partner_id.name", "ilike", "gem"]]
  4. Order: id asc, name desc
  5. Limit: 10

Only the model is required for the query, the other parameters could be given during the filter, example :

/state=sale +id %3 state name date_order

The transformation of operators is done in that way :

Kodoo operator Odoo operator
= in
~ ilike
>= >=
<= <=
> >
< <
!= !=

Use cases

  1. For developers :
  2. Provide a fast way to see technical data (IDs and metadata) of records.
  3. Query and show invisible objects and invisible fields
  4. For Odoo customers :
  5. Use the Zen mode to display data on a hanging screen (Kitchen for a restaurant, Work orders for the manufacturing, etc)
  6. Use macros like menu actions (custom views)

Limitations :

  1. Data filtering is basic:
  2. The values in the domains are sent to odoo as strings or list of strings
  3. If many filters are provided, the logical operator that's applied is AND
  4. Binary fields value will not be shown or downloaded

Thanks

Thanks to derailed for his awesome k9s tool, it gave me the idea to build this tool.

Core symbols most depended-on inside this repo

showInfo
called by 50
internal/ui/info.go
addField
called by 49
internal/ui/common.go
GetColor
called by 33
internal/config/skins.go
setSearchBarFocus
called by 13
internal/ui/search_bar.go
GetCommand
called by 12
internal/data/commands_history.go
showSearchReadResult
called by 12
internal/ui/table.go
GetCurrentServer
called by 11
internal/data/server.go
AddCommand
called by 10
internal/data/commands_history.go

Shape

Function 107
Method 45
Struct 26
TypeAlias 11

Languages

Go100%

Modules by API surface

pkg/odoo/structures.go15 symbols
internal/config/config.go14 symbols
internal/ui/table.go13 symbols
pkg/odoo/procedures.go11 symbols
pkg/odoo/command.go9 symbols
internal/ui/home.go9 symbols
internal/data/query_history.go9 symbols
internal/data/commands_history.go9 symbols
pkg/odoo/page.go6 symbols
internal/ui/pages.go6 symbols
pkg/odoo/server.go4 symbols
pkg/odoo/related_command.go4 symbols

For agents

$ claude mcp add kodoo \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact