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

epro-cli

v2.0.0

Published

AI-powered prompt enhancement and translation CLI tool

Readme

epro CLI - AI-Powered Prompt Enhancement and Translation Tool

A command-line interface (CLI) tool that enhances and translates prompts for AI models using Google Generative AI (Gemini) via the @google/genai library.

Table of Contents

Installation

Install from npm (Recommended)

npm install -g epro-cli

Install from source

git clone https://github.com/ledhcg/epro-cli.git
cd epro-cli
npm install
npm run build
npm link

Configuration

Step 1: Get your Gemini API Key

  1. Visit Google AI Studio
  2. Sign in with your Google account
  3. Click "Create API Key"
  4. Copy the generated API key

Step 2: Set up the API Key

On Windows:

set GEMINI_API_KEY=your-api-key-here

For permanent setup:

  1. Open System Properties > Environment Variables
  2. Add new variable: GEMINI_API_KEY with your API key value

On macOS/Linux:

export GEMINI_API_KEY="your-api-key-here"

Add permanently to ~/.bashrc or ~/.zshrc:

echo 'export GEMINI_API_KEY="your-api-key-here"' >> ~/.bashrc
source ~/.bashrc

Usage

Interactive Mode

Start an interactive session to process multiple prompts continuously:

epro

In this mode, you can:

Available Commands:

  • /help - Display available commands
  • /language <code> - Set target language (e.g., en, fr, ja, ko, vi)
  • /context <text> - Set context for prompt enhancement
  • /context - Clear current context
  • /exit - Exit interactive mode

Example Session:

🚀 Welcome to epro interactive mode!
Type /help for available commands or /exit to quit.

> /language fr
✅ Language set to: fr

> /context web development with React
✅ Context updated

> create login form
🤖 Enhancing prompt...
✔ Prompt enhanced
🌐 Translating to fr...
✔ Translation complete

📝 Result:
Créer un composant de formulaire de connexion React avec les exigences suivantes:

1. **Structure du formulaire:**
   - Champ de saisie pour email/nom d'utilisateur avec validation
   - Champ de saisie pour mot de passe avec fonctionnalité afficher/masquer
   - Case à cocher "Se souvenir de moi"
   - Bouton de soumission "Se connecter"
   - Lien "Mot de passe oublié?"

2. **Validation:**
   - L'email doit être au format valide
   - Le mot de passe doit contenir au moins 8 caractères
   - Afficher les erreurs en temps réel

[... more content ...]

> /exit
👋 Goodbye!

Direct Mode

Process a single prompt and exit:

Basic Syntax:

epro [options] "prompt content"

Options:

  • -e, --enhance - Only enhance the prompt (no translation)
  • -t, --translate - Only translate (no enhancement)
  • --lang <code> - Target language (default: en)
  • --help - Display help

Detailed Examples

1. Default: Enhance and Translate to English

epro "create function to sort array"

Output:

📝 Result:
Create a comprehensive sorting function with the following specifications:

1. Function should accept an array of comparable elements (numbers, strings, or objects)
2. Implement multiple sorting algorithms (quicksort, mergesort, bubblesort)
3. Include an optional parameter for sort order (ascending/descending)
4. Handle edge cases: empty arrays, single elements, duplicate values
5. Add type safety with TypeScript generics
6. Include time and space complexity documentation
7. Provide usage examples and unit tests

2. Enhance Only (Keep Original Language)

epro -e "build REST API"

3. Translate Only to Japanese

epro -t --lang ja "Hello, how are you today?"

Output:

📝 Result:
こんにちは、今日はお元気ですか?

4. Using Inline Commands

epro "/language es /context mobile development Create user profile screen"

5. Pipeline with Other Tools

# Save result to file
epro "implement caching strategy" > cache-prompt.txt

# Copy to clipboard (macOS)
epro "optimize database queries" | pbcopy

# Use with other commands
echo "validate email" | xargs epro -e

Supported Languages

| Code | Language | Code | Language | |------|----------|------|----------| | en | English | ko | Korean | | es | Spanish | ja | Japanese | | fr | French | zh | Chinese | | de | German | vi | Vietnamese | | it | Italian | th | Thai | | pt | Portuguese | ar | Arabic | | ru | Russian | hi | Hindi |

Best Practices

1. Use Appropriate Context

# Set context for programming tasks
> /context developing a Node.js REST API with Express and TypeScript

# Set context for content writing
> /context writing technical documentation for senior developers

2. Keep Prompts Concise

# Instead of:
epro "I want you to help me write a function that handles array sorting"

# Use:
epro "array sorting function"

3. Combine Multiple Operations

# Step 1: Enhance prompt
epro -e "CRUD operations" > enhanced.txt

# Step 2: Translate result
cat enhanced.txt | xargs -I {} epro -t --lang de "{}"

4. Use for Different Domains

# Programming
epro "/context backend development implement user authentication"

# Data Science
epro "/context machine learning create neural network"

# DevOps
epro "/context kubernetes deploy microservices"

Troubleshooting

1. "API key not found" Error

Solution: Verify environment variable:

echo $GEMINI_API_KEY  # Linux/macOS
echo %GEMINI_API_KEY% # Windows

2. Network Connection Issues

Solutions:

  • Check internet connection
  • Verify firewall/proxy settings
  • Try again after a few seconds

3. Unexpected Results

Solutions:

  • Add more specific context
  • Use clearer prompts
  • Try enhance-only or translate-only mode

4. Changing AI Model

Edit src/config.ts:

export const GEMINI_MODEL = 'gemini-2.5-flash'; // or other available models

5. Rate Limiting

If you encounter rate limits:

  • Wait a few seconds between requests
  • Consider implementing request queuing
  • Check your API quota in Google AI Studio

Advanced Usage

Custom Configurations

Create .eprorc in your home directory:

{
  "defaultLanguage": "en",
  "defaultModel": "gemini-2.5-flash",
  "enhanceSystemPrompt": "Custom enhancement instructions..."
}

Scripting Examples

#!/bin/bash
# Batch process multiple prompts
for prompt in "create navbar" "build footer" "design sidebar"; do
  epro -e "$prompt" >> components-prompts.txt
  echo "---" >> components-prompts.txt
done

Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

git clone https://github.com/yourusername/epro-cli.git
cd epro-cli
npm install
npm run dev -- "test prompt"

License

MIT License - see the LICENSE file for details.

Support

Changelog

v2.0.0

  • Migrated to @google/genai library
  • Added interactive mode
  • Improved error handling
  • Added context support
  • Updated to latest Gemini models

v1.0.0

  • Initial release
  • Basic enhance and translate features