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.
Quick Start
- Simple Usage
bash praisonai-ts prompt-expand "write a story" - With Configuration
bash praisonai-ts prompt-expand "Write code" --strategy detail --json
Basic Usage
# Expand a prompt (default strategy: auto)
praisonai-ts prompt-expand "write a story"
# Get JSON output
praisonai-ts prompt-expand "create an app" --jsonExample Output:
{
"success": true,
"data": {
"originalPrompt": "write a story",
"expandedPrompt": "Write a compelling narrative with...",
"strategy": "detail",
"additions": ["genre", "length", "characters", "plot"]
}
}Expansion Strategies
# 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 autoAvailable 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.