AI-powered Odoo addon quality analyzer
Project description
AI-powered quality analysis tool for Odoo addons.
Overview
Qualidoo CLI is a command-line tool for analyzing Odoo addon quality. It uploads your addon to https://qualidoo.com for analysis and displays results directly in your terminal.
Features:
- Analyze addons from any directory
- Scan GitHub repositories for Odoo addons (requires GitHub connection via web UI)
- View results with detailed findings and recommendations
- Save analysis results as JSON for CI/CD integration
- Progress feedback during analysis
- Team tier support: Attribute scans to organizations and teams
Installation
pip install qualidoo
Quick Start
# 1. Configure your API key (get it from https://qualidoo.com/settings)
qualidoo login
# 2. Analyze an addon
cd /path/to/my_addon
qualidoo check
# Or specify a path
qualidoo check /path/to/my_addon
Authentication
The CLI requires an API key from your Qualidoo account. API access is available on PRO, TEAM, and BETA tiers.
Getting an API Key
- Visit https://qualidoo.com/settings
- Generate a new API key (format:
qdoo_xxxxxxxxxxxx) - Run
qualidoo loginand enter your key
Configuring the API Key
Option 1: Interactive login (recommended)
qualidoo login
You'll be prompted to enter your API key securely.
Option 2: Command-line flag
qualidoo login --key qdoo_your_api_key_here
Option 3: Environment variable
export QUALIDOO_API_KEY=qdoo_your_api_key_here
qualidoo check
The environment variable takes precedence over the stored configuration.
Commands
qualidoo login
Configure API key for authentication.
qualidoo login # Interactive prompt
qualidoo login --key qdoo_xxx # Provide key directly
qualidoo login -k qdoo_xxx # Short form
The API key is validated against the server before saving.
qualidoo logout
Remove stored API key.
qualidoo logout
qualidoo whoami
Show current authentication status and user information.
qualidoo whoami
Displays your email, current tier, and API usage information.
qualidoo check
Analyze an Odoo addon for quality issues.
qualidoo check [PATH] [OPTIONS]
Arguments:
| Argument | Description |
|---|---|
PATH |
Path to the Odoo addon directory (defaults to current directory) |
Options:
| Option | Short | Description |
|---|---|---|
--verbose |
-v |
Show detailed findings with file paths and suggestions |
--save FILE |
-s |
Save full JSON result to file |
--timeout SECONDS |
-t |
Maximum time to wait for analysis (default: 300) |
--org TEXT |
-o |
Organization name/ID to attribute scan to (Team tier) |
--team TEXT |
Team name/ID within the organization (Team tier) |
Examples:
# Analyze current directory
qualidoo check
# Analyze specific addon
qualidoo check /path/to/sale_extension
# Show detailed output
qualidoo check --verbose
# Save results for CI/CD
qualidoo check --save result.json
# Attribute scan to a team (Team tier)
qualidoo check --org AidooIT --team "Backend Team"
# Combine options
qualidoo check /path/to/addon -v -s analysis.json -t 600
Output:
The check command displays:
- Overall score (0-100) and grade
- Summary of findings by severity (CRITICAL, MAJOR, MINOR, INFO)
- Per-agent scores
- Top recommendations
With --verbose, it also shows:
- Each finding with file path and line number
- Detailed descriptions
- Improvement suggestions
qualidoo config
View current configuration.
qualidoo config
qualidoo config --show # Explicit show flag
qualidoo config -s # Short form
Displays the configuration file path and current settings (API key is masked).
qualidoo integrations
Show connected integrations (GitHub, etc.).
qualidoo integrations
Displays the status of your connected integrations. GitHub must be connected via the web UI at https://qualidoo.com/settings Integrations tab before using qualidoo repo commands.
qualidoo repo check
Analyze Odoo addons directly from a GitHub repository.
qualidoo repo check <REPO> [OPTIONS]
Arguments:
| Argument | Description |
|---|---|
REPO |
GitHub repository (owner/repo format or full URL) |
Options:
| Option | Short | Description |
|---|---|---|
--branch TEXT |
-b |
Branch to analyze (defaults to repository default) |
--addon TEXT |
-a |
Analyze only this specific addon |
--verbose |
-v |
Show detailed output |
--save FILE |
-s |
Save results to JSON file |
--timeout SECONDS |
-t |
Maximum time to wait for analysis (default: 600) |
--org TEXT |
-o |
Organization name/ID to attribute scans to (Team tier) |
--team TEXT |
Team name/ID within the organization (Team tier) |
Examples:
# Analyze all addons in a repository
qualidoo repo check oca/account-financial-tools
# Analyze a specific branch
qualidoo repo check oca/account-financial-tools --branch 16.0
# Analyze using full GitHub URL
qualidoo repo check https://github.com/owner/repo
# Analyze a single addon
qualidoo repo check owner/repo --addon account_invoice_validation
# Save results for CI/CD
qualidoo repo check owner/repo --save results.json
# Attribute scans to a team (Team tier)
qualidoo repo check owner/repo --team "Backend Team"
# Combine options
qualidoo repo check oca/account-financial-tools -b 16.0 -v -s analysis.json
Prerequisites:
Before using qualidoo repo check, you must connect your GitHub account:
- Visit https://qualidoo.com/settings
IntegrationsTab - Click "Connect GitHub"
- Authorize Qualidoo to access your repositories
- Verify connection with
qualidoo integrations
Output:
The command displays:
- Discovery progress (finding addons in the repository)
- Analysis progress with a progress bar
- Results table showing each addon's score, grade, and issue counts
- Summary statistics (average score, score range)
Supported Repository Formats:
| Format | Example |
|---|---|
| owner/repo | oca/account-financial-tools |
| HTTPS URL | https://github.com/oca/account-financial-tools |
| HTTPS with .git | https://github.com/oca/account-financial-tools.git |
| SSH URL | git@github.com:oca/account-financial-tools.git |
Team Tier Commands
These commands are available for users with Team tier subscriptions. They allow you to manage organization/team context and view team-specific analytics.
qualidoo org list
List all organizations you're a member of, with their teams.
qualidoo org list
Output:
Organizations:
AidooIT (org_abc123)
|-- Backend Team (team_def456) <- current
|-- Frontend Team (team_ghi789)
`-- DevOps (team_jkl012)
ClientCorp (org_mno345)
`-- Odoo Modules (team_pqr678)
qualidoo org use
Set the default organization and team for scans.
qualidoo org use <ORG> [OPTIONS]
Options:
| Option | Short | Description |
|---|---|---|
--team TEXT |
-t |
Team name or ID within the organization |
Examples:
# Set default organization (no team)
qualidoo org use AidooIT
# Set organization and team
qualidoo org use AidooIT --team "Backend Team"
qualidoo org use AidooIT -t "Backend Team"
Once set, all scans will be attributed to this context until you change or clear it.
qualidoo org current
Show the current organization/team context.
qualidoo org current
qualidoo org clear
Clear the organization/team context. After clearing, scans will go to your personal history.
qualidoo org clear
Configuration
Config File Location
Configuration is stored in:
~/.qualidoo/config.toml
The file is created with secure permissions (readable only by owner).
Configuration Format
api_key = "qdoo_your_api_key_here"
Environment Variables
| Variable | Description |
|---|---|
QUALIDOO_API_KEY |
API key (overrides config file) |
QUALIDOO_API_URL |
API URL (default: https://qualidoo.com) |
CI/CD Integration
Use the CLI in your CI/CD pipeline to enforce quality standards:
# GitHub Actions example
- name: Install Qualidoo CLI
run: pip install qualidoo
- name: Analyze addon
env:
QUALIDOO_API_KEY: ${{ secrets.QUALIDOO_API_KEY }}
run: |
qualidoo check ./my_addon --save result.json
# Parse result.json and fail if score < threshold
Error Handling
Common Errors
| Error | Cause | Solution |
|---|---|---|
| "Not logged in" | No API key configured | Run qualidoo login |
| "Invalid API key" | Key is incorrect or expired | Get a new key from settings page |
| "Authentication failed" | API key no longer valid | Run qualidoo login to reconfigure |
| "Rate limit exceeded" | Too many API requests | Wait and try again later |
| "Not a valid Odoo addon" | Missing __manifest__.py |
Ensure path points to valid addon |
| "Analysis timed out" | Server processing took too long | Increase --timeout or try again |
| "GitHub not connected" | No GitHub integration | Connect at https://qualidoo.com/settings Integrations tab |
| "Repository not found" | Invalid repo or no access | Check repo name and GitHub permissions |
| "No Odoo addons found" | Repo has no __manifest__.py files |
Ensure repo contains Odoo addons |
| "Addon not found in repository" | Specified addon doesn't exist | Check addon name with --verbose |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error (authentication, API, or validation failure) |
Requirements
- Python 3.10+
- PRO, TEAM, or BETA tier for API access (FREE tier has no API access)
Development
Setting Up the Development Environment
Clone the repository and install with development dependencies:
git clone https://github.com/aidooit/qualidoo.git
cd qualidoo-cli
pip install -e ".[dev]"
Running Tests
The test suite uses pytest with respx for HTTP mocking. To run all tests:
# Run all tests with verbose output
pytest -v
# Run tests for a specific module
pytest tests/test_config.py -v
pytest tests/test_api_client.py -v
pytest tests/test_output.py -v
pytest tests/test_cli.py -v
# Run a specific test class
pytest tests/test_cli.py::TestCheckCommand -v
# Run a specific test
pytest tests/test_config.py::TestValidateApiKeyFormat::test_valid_key -v
# Run tests with coverage (requires pytest-cov)
pytest --cov=qualidoo --cov-report=term-missing
Test Structure
tests/
├── __init__.py
├── conftest.py # Shared fixtures (mock data, temp directories)
├── test_config.py # Configuration module tests (~22 tests)
├── test_api_client.py # API client tests (~34 tests)
├── test_output.py # Output formatting tests (~25 tests)
├── test_cli.py # CLI command tests (~21 tests)
├── test_github.py # GitHub URL parsing tests (~14 tests)
└── test_org_commands.py # Organization commands tests
Test Coverage
The test suite covers:
- Configuration (
test_config.py): API key validation, config file operations, environment variable handling - API Client (
test_api_client.py): HTTP requests, error handling, file uploads, job polling, GitHub repo scanning - Output (
test_output.py): Grade calculations, terminal formatting, progress callbacks - CLI (
test_cli.py): All commands (login, logout, whoami, check, config) with various scenarios - GitHub (
test_github.py): Repository URL parsing for various formats
Dev Dependencies
| Package | Purpose |
|---|---|
pytest>=8.0.0 |
Test framework |
respx>=0.21.0 |
HTTP mocking for httpx |
License
MIT License
Project details
Release history Release notifications | RSS feed
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 qualidoo-0.5.1.tar.gz.
File metadata
- Download URL: qualidoo-0.5.1.tar.gz
- Upload date:
- Size: 274.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5501a2a080efe744b5342bfa95072f59da0ea03ac973236a2795e34b12b07e10
|
|
| MD5 |
38c827c1633e1952599b363157c7c010
|
|
| BLAKE2b-256 |
61b9be8912c3be4e301ccb7086225a50d48b56d5dcce22e5c67b3dc71d16dfca
|
Provenance
The following attestation bundles were made for qualidoo-0.5.1.tar.gz:
Publisher:
python-publish.yml on aidooit/qualidoo-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qualidoo-0.5.1.tar.gz -
Subject digest:
5501a2a080efe744b5342bfa95072f59da0ea03ac973236a2795e34b12b07e10 - Sigstore transparency entry: 1194132985
- Sigstore integration time:
-
Permalink:
aidooit/qualidoo-cli@d4da7ca3df7429c1ba9c6c008b5ecb2cb63c0d2b -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/aidooit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d4da7ca3df7429c1ba9c6c008b5ecb2cb63c0d2b -
Trigger Event:
release
-
Statement type:
File details
Details for the file qualidoo-0.5.1-py3-none-any.whl.
File metadata
- Download URL: qualidoo-0.5.1-py3-none-any.whl
- Upload date:
- Size: 27.0 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 |
e63c64dcddb114e41996a76fb7ad95ad19c00d10c896d49784b6de84917ef528
|
|
| MD5 |
3ca01077155d09ce0a8e3c78d67466ae
|
|
| BLAKE2b-256 |
2ae14cec025ad16d38fe4a3c1308ef5575ad0994d47ca312dd812f90ed1fd834
|
Provenance
The following attestation bundles were made for qualidoo-0.5.1-py3-none-any.whl:
Publisher:
python-publish.yml on aidooit/qualidoo-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qualidoo-0.5.1-py3-none-any.whl -
Subject digest:
e63c64dcddb114e41996a76fb7ad95ad19c00d10c896d49784b6de84917ef528 - Sigstore transparency entry: 1194132987
- Sigstore integration time:
-
Permalink:
aidooit/qualidoo-cli@d4da7ca3df7429c1ba9c6c008b5ecb2cb63c0d2b -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/aidooit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d4da7ca3df7429c1ba9c6c008b5ecb2cb63c0d2b -
Trigger Event:
release
-
Statement type: