Skip to main content

List files from Odoo addon dependencies using manifestoo.

Project description

Akaidoo Logo

Akaidoo: win your Odoo AI context fight!

PyPI version Python versions License

The ultimate bridge between your Odoo codebase and Large Language Models.


Akaidoo extends manifestoo to intelligently survey, filter, and dump Odoo source code, providing highly optimized context for AI-driven development. It solves the critical problem of fitting relevant Odoo code into LLM context windows while preserving the information AI needs to help you.

Quick Start

# Install
pip install akaidoo

# Survey your addon (shows dependency tree)
akaidoo sale_stock -c odoo.conf

# Dump context to clipboard (smart defaults)
akaidoo sale_stock -c odoo.conf -x

# Dump with budget constraint (auto-escalates shrink)
akaidoo sale_stock -c odoo.conf -B 100k -o context.md

Core Concepts

The 2-Stage Workflow: Map, then Dump

  1. Map: Survey the codebase to understand scope and relationships
  2. Dump: Generate optimized context for your AI assistant

How Akaidoo Thinks

Akaidoo uses a multi-pass algorithm:

  1. Discovery: Scans all Python files to build a complete model relationship graph
  2. Expansion: Determines which models are "relevant" based on complexity scores
  3. Action: Shrinks code intelligently based on model category and relevance

Usage Examples

Basic Operations

# Survey addon (tree view, no dump)
akaidoo sale_stock -c odoo.conf

# Dump to clipboard
akaidoo sale_stock -c odoo.conf -x

# Dump to file
akaidoo sale_stock -c odoo.conf -o context.md

# Open in editor
akaidoo sale_stock -c odoo.conf -e

Controlling Expansion

# Auto-expand (default) - akaidoo picks high-score models
akaidoo sale_stock -c odoo.conf -x

# Explicit mode - ONLY expand specific models (disables auto-expand)
akaidoo sale_stock -c odoo.conf -E sale.order,stock.picking -x

# Additive mode - add models to auto-expand set
akaidoo sale_stock -c odoo.conf --add-expand account.move -x

# Remove from auto-expand set
akaidoo sale_stock -c odoo.conf --rm-expand mail.thread -x

Controlling Context Size

# Set shrink level manually
akaidoo sale_stock -c odoo.conf --shrink=hard -x

# Budget mode - auto-escalate shrink to fit token budget
akaidoo sale_stock -c odoo.conf -B 100k -o context.md

# Max shrink - data model skeleton only
akaidoo sale_stock -c odoo.conf --shrink=max -x

Advanced Usage

# Multiple addons
akaidoo sale_stock,purchase_stock -c odoo.conf -x

# Include views and wizards
akaidoo sale_stock -c odoo.conf --include=view,wizard -x

# Include OpenUpgrade migration scripts
akaidoo sale_stock -c odoo.conf -u ~/OpenUpgrade -o migration.md

# Prune specific large methods
akaidoo sale_stock -c odoo.conf --prune-methods sale.order._compute_amounts -x

Shrink Modes

The --shrink option controls how aggressively code is compressed:

Level Target Addons Dependency Addons Use Case
none Full code Full code Maximum detail
soft (default) Full code Shrunk (methods -> pass) General development
medium Lightly shrunk Heavily shrunk Moderate context
hard Shrunk Very shrunk Focused debugging
max Skeleton only Skeleton only Data model overview

What Gets Shrunk?

  • Full: Complete code with all logic preserved
  • Soft: Method bodies replaced with pass # shrunk, signatures kept
  • Hard: Methods removed entirely, only fields and class structure
  • Max: Fields summarized, only relational fields to relevant models detailed

Expansion Options

Akaidoo intelligently decides which models to show in full detail ("expand") vs shrink.

Auto-Expand (Default)

By default, akaidoo scans your target addons and auto-expands models with high "complexity scores" (based on fields, methods, and lines of code).

Explicit Mode (--expand / -E)

Use when you want ONLY specific models expanded. This disables auto-expand:

# Only expand sale.order - everything else gets shrunk
akaidoo sale_stock -E sale.order -x

Use case: Debugging a specific model, investigating a traceback.

Additive Mode (--add-expand)

Add models to the auto-expand set without disabling auto-expand:

# Auto-expand + also expand stock.move
akaidoo sale_stock --add-expand stock.move -x

Use case: Need more context on a related model.

Remove from Expansion (--rm-expand)

Remove noisy models from auto-expand set:

# Don't expand mail.thread even if it scores high
akaidoo sale_stock --rm-expand mail.thread -x

Agent Mode

Agent mode (--agent) produces context optimized for AI agents that can read files directly. Instead of including full source in the dump, it provides:

  1. Schema Map: Summarized data model structure (fields, relations)
  2. Read Instructions: File paths and line ranges for the agent to read and use context caching
