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

@involvex/prompt-enhancer

v0.0.9

Published

A Cli to enhance your prompts

Readme

prompt-enhancer

CLI/TUI tool to enhance prompts using various LLM providers (Gemini, Copilot, Kilo-gateway, Opencode Zen)

Status: ✅ MVP Complete - Phase 4 Interactive TUI Ready for Use

Features

  • 🎯 Interactive TUI Mode - Menu-driven interface for prompt enhancement
  • CLI Mode - Direct enhancement via command-line flags
  • 🔧 Multi-Provider Support - Gemini, Copilot, Kilo-gateway
  • 💾 Config Management - Persistent settings at ~/.prompt-enhancer/
  • 📜 History Tracking - Browse past enhancements
  • 🔄 Streaming Output - Real-time enhanced prompt display
  • 📋 Post-Enhancement Actions - Copy to clipboard, enhance further, or return to main menu
  • 🧠 Enhance Further Presets - Make concise, make more detailed, add structure/output format, improve for coding tasks
  • 🎨 Interactive Settings - Configure providers via TUI

Install

npm install --global prompt-enhancer

Or use directly:

npx prompt-enhancer

Quick Start

Interactive TUI Mode (Default)

prompt-enhancer

This launches the interactive menu where you can:

  • Enhance a prompt
  • Configure provider settings
  • View enhancement history
  • Get help

After an enhancement completes in TUI mode, you can:

  • Copy the enhanced prompt to clipboard
  • Run "Enhance further" with presets
  • Return to the main menu without exiting

CLI Mode - Direct Enhancement

$ prompt-enhancer --prompt "Your prompt here"
# or shorter
$ prompt-enhancer -p "Your prompt here"

Configuration

Setting Up Providers

  1. Via TUI Settings Menu (Interactive):

    $ prompt-enhancer
    # Select "Settings" → Choose provider → Enter API Key → Select Model
  2. Manual Config File: Edit ~/.prompt-enhancer/config.json:

    {
    	"version": "0.1.0",
    	"providers": {
    		"gemini": {
    			"name": "gemini",
    			"apiKey": "your-api-key",
    			"model": "gemini-2.5-flash",
    			"enabled": true
    		},
    		"copilot": {
    			"name": "copilot",
    			"apiKey": "your-api-key",
    			"model": "gpt-4o",
    			"enabled": true
    		},
    		"kilo": {
    			"name": "kilo",
    			"apiKey": "your-api-key",
    			"model": "auto",
    			"enabled": true
    		}
    	},
    	"defaultProvider": "gemini",
    	"maxTokens": 500,
    	"temperature": 1.0,
    	"saveHistory": true,
    	"streaming": true,
    	"theme": "dark"
    }

Usage Examples

Interactive Enhancement

$ prompt-enhancer
# Select "Enhance Prompt" → Type your prompt → Choose provider → View result

Quick CLI Enhancement

prompt-enhancer -p "write a hello world program"

View Enhancement History

$ prompt-enhancer
# Select "View History" to browse past enhancements

Get Help

$ prompt-enhancer --help
$ prompt-enhancer
# Select "Help" in menu for interactive guide

Supported Models

Gemini

  • gemini-2.5-flash (default)
  • gemini-2.0-pro
  • gemini-1.5-flash
  • gemini-1.5-pro

Copilot / OpenAI

  • gpt-4o (default)
  • gpt-4.1
  • gpt-4-turbo
  • gpt-3.5-turbo

Kilo Gateway

  • auto (default) - Automatically routes to best available free model
  • Any model supported by Kilo's router

Configuration Files

  • Config: ~/.prompt-enhancer/config.json - Provider settings, API keys, preferences
  • History: ~/.prompt-enhancer/history.json - Enhancement history with timestamps

API Keys Setup

Gemini

Get your API key at: https://makersuite.google.com/app/apikey

OpenAI / Copilot

Get your API key at: https://platform.openai.com/api-keys

Kilo Gateway

Get your key at: https://kilo.dev (or use free models with no key)

Commands

$ prompt-enhancer --help

  Usage
    $ prompt-enhancer
    $ prompt-enhancer --prompt "your prompt"
    $ prompt-enhancer enhance "your prompt"

  Options
    --prompt, -p              Prompt text for headless mode
    --output, -o              Write output to a file
    --output-format           Output format: auto | txt | json | md (default: auto)
    --verbose                 Verbosity level: 1 | 2 | 3 (default: 1)
    --debug                   Enable debug diagnostics + API request/response logs
    --trace                   Enable step-by-step execution trace
    --about                   Show package metadata
    --version, -v             Show version
    --help, -h                Show help

  Subcommands
    help                      Show comprehensive help
    about                     Show package metadata
    version                   Show version details
    enhance                   Run headless enhancement using positional prompt text

  Examples
    $ prompt-enhancer
    $ prompt-enhancer -p "build a cli to enhance prompts"
    $ prompt-enhancer -p "summarize this architecture" -o .\out\result.json --output-format json
    $ prompt-enhancer enhance "design API retries" --debug --trace --verbose 3
    $ prompt-enhancer --help

Architecture

Project Structure

src/
├── cli.tsx                 # CLI entry point and routing
├── app.tsx                 # Interactive TUI main app
├── commands/               # Command implementations
│   ├── direct-enhance.tsx  # CLI enhancement
│   ├── about.tsx
│   ├── help.tsx
│   └── version.tsx
├── components/             # React/Ink TUI components
│   ├── enhance-prompt.tsx  # Interactive enhancement UI
│   ├── settings.tsx        # Provider configuration UI
│   ├── history-viewer.tsx  # History browsing UI
│   └── menu.tsx            # Menu component
└── lib/                    # Core libraries
    ├── providers/          # Provider implementations
    │   ├── gemini.ts
    │   ├── copilot.ts
    │   ├── kilo.ts
    │   ├── base.ts         # Abstract base provider
    │   └── index.ts        # Provider registry
    ├── config/             # Configuration management
    │   ├── manager.ts      # Config read/write
    │   ├── schema.ts       # Zod validation
    │   └── types.ts        # TypeScript types
    ├── enhancement/        # Enhancement engine
    │   └── engine.ts       # Streaming enhancement logic
    ├── history/            # History management
    │   └── manager.ts      # History persistence
    └── utils/              # Utilities

Development

Build

bun run build

Lint & Format

bun run lint
bun run format

Type Check

bun run typecheck

Full Build Pipeline

bun run build  # Runs format, lint, typecheck, then compile

Technology Stack

  • React 18 - Component framework
  • Ink 5.2.1 - Terminal UI rendering
  • TypeScript - Type safety
  • Zod - Schema validation
  • Meow - CLI argument parsing
  • Provider SDKs:
    • @google/generative-ai - Gemini API
    • openai - OpenAI/Copilot API
    • Custom HTTP client for Kilo

Notes

  • Configuration is stored locally in ~/.prompt-enhancer/
  • API keys are stored unencrypted in config.json (consider using environment variables for production)
  • History is automatically saved unless disabled in config
  • Streaming output requires provider and model support

License

MIT