# extract_command_types

> **Function** in `deepagents_acp`

📖 [View in docs](https://reference.langchain.com/python/deepagents-acp/utils/extract_command_types)

Extract all command types from a shell command, handling && separators.

For security-sensitive commands (python, node, npm, uv, etc.), includes the full
signature to avoid over-permissioning. Each sensitive command has a dedicated handler
that extracts the appropriate signature.

Signature extraction strategy:
- python/python3: Include module name for -m, just flag for -c
- node: Just flag for -e/-p (code execution)
- npm/yarn/pnpm: Include subcommand, and script name for "run"
- uv: Include subcommand, and tool name for "run"
- npx: Include package name
- Others: Just the base command

## Signature

```python
extract_command_types(
    command: str,
) -> list[str]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `command` | `str` | Yes | The full shell command string |

## Returns

`list[str]`

List of command signatures (base command + subcommand/module for sensitive commands)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/bb27e62ebe44dd6e8104a504b1718ce87acc7ffa/libs/acp/deepagents_acp/utils.py#L152)