@kleosr/pe2-cli
v4.0.1
Published
🚀 KleoSr PE2-CLI: Convert raw prompts to PE2-optimized prompts using adaptive intelligence
Maintainers
Readme
PE2-CLI
Command-line tool that takes a rough prompt (text or file), calls a configured LLM, and returns a structured PE2-style prompt. Release line is 4.0.0 (npm semver); the CLI labels the generation as Code V4 in the banner.
Requirements
- Node.js 18.17 or newer
You need an API key (or base URL for Ollama) for whichever provider you pick. The tool does not ship bundled models.
Install
npm install -g @kleosr/pe2-cliOr run without a global install:
npx @kleosr/pe2-cli --helpUsage
No arguments starts interactive mode (and will ask for config on first run if nothing is saved):
npx @kleosr/pe2-cliOther entry points:
npx @kleosr/pe2-cli --config
npx @kleosr/pe2-cli "Your prompt as plain text"
npx @kleosr/pe2-cli path/to/prompt.txt
npx @kleosr/pe2-cli "Some text" --iterations 3
npx @kleosr/pe2-cli "Some text" --provider ollama --model llama3
npx @kleosr/pe2-cli "Some text" --auto-difficultyFor the full flag list, use:
npx @kleosr/pe2-cli --helpConfiguration
Settings are stored in ~/.kleosr-pe2/config.json (Unix) or the equivalent under your user profile on Windows. Run --config to change provider, model, and API key.
Supported providers in code: openai, anthropic, google, openrouter, ollama. Default in the project constants targets OpenRouter with a small model id; you can override per run with --provider and --model.
Output
Unless you pass --output-file, session output can be written under pe2-prompts/ in the current working directory (see src/paths.js and src/engine.js).
Development
git clone https://github.com/kleosr/PE2-CLI.git
cd PE2-CLI
npm ci
npm test
npm startTests use Node’s built-in runner: node --test ./tests/*.test.js.
Package
- npm: @kleosr/pe2-cli
- Source: github.com/kleosr/PE2-CLI
License
ISC (see package.json).
