> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Prompt Expander CLI

> CLI commands for prompt expansion in PraisonAI TypeScript

The `praisonai-ts` CLI provides the `prompt-expand` command for enhancing prompts with more detail.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    User([User]) --> CLI[CLI]
    CLI --> Exp[Expander]

    classDef agent fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef tool fill:#189AB4,stroke:#7C90A0,color:#fff

    class Exp agent
    class User,CLI tool
    classDef agent fill:#8B0000,color:#fff
    classDef tool fill:#189AB4,color:#fff
```

## Quick Start

<Steps>
  <Step title="Simple Usage">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai-ts prompt-expand "write a story"
    ```
  </Step>

  <Step title="With Configuration">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai-ts prompt-expand "Write code" --strategy detail --json
    ```
  </Step>
</Steps>

## Basic Usage

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Expand a prompt (default strategy: auto)
praisonai-ts prompt-expand "write a story"

# Get JSON output
praisonai-ts prompt-expand "create an app" --json
```

**Example Output:**

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "success": true,
  "data": {
    "originalPrompt": "write a story",
    "expandedPrompt": "Write a compelling narrative with...",
    "strategy": "detail",
    "additions": ["genre", "length", "characters", "plot"]
  }
}
```

## Expansion Strategies

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Detail strategy - add specific details
praisonai-ts prompt-expand "Write code" --strategy detail

# Context strategy - add background context
praisonai-ts prompt-expand "Explain this" --strategy context

# Examples strategy - add example outputs
praisonai-ts prompt-expand "Show me" --strategy examples

# Constraints strategy - add requirements
praisonai-ts prompt-expand "Build a website" --strategy constraints

# Auto strategy (default) - automatically detect best approach
praisonai-ts prompt-expand "Create function" --strategy auto
```

## Available Strategies

| Strategy      | Description                            |
| ------------- | -------------------------------------- |
| `detail`      | Add specific details and requirements  |
| `context`     | Add background context and information |
| `examples`    | Add example outputs or formats         |
| `constraints` | Add constraints and requirements       |
| `auto`        | Automatically detect the best strategy |

## SDK Usage

For programmatic usage, see the [Prompt Expander SDK documentation](/docs/js/prompt-expander).

## Related

<CardGroup cols={2}>
  <Card title="Prompt Expander SDK" icon="text-height" href="/docs/js/prompt-expander">
    Programmatic expansion
  </Card>

  <Card title="Agent" icon="robot" href="/docs/js/agent">
    Agent configuration
  </Card>
</CardGroup>
