npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

promptrix-cli

v0.1.24

Published

Professional prompt engineering CLI from The Prompt Engineering Platform. Optimize AI prompts with advanced tools and analytics.

Readme

Promptrix CLI

🚀 AI-powered prompt optimization from your terminal

npm version License

Promptrix CLI brings the power of AI prompt optimization directly to your development workflow. Optimize prompts for ChatGPT, Claude, Gemini, and more with a simple command.

🎯 Features

  • Instant Optimization: Transform any prompt into a more effective version
  • Advanced Methods: 21+ optimization methods with category and complexity filtering
  • Multi-Model Support: Optimize for specific AI models (GPT-4, Claude, Gemini, etc.)
  • Multiple Styles: Choose from concise, detailed, creative, or technical outputs
  • Pipe Support: Integrate seamlessly with Unix tools and scripts
  • Free Tier: 100 optimizations per month at no cost
  • Developer-Friendly: JSON output, quiet mode, and scriptable interface

📦 Installation

npm install -g promptrix-cli

Or use directly with npx:

npx promptrix-cli "Your prompt here"

🔑 Authentication

Get your free API key (100 optimizations/month):

  1. Visit https://promptrix.co/developers
  2. Sign up for a free account
  3. Copy your API key
  4. Configure the CLI:
promptrix config --key your-api-key-here

Alternatively, set via environment variable:

export PROMPTRIX_API_KEY=your-api-key-here

📖 Usage

Basic Optimization

promptrix "Explain quantum computing"

Target Specific Models

# Optimize for GPT-4
promptrix "Write a Python function" --target gpt-4

# Optimize for Claude
promptrix "Analyze this text" --target claude-3

# Optimize for Gemini
promptrix "Create a story" --target gemini

Style Options

# Concise output
promptrix "Summarize machine learning" --style concise

# Detailed explanation
promptrix "Explain Docker" --style detailed

# Creative writing
promptrix "Write a story opening" --style creative

# Technical documentation
promptrix "Document this API" --style technical

Pipe from Files or Commands

# From file
cat prompt.txt | promptrix

# From another command
echo "Explain this concept" | promptrix

# Chain with other tools
promptrix "Generate SQL query" | mysql database

JSON Output

promptrix "Your prompt" --format json

Output:

{
  "improvedPrompt": "...",
  "improvements": ["..."],
  "confidence": 0.95
}

Check Usage

promptrix usage

Output:

📊 Promptrix Usage Stats
━━━━━━━━━━━━━━━━━━━━━━
  Used: 42 / 100 (42%)
  Remaining: 58
  Resets: 01/01/2024

Optimization Methods

List available optimization methods:

promptrix methods

Output with enhanced metadata:

🔧 Available Optimization Methods
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Your tier: PRO
Available: 21 methods
Locked: 0 methods

✅ Available Methods:
  🧠 Chain of Thought
    Adds systematic reasoning steps to prompts
    ⭐ Basic • 🧠 Reasoning & Analysis • ⏱️  5-15s
    Tier: FREE
    Use: promptrix "prompt" --method CHAIN_OF_THOUGHT

  ✅ Chain-of-Verification
    Reduces hallucinations by adding fact-checking
    ⭐⭐ Intermediate • 🔍 Verification & Quality • ⏱️  15-30s
    Tier: PRO
    Use: promptrix "prompt" --method CHAIN_OF_VERIFICATION

💡 Tip: Filter methods with --category or --complexity flags

Filter Methods by Category

# Show only verification methods
promptrix methods --category verification

# Show only reasoning methods
promptrix methods --category reasoning

# Available categories:
# - verification: Reduce hallucinations, improve accuracy
# - reasoning: Systematic thinking, multi-perspective analysis
# - structure: Organize output, format responses
# - learning: Learn from examples, improve patterns
# - planning: Break down complex tasks, strategize

Filter Methods by Complexity

# Show only basic methods (fast, simple)
promptrix methods --complexity basic

# Show only advanced methods (complex, thorough)
promptrix methods --complexity advanced

# Complexity levels:
# - basic: ⭐ Quick optimization (5-15s)
# - intermediate: ⭐⭐ Balanced approach (15-30s)
# - advanced: ⭐⭐⭐ Deep optimization (25-45s)

Combine Filters

# Find advanced reasoning methods
promptrix methods --category reasoning --complexity advanced

