List files from Odoo addon dependencies using manifestoo.
Project description
Akaidoo
Navigate the Odoo & OCA Maze: Instantly Gather Relevant Modules Files.
Akaidoo extends the manifestoo CLI to list and copy all relevant source files (Python models, XML views, wizards, reports, and even OpenUpgrade migration scripts) from a specific Odoo addon and its entire dependency tree. It's designed to streamline your development workflow by quickly providing the focused context you need; for AI LLMs for instance.
Akaidoo bridges this gap by helping you:
- 🔍 Focus Your View: Instantly see only the files relevant to your current task.
- 🤖 Boost AI Tools: Feed precisely the right context to AI assistants like GitHub Copilot, Cursor, or Neovim's Avante for more accurate suggestions, especially powerful when including OpenUpgrade scripts for migration tasks.
- 📝 Streamline Editing: Open all pertinent files in your editor with a single command.
- 🧩 Understand Scope: Quickly grasp the breadth of an addon's interactions.
- 🛠️ Target Analysis: Perform searches
(
akaidoo sale_stock -c ~/DEV/odoo16/odoo.cfg | xargs grep "def _compute_price_unit") or static analysis on a well-defined subset of code. - 🚀 Accelerate Migrations: Gather module code, dependencies, and their corresponding OpenUpgrade migration scripts in one go.
Key Features
- Deep Dependency Traversal: Leverages
manifestooto accurately resolve all direct and transitive dependencies. - Intelligent File Collection: Gathers
.py(models, root files) and.xml(views, wizards, reports) from the identified addons. - OpenUpgrade Script Integration: Optionally include all migration scripts from a
specified OpenUpgrade repository for the target addon and its dependencies
(
-u, --openupgrade). - Flexible Addon Discovery:
- Use Odoo configuration files (
-c, --odoo-cfg). - Specify addon paths directly (
--addons-path). - Auto-detect from an importable
odoopackage.
- Use Odoo configuration files (
- Granular Filtering:
- Include/exclude specific file types (models, views, wizards, reports).
- Focus only on models or views.
- Exclude Odoo core addons (
--exclude-core) or common framework addons (--exclude-framework). - Intelligently skip trivial
__init__.pyfiles.
- Versatile Output Modes:
- List Paths: Print file paths to
stdout(default). - To Clipboard: Copy the content of all found files to your clipboard
(
-x, --clipboard), each prefixed with its relative path – perfect for AI prompts! - To File: Dump all file contents into a single output file (
-o, --output-file). - To Editor: Directly open all found files in your preferred editor
(
-e, --edit).
- List Paths: Print file paths to
Installation
The recommended way to install Akaidoo is using pipx (to install it in an isolated environment):
pipx install akaidoo
Alternatively, using pip:
pip install --user akaidoo
For clipboard functionality (-x): Akaidoo uses pyperclip. You might need to install
it and its dependencies:
pip install pyperclip
# On Linux, you may also need:
# sudo apt-get install xclip # or xsel
Quick Start
Imagine you're working on the sale_timesheet addon in an Odoo project.
- Get all relevant file paths for
sale_timesheetand its dependencies: (Using your project's Odoo configuration file)
akaidoo sale_timesheet -c ~/path/to/your/odoo.conf
- Copy all Python model code for
sale_timesheet(and its deps) to your clipboard for an AI prompt:
akaidoo sale_timesheet -c odoo.conf --only-models -x
*(Each file's content in the clipboard will be prefixed with `# FILEPATH: path/to/file.py`)*
- Open all Python and XML view files for
projectand its direct dependencies (excluding core) in Neovim (use --editor-cmd or EDITOR env var to specify a different editor):
akaidoo project -c odoo.conf --exclude-core --no-include-wizards --no-include-reports -e
*(This uses the `nvim -p` command to open files in tabs. It's especially handy when using AI plugins like Avante.)*
- Get only the files from the
mrpaddon itself, ignoring its dependencies, and save their content to a file (useful if you outgrow the clipboard size):
akaidoo mrp -c odoo.conf --only-target-addon -o mrp_context.txt
- Gather
sale_stockfiles, its dependencies, AND its OpenUpgrade migration scripts: (Assuming your OpenUpgrade clone is at~/OpenUpgrade)
akaidoo sale_stock -c odoo.conf -u ~/OpenUpgrade -o sale_stock_migration_context.txt
This will collect all standard module files for `sale_stock` and its dependencies, plus all files from `~/OpenUpgrade/openupgrade_scripts/scripts/sale_stock/`, `~/OpenUpgrade/openupgrade_scripts/scripts/ADDON_DEPENDENCY_1/`, etc., into `sale_stock_migration_context.txt`. This is powerful for feeding comprehensive context to an AI for migration tasks.
- Gather the files from any source directory:
akaidoo some_directory
If some_directory is not an Odoo addon, then for convenience, akaidoo will select all the files from some_directory (recursively) and copy their content to the clipboard (-x) or to a file (-o) according to the options. It will skip hidden files and __pycache__.
Exploring All Options: For a full list of options:
akaidoo --help
Contributing
Contributions, bug reports, and feature requests are very welcome! Please feel free to open an issue or submit a pull request on the GitHub repository.
License
Akaidoo is licensed under the MIT License.
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.0.0.tar.gz.
File metadata
- Download URL: akaidoo-1.0.0.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c044de080d349d1aa38305dfb94e6ab44062ee53833237c9909f7809860c9aa
|
|
| MD5 |
08cd0d61271fd6cf02e846216b788280
|
|
| BLAKE2b-256 |
12aba230ed78e0c02935abdd1186dcab3653d118855bb83136e2753b2e995dd5
|
Provenance
The following attestation bundles were made for akaidoo-1.0.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.0.0.tar.gz -
Subject digest:
3c044de080d349d1aa38305dfb94e6ab44062ee53833237c9909f7809860c9aa - Sigstore transparency entry: 227017041
- Sigstore integration time:
-
Permalink:
akretion/akaidoo@ce7f68b78fee9198d7fb9a135a0cf35db98e1285 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/akretion
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ce7f68b78fee9198d7fb9a135a0cf35db98e1285 -
Trigger Event:
push
-
Statement type:
File details
Details for the file akaidoo-1.0.0-py3-none-any.whl.
File metadata
- Download URL: akaidoo-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2b4c2c24184751f8f64c03e67bb30906bc679ddfbd35639593deb30879e33fd
|
|
| MD5 |
14c09e3bdf2120afe36ca8cbbdda97ea
|
|
| BLAKE2b-256 |
b32cf621fbad527e1012120b343971d67154f748325a337ed40406eabfac469c
|
Provenance
The following attestation bundles were made for akaidoo-1.0.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.0.0-py3-none-any.whl -
Subject digest:
f2b4c2c24184751f8f64c03e67bb30906bc679ddfbd35639593deb30879e33fd - Sigstore transparency entry: 227017043
- Sigstore integration time:
-
Permalink:
akretion/akaidoo@ce7f68b78fee9198d7fb9a135a0cf35db98e1285 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/akretion
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ce7f68b78fee9198d7fb9a135a0cf35db98e1285 -
Trigger Event:
push
-
Statement type: