CLI Reference - diShine-digital-agency/ai-prompt-library GitHub Wiki
โ ๏ธ Legacy โ frozen at v2.4.0, no longer maintained. Theprompt-libCLI documented here still works against theprompts/library, but receives no new features or bug fixes. For the maintained Prompt Workshop โ with Live Battle & Leaderboard, private accounts & chat, AI chat with files and memory, and many more models โ use prompt.dishine.it.
Complete documentation for every
prompt-libcommand (legacy, v2.4.0).
The prompt-lib CLI is the legacy terminal interface to the AI Prompt Library. It provides commands for discovering, building, composing, linting, optimizing, and managing prompts โ all with zero npm dependencies.
prompt-lib <command> [arguments]
Global install:
npm install -g @dishine/prompt-library
prompt-lib --helpLocal (no install):
node bin/prompt-lib.js --helpLists all prompts grouped by category, showing slug, title, and difficulty level.
prompt-lib listOutput:
Prompt Library (82 prompts)
business (12)
client-communication - Client Communication Template [intermediate]
competitive-intelligence - Competitive Intelligence Brief [advanced]
...
data (10)
dashboard-spec - Dashboard Specification [intermediate]
...
Searches prompts by keyword across titles, tags, categories, and content. Results are ranked by relevance score.
prompt-lib search <query>Scoring system:
| Match Location | Points per Term |
|---|---|
| Title | 100 |
| Tag | 50 |
| Category | 30 |
| Content | 10 |
Multi-word queries score each word independently. A prompt matching "code" and "review" in the title scores 200 points.
Examples:
prompt-lib search "chain of thought"
prompt-lib search "marketing email"
prompt-lib search "code review security"
prompt-lib search "claude xml"
prompt-lib search "data pipeline"Displays the complete content of a prompt including metadata, template, tips, and examples.
prompt-lib show <slug>Example:
prompt-lib show chain-of-thought
prompt-lib show code-review
prompt-lib show landing-page-copyThe output includes:
- Title, category, difficulty, tags, compatible models
- Full prompt content with all sections
- File path within the library
Extracts the template section from a prompt, detects {{placeholders}}, and prompts you to fill each one. The completed prompt is copied to your clipboard.
prompt-lib use <slug>Example:
prompt-lib use code-reviewBuilding prompt: Code Review Checklist
3 field(s) to fill in
programming language: Python
code snippet: def calculate_total(items): return sum(i.price for i in items)
focus area: security and performance
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
YOUR PROMPT (ready to paste)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[Filled prompt content here]
Copied to clipboard.
Extracts and copies the template section of a prompt directly to clipboard, without interactive filling.
prompt-lib copy <slug>Example:
prompt-lib copy chain-of-thought
prompt-lib copy sql-query-builderInteractive command that lets you layer a system prompt + framework + task template into a single powerful prompt. Placeholders across all layers are filled interactively.
prompt-lib composeWorkflow:
- Pick a system prompt (e.g., Coding Assistant, Research Assistant)
- Pick a reasoning framework (e.g., Chain-of-Thought, Few-Shot Patterns)
- Pick a domain template (e.g., Code Review, SQL Query Builder)
- Fill any
{{placeholders}}across all three layers - Get the composed prompt copied to clipboard
- Optionally save the composition for later
Example output:
# SYSTEM PROMPT
You are a senior software engineer...
# REASONING FRAMEWORK
Think through this problem step by step...
# TASK TEMPLATE
Review the following code for...
Saved compositions go to ~/.prompt-library/saved-prompts.json.
Interactive command to build a new system prompt with custom dynamic fields.
prompt-lib createWorkflow:
- Enter a title, category, tags, difficulty, and target models
- Define dynamic fields (become
{{field_name}}placeholders) - Write the prompt body using your fields
- Prompt is saved to
~/.prompt-library/custom-prompts.json - Optionally fill and use it immediately
Example:
CREATE โ build a new system prompt with custom fields
Prompt title: Technical Blog Writer
Category: custom
Tags: blog, technical, writing
Difficulty: intermediate
Field name: topic
Description: The topic of the blog post
Field name: audience
Description: Target audience level
> Write a technical blog post about {{topic}} for {{audience}}...
Your custom prompts appear in prompt-lib list and prompt-lib search alongside built-in prompts.
Interactive command that guides you through creating a prompt using one of 5 built-in frameworks.
prompt-lib generateAvailable frameworks:
| # | Framework | Description |
|---|---|---|
| 1 | Expert Role-Based | Creates prompts with expert persona, rules, and constraints |
| 2 | Chain-of-Thought | Enforces step-by-step reasoning |
| 3 | Structured Output | Produces consistent, formatted output |
| 4 | Task Decomposition | Breaks complex tasks into sub-tasks |
| 5 | Guardrails & Safety | Built-in safety rules and output constraints |
Each framework asks context-specific questions and generates a production-ready prompt. You can save the result as a custom prompt.
Analyzes any prompt against 14 quality rules, producing a score (0โ100), letter grade (AโF), and prioritized suggestions.
prompt-lib lintPaste your prompt (multi-line, end with two empty lines), and get:
LINT RESULTS
Score: 72/100 (Grade: C)
Rules: 10/14 passed | 89 words
โ
Passing:
โข Role definition
โข Clear task
โข Constraints or rules
...
๐ก Suggestions to improve:
โ Specify the output format: "Respond in [format]"
โ Add examples of expected input/output
...
See Tools: Linter, Optimizer, Recommender for the full rule list and scoring details.
Analyzes and rewrites your prompt using content-aware optimization. Works entirely offline.
prompt-lib optimizeThe optimizer:
- Detects the domain (coding, writing, marketing, data, business, education, image)
- Removes filler words and excessive politeness
- Strengthens weak verbs
- Replaces vague language with specific terms
- Adds domain-specific structure (role, constraints, output format)
- Shows before/after scores and all changes made
Score: 35 โ 88 (+53)
Changes made:
โข Removed filler words and redundant phrases
โข Replaced weak/hedging language with direct instructions
โข Added domain-specific role (coding)
โข Organized prompt into clear labeled sections
โข Added coding-specific output format
Analyzes your use-case description and suggests the best prompts, including an optimal system prompt + framework + template combination.
prompt-lib recommend <query>Example:
prompt-lib recommend "I need to write a landing page for a SaaS product"RECOMMENDATIONS for: "I need to write a landing page for a SaaS product"
Suggested combination:
๐ง System prompt: Content Writer (content-writer)
๐ง Framework: Few-Shot Patterns (few-shot-patterns)
๐ Template: Landing Page Copy (landing-page-copy)
Top matching prompts:
Landing Page Copy
slug: landing-page-copy | category: marketing | score: 65
...
Lists all saved compositions and custom prompts from ~/.prompt-library/.
prompt-lib savedOpens the Prompt Workshop (visual browser tool) with all prompts loaded.
prompt-lib viewerThe command injects current prompt data into viewer.html and opens it in your default browser.
Shows all prompt categories with their prompt counts.
prompt-lib categoriesDisplays a random prompt from the library โ great for inspiration.
prompt-lib randomShows comprehensive statistics: total prompts, categories, unique tags, models covered, difficulty distribution, and top tags.
prompt-lib statsprompt-lib --helpprompt-lib --versionThe copy, use, and compose commands automatically copy results to your clipboard. Platform-specific tools used:
| Platform | Clipboard Tool | Notes |
|---|---|---|
| macOS | pbcopy |
Built-in, always available |
| Windows | clip |
Built-in, always available |
| Linux |
xclip or xsel
|
Install with sudo apt install xclip
|
If no clipboard tool is available, the CLI shows the prompt content and asks you to copy manually.
prompt-lib search "sql" # Find SQL-related prompts
prompt-lib show sql-query-builder # Read the full prompt
prompt-lib use sql-query-builder # Fill placeholders and copyprompt-lib compose # Layer system + framework + template
# or for AI-powered suggestions:
prompt-lib recommend "build a REST API" # Get recommendations firstprompt-lib lint # Score your prompt
prompt-lib optimize # Rewrite with best practicesprompt-lib create # Build a custom prompt
prompt-lib saved # View your saved prompts
prompt-lib use my-custom-prompt # Use it anytime| Variable | Effect |
|---|---|
NO_COLOR |
Disables ANSI color output when set to any value |
Navigation: โ Getting Started | Prompt Workshop โ