# Find basic verification methods
promptrix methods --category verification --complexity basic

Use Advanced Methods

# Apply specific optimization method
promptrix "Explain blockchain" --method CHAIN_OF_VERIFICATION

# Use expert panel method for multiple perspectives
promptrix "Design a system" --method EXPERT_PANEL_SIMULATOR

🛠️ Advanced Usage

Configuration File

The CLI stores configuration in ~/.promptrix/config.json:

{
  "apiKey": "your-key",
  "defaultStyle": "concise",
  "defaultTargetModel": "gpt-4",
  "analytics": true
}

Scripting Example

#!/bin/bash
# optimize_prompts.sh

for file in prompts/*.txt; do
  optimized=$(cat "$file" | promptrix --quiet)
  echo "$optimized" > "optimized/$(basename "$file")"
done

CI/CD Integration

# GitHub Actions Example
- name: Optimize prompts
  run: |
    npm install -g @promptrix/cli
    echo "${{ secrets.PROMPTRIX_API_KEY }}" | promptrix config --key -
    promptrix "Deploy message" > deploy_message.txt

🎨 Command Reference

| Command | Description | |---------|-------------| | promptrix [prompt] | Optimize a prompt | | promptrix methods | List optimization methods | | promptrix methods --category <cat> | Filter methods by category | | promptrix methods --complexity <level> | Filter methods by complexity | | promptrix methods show <name> | Show method details | | promptrix --help | Show help message | | promptrix --version | Show version | | promptrix config --key <key> | Set API key | | promptrix usage | Check usage stats |

Options

| Option | Description | Example | |--------|-------------|---------| | --method <name> | Use specific optimization method | --method CHAIN_OF_VERIFICATION | | --target <model> | Target AI model | --target gpt-4 | | --style <style> | Output style | --style concise | | --level <level> | Complexity level | --level expert | | --format <format> | Output format | --format json | | --lang <language> | Output language | --lang es | | --quiet | Suppress decorative output | --quiet | | --no-analytics | Disable anonymous telemetry | --no-analytics |

Method Filter Options (for promptrix methods command)

| Option | Description | Values | |--------|-------------|--------| | --category <cat> | Filter by category | verification, reasoning, structure, learning, planning | | --complexity <level> | Filter by complexity | basic, intermediate, advanced |

💡 Examples

Development Workflows

# Optimize code documentation
promptrix "Document this function: $(cat function.js)"

# Generate commit messages with verification method
git diff | promptrix "Write commit message for these changes" --method CHAIN_OF_VERIFICATION

# Create test cases with expert panel method
promptrix "Generate test cases for login function" --method EXPERT_PANEL_SIMULATOR

# Find methods suitable for code tasks
promptrix methods --category structure --complexity basic

Content Creation

# Blog post outline
promptrix "Create blog outline about AI trends" --style detailed

# Social media posts
promptrix "Tweet about product launch" --style creative --target gpt-4

# Email templates
promptrix "Customer support email for refund request" --style professional

Data & Analysis

# SQL queries
promptrix "Query to find top customers by revenue" --style technical

# Data analysis
cat data.csv | head -10 | promptrix "Analyze this data pattern"

# RegEx patterns
promptrix "Regex to match email addresses" --format json

🚀 Pro Tips

  1. Save commonly used prompts: Create aliases for frequent optimizations

    alias commit-msg='git diff | promptrix "Write commit message"'
  2. Batch processing: Process multiple files efficiently

    find . -name "*.prompt" -exec promptrix {} \;
  3. Integration with AI tools: Pipe optimized prompts directly to AI CLIs

    promptrix "Your prompt" | gpt-cli
  4. Version control prompts: Track prompt evolution in git

    promptrix "Initial prompt" > prompts/v1.txt
    git add prompts/v1.txt

📈 Pricing

  • Free: 10 optimizations/month
  • Pro ($20/month): 1,000 optimizations/month
  • Business ($99/month): 10,000 optimizations/month

Upgrade at https://promptrix.co/pricing

🔗 Links

📝 License

Copyright © 2024 Promptrix Inc. All rights reserved.

This software is proprietary and confidential. Unauthorized copying, modification, or distribution is strictly prohibited. See Terms of Service for details.

🤝 Support

Need help? We're here for you:


Made with ❤️ by the Promptrix team