Metadata-Version: 2.4
Name: drupal-scout
Version: 3.0.1
Summary: Scout out for transitive versions of Drupal modules for the upgrade of the core.
Author-email: "Andrew [R-Tech] Tsyhaniuk" <in0mad91@gmail.com>
License: MIT License
        
        Copyright (c) 2023 Andrew Tsyhaniuk
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/rtech91/drupal-scout
Project-URL: Bug Tracker, https://github.com/rtech91/drupal-scout/issues
Keywords: drupal,scout,upgrade,core,transitive,dependencies
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: jq
Requires-Dist: argparse
Requires-Dist: aiohttp
Requires-Dist: packaging
Requires-Dist: fastmcp
Requires-Dist: rich>=15.0.0
Provides-Extra: dev
Requires-Dist: nose; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: pipdeptree; extra == "dev"
Requires-Dist: pip-autoremove; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Requires-Dist: aioresponses; extra == "dev"
Dynamic: license-file

# Drupal Scout

Search for Drupal module entries with transitive core version requirements to help to upgrade the Drupal Core.

## Installation

### Using uv (Recommended)

```bash
uv tool install drupal-scout
```

Or run directly without installing:

```bash
uvx drupal-scout --help
```

### Using pip

```bash
pip install drupal-scout
```

## Quick Start

Get a compatibility report for your current Drupal project:

```bash
drupal-scout
```

Scan a specific module for Drupal 11 compatibility:

```bash
drupal-scout --core 11.0.0 --modules drupal/webform
```

## Features

- **Asyncio Concurrency**: High-performance parallel module scanning using `asyncio` to speed up dependency analysis.
- **Rich TUI Integration**: Beautiful terminal output with structured tables and real-time progress bars powered by the `rich` library.
- **MCP Server Support**: Built-in [Model Context Protocol](https://modelcontextprotocol.io/) server for integration with AI IDEs (like Claude Desktop or Cursor).
- **Environment Diagnostics**: Quick self-diagnostic check of the environment and dependencies using the `info` command.
- **Multiple Output Formats**:
  - `table`: High-fidelity color-coded table for human readability.
  - `json`: Machine-readable raw data for automation scripts.
  - `suggest`: Generates a suggested `composer.json` with updated version requirements.

## Limitations

- **Python 3.11+**: The application requires Python 3.11 or higher.
- **Composer v2**: The application works with **Composer-based (Composer v2)** Drupal 8+ projects.

## Usage/Examples

```bash
drupal-scout [-h] [-v] [-d DIRECTORY] [-n] [-l LIMIT] [-f {table,json,suggest}] [-s] [-c CORE] [-m MODULES [MODULES ...]] {info} ...
```

### Arguments

- `-h, --help`: Show help message and exit.
- `-v, --version`: Show program's version number and exit.
- `-d DIRECTORY, --directory DIRECTORY`: Directory of the Drupal installation (default: `.`).
- `-n, --no-lock`: Do not use the `composer.lock` file to determine installed versions.
- `-l LIMIT, --limit LIMIT`: Concurrency limit for async requests. Default is `10`.
- `-f {table,json,suggest}, --format {table,json,suggest}`: Output format (default: `table`).
- `-s, --save-dump`: Use with `--format suggest` to save the suggested `composer.json` to disk.
- `-c CORE, --core CORE`: Optional Drupal core version override (e.g., `10.0.0`).
- `-m MODULES [MODULES ...], --modules MODULES [MODULES ...]`: Scan only specific modules, skipping full project discovery.

### Subcommands

- `info`: Show diagnostic information about the tool, `jq` availability, and the current Drupal environment.

### MCP Server Usage

To use Drupal Scout as an MCP server in your AI assistant:

```bash
drupal-scout-mcp
```

Or with `uvx`:

```bash
uvx --from drupal-scout drupal-scout-mcp
```

### Targeted Scan Examples

Scan one specific module with an explicit core version:

```bash
drupal-scout --core 10.0.0 --modules drupal/webform
```

Scan multiple modules and output JSON:

```bash
drupal-scout --core 10.0.0 --modules drupal/webform drupal/ctools --format json
```

Scan modules with auto-detected core from a local directory:

```bash
drupal-scout --directory /path/to/drupal --modules drupal/webform
```