akaidoo sale_stock -c odoo.conf --agent -o .akaidoo/context/background.md

Output Structure

## 1. PROJECT STRUCTURE (Dependency Order)
[Module tree showing inheritance order]

## 2. SCHEMA MAP
Path: .akaidoo/context/background.md
(Summarized models - use for navigation, not implementation details)

## 3. LOGIC & SOURCE CODE
| Model | Type | Path | Range |
| sale.order | Ext | addons/sale/models/sale.py | 45-320 |

Use case: AI coding assistants (Claude, Cursor) that have file reading capabilities.

MCP Server

Akaidoo can run as a persistent Model Context Protocol server, allowing AI agents to dynamically query your Odoo codebase.

Starting the Server

akaidoo serve

Available Tools

read_module_source (Primary)

Retrieves Odoo addon source code with intelligent context optimization.

read_module_source(
    addon="sale_stock",                    # Required
    shrink_mode="soft",                    # none/soft/medium/hard/max
    expand_models=["sale.order"],          # Explicit mode (disables auto-expand)
    add_expand_models=["stock.move"],      # Additive mode (works with auto-expand)
    context_budget_tokens=100000,          # Auto-escalate shrink to fit
)

get_context_map (Optional)

Shows dependency tree before committing to full dump:

get_context_map(addon="sale_stock")

get_context_summary (Optional)

Returns metrics (token counts, expanded models) for planning:

get_context_summary(addon="sale_stock")
# Returns: {"total_tokens": 85000, "expand_models": ["sale.order"], ...}

Integration Example (Claude Desktop)

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "akaidoo": {
      "command": "akaidoo",
      "args": ["serve"]
    }
  }
}

Tree View

When running without output flags, akaidoo shows a tree view with:

  • Module dependency structure
  • File sizes
  • Per-model shrink indicators with color coding:
    • Red (full): Complete code preserved
    • Yellow (soft): Method bodies shrunk
    • Cyan (hard): Only fields and API
    • Dim (max): Skeleton only
Module: sale_stock
Path: addons/sale_stock
├── models/sale_order.py (12KB) [Models: sale.order (full), stock.picking (soft)]
├── models/stock_move.py (8KB) [Models: stock.move (hard)]
│
└── Module: sale
    Path: addons/sale
    ├── models/sale.py (45KB) [Models: sale.order (full)]

Framework Exclusions

By default, akaidoo excludes well-known framework addons that LLMs typically know:

base, web, web_editor, web_tour, portal, mail, digest, bus, auth_signup, base_setup, http_routing, utm, uom, product

# Add to exclusion list
akaidoo sale_stock --exclude my_addon -x

# Force include a default-excluded addon
akaidoo sale_stock --no-exclude mail -x

Directory Mode

Pass a directory path (with trailing /) to scan arbitrary directories:

# Scan directory recursively (not Odoo mode)
akaidoo ./my_scripts/ -o dump.md

Environment Variables

Variable Purpose
ODOO_RC / ODOO_CONFIG Odoo configuration file path
ODOO_VERSION / ODOO_SERIES Odoo version/series
EDITOR / VISUAL Default editor for --edit mode

Installation

# Basic installation
pip install akaidoo

# With MCP server support
pip install akaidoo[mcp]

# Development installation
pip install -e ".[test]"

Contributing

Contributions are welcome! Please open an issue or submit a PR on GitHub.

# Run tests
pytest tests/

# Run with verbose output
pytest tests/ -v

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

akaidoo-1.4.1.tar.gz (59.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

akaidoo-1.4.1-py3-none-any.whl (50.2 kB view details)

Uploaded Python 3

File details

Details for the file akaidoo-1.4.1.tar.gz.

File metadata

  • Download URL: akaidoo-1.4.1.tar.gz
  • Upload date:
  • Size: 59.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for akaidoo-1.4.1.tar.gz
Algorithm Hash digest
SHA256 2ef1ef6fe37a4b2d7be2c363a3a44a6e6a93fee6d38f0304523e27b822d1d67a
MD5 ef1562ef5d4178cc0caaba1d2e4e1e29
BLAKE2b-256 6c93fbfc54e2f78e682bf7d6719b51b430405a588045b0b24e3a8fcd4bfb77d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for akaidoo-1.4.1.tar.gz:

Publisher: publish.yml on akretion/akaidoo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file akaidoo-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: akaidoo-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 50.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for akaidoo-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d27dccb496d595c2454ae9583a1168d94e61c0dfb3012ca533e3fe9743a87844
MD5 4a23f565c7f86884f9e95209c722184f
BLAKE2b-256 b24e36a6e58bc53f6649c81e3b928e6248a7402cd11305544f9f961c79d331a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for akaidoo-1.4.1-py3-none-any.whl:

Publisher: publish.yml on akretion/akaidoo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page