@kleosr/pe2-cli
Version:
Transform your prompts into optimized PE² format for better AI responses. Works with OpenAI, Anthropic, Google, OpenRouter, and Ollama.
61 lines (42 loc) • 1.27 kB
Markdown
# PE²-CLI
Transform your prompts into optimized PE² format for better AI responses.
## What it does
PE²-CLI takes your raw prompts and structures them into five clear sections:
- **Context** — what's the situation
- **Role** — who should the AI be
- **Task** — what needs to be done
- **Constraints** — any rules or limits
- **Output** — how to format the response
This structured approach typically improves AI response quality by 20-50%.
## Quick start
```bash
npx @kleosr/pe2-cli
```
That's it! The tool will guide you through setup on first run.
## Usage
### Interactive mode (easiest)
```bash
pe2-cli
```
Then just type your prompt and hit Enter.
### Command line
```bash
pe2-cli "Create a Python function for fibonacci numbers"
pe2-cli my-prompt.txt
pe2-cli "Your prompt" --model gpt-4o --iterations 3
```
## AI Providers
Works with all major AI providers:
- **OpenAI** (GPT-4, GPT-3.5)
- **Anthropic** (Claude)
- **Google** (Gemini)
- **OpenRouter** (access to 100+ models)
- **Ollama** (local models)
## Configuration
Run `pe2-cli --config` to set up your API keys and preferred models.
Settings are saved to `~/.kleosr-pe2/config.json`
## Requirements
- Node.js 18 or later
- API key for your chosen provider
## License
MIT