List files from Odoo addon dependencies using manifestoo.
Project description
Akaidoo: win your Odoo AI context fight!
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
- Map: Survey the codebase to understand scope and relationships
- Dump: Generate optimized context for your AI assistant
How Akaidoo Thinks
Akaidoo uses a multi-pass algorithm:
- Discovery: Scans all Python files to build a complete model relationship graph
- Expansion: Determines which models are "relevant" based on complexity scores
- 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:
- Schema Map: Summarized data model structure (fields, relations)
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file akaidoo-1.5.0.tar.gz.
File metadata
- Download URL: akaidoo-1.5.0.tar.gz
- Upload date:
- Size: 60.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b457c0e709805593592273bc0356f2d686f61ec8b30f9fbf769668021b95f05
|
|
| MD5 |
fb19b283c35293b3604e1f9dd90fe69d
|
|
| BLAKE2b-256 |
44793ba7b2e2b61d7ca3b6132a5eca3e771c9662b6aa29f5375139bc0740ded7
|
Provenance
The following attestation bundles were made for akaidoo-1.5.0.tar.gz:
Publisher:
publish.yml on akretion/akaidoo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
akaidoo-1.5.0.tar.gz -
Subject digest:
3b457c0e709805593592273bc0356f2d686f61ec8b30f9fbf769668021b95f05 - Sigstore transparency entry: 1018034647
- Sigstore integration time:
-
Permalink:
akretion/akaidoo@777b6a68db9043a2bde7181ec28d1db85eaf8e3d -
Branch / Tag:
refs/tags/1.5.0 - Owner: https://github.com/akretion
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@777b6a68db9043a2bde7181ec28d1db85eaf8e3d -
Trigger Event:
push
-
Statement type:
File details
Details for the file akaidoo-1.5.0-py3-none-any.whl.
File metadata
- Download URL: akaidoo-1.5.0-py3-none-any.whl
- Upload date:
- Size: 50.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f26b796224bcdf348014d15cbdf78e4ebaabbeff55ac8d196e145472f9905387
|
|
| MD5 |
c1cc3fe85f855ee861ba180925dee70e
|
|
| BLAKE2b-256 |
bae12f7f9045acf523e966dabadbf4d04ef9545769f86d24797f5e74cebbf417
|
Provenance
The following attestation bundles were made for akaidoo-1.5.0-py3-none-any.whl:
Publisher:
publish.yml on akretion/akaidoo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
akaidoo-1.5.0-py3-none-any.whl -
Subject digest:
f26b796224bcdf348014d15cbdf78e4ebaabbeff55ac8d196e145472f9905387 - Sigstore transparency entry: 1018034650
- Sigstore integration time:
-
Permalink:
akretion/akaidoo@777b6a68db9043a2bde7181ec28d1db85eaf8e3d -
Branch / Tag:
refs/tags/1.5.0 - Owner: https://github.com/akretion
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@777b6a68db9043a2bde7181ec28d1db85eaf8e3d -
Trigger Event:
push
-
Statement type: