Manage, organize, and reuse your AI prompts from the command line
🆕 v1.3.101: WCAG & App Store Compliance Audit prompt now available!
cueCLI is a command-line tool for managing, organizing, and reusing AI prompts across ChatGPT, Claude, and other assistants. Store frequently-used prompts locally, organize them with tags, and retrieve them instantly. No more copy-pasting from text files or losing prompts in chat history.
Managing prompts across AI chat sessions is messy. Copy-pasting leads to drift, sharing with teams is difficult, and sensitive data needs sanitization. cueCLI solves this by giving you a local prompt library with instant access, smart organization, and built-in safety features. Store once, use everywhere.
Perfect for:
- Developers using ChatGPT, Claude, or other AI assistants daily
- Teams needing consistent AI interactions across projects
- Anyone tired of losing or re-writing prompts
- Prompt engineers building reusable templates
- Prompt Storage - Save and organize reusable prompts locally
- Instant Retrieval - Get any prompt to clipboard in under 100ms
- Tag Organization - Categorize prompts for easy discovery
- Variable Substitution - Create dynamic templates with placeholders
- Built-in Sanitization - Automatically detect and remove sensitive data
- Backup System - Automatic backups of your prompt library
- Command Execution - Optionally execute prompts as shell commands
- Cross-platform - Works on macOS, Linux, and Windows
npm install -g cuecligit clone https://github.com/cuecli/cueCLI
cd cuecli
npm install
npm link# Save a frequently-used prompt
cuecli add context --from-file README.md --tags project docs
# Get it back instantly (preview → copy)
cuecli get context
# List all your saved prompts
cuecli list
# Use variables for dynamic prompts
cuecli get api-test --vars API_KEY="..." ENV="staging"
# Execute command prompts safely (optional)
cuecli get deploy-script --executePreview-first, then copy-first. In TTY, cueCLI shows a numbered preview (default 10 lines), copies the prompt (or prints it with a clear fallback message), and displays a concise directive summary with a single prompt: “Press Enter to continue; press Esc to clear.” In non‑TTY or machine modes, preview/summary are suppressed for clean output.
Options:
--vars KEY=value...- Substitute template variables--stdout- Print to terminal (in non‑TTY suppresses preview/summary)--pipe- Raw output for piping (no preview/summary)--file <path>- Save exact content to file (prints “Saved to <abs_path>”)--append <path>- Append exact content to file (prints “Appended to <abs_path>”)--preview/--lines <n>- Show preview first; default 10 lines (TTY)--output <format>- json | markdown | html | base64 | url (machine output)--execute- Only executes truly executable content (shebang or metadata) with confirm: “About to run this prompt via . Run? [y/N]”. Non‑executable (Markdown/prose) is hard‑blocked.--raw/--scan-only- Sanitization controls (see below)
Save a new prompt to your library. After saving, cueCLI shows preview → copy (or fallback print) → directive summary with a single Enter/Esc prompt in TTY.
Options:
--from-file <path>- Import from file--from-clipboard- Import from clipboard--desc <text>- Set a short description (shown in list)--tags <tags...>- Add tags for organization
Display all saved prompts with metadata. In TTY, list is numbered and interactive: type an index to retrieve and see the same preview → copy/summary flow. Non‑TTY shows a non‑interactive snapshot.
Options:
--tags <tags...>- Filter by tags--json- Output as JSON
Edit an existing prompt in your default editor. After saving, cueCLI shows preview → copy (or fallback print) → directive summary with a single Enter/Esc prompt in TTY.
Options:
--editor <editor>- Use specific editor--desc <text>- Update description without opening editor
Editor notes and troubleshooting:
- cueCLI uses whatever editor command you configure. Set
--editor,$EDITOR, or~/.cuecli/config.jsonkey"editor". - If the editor command is not found, the terminal will show:
Editor command not found: <editor>with fixes. Common choices:- macOS built‑in:
--editor 'open -W -e' - POSIX editors:
--editor nanoor--editor vim - VS Code CLI: install the
codecommand, then use--editor 'code -w'.
- macOS built‑in:
Tip: When you already have the exact new text, it’s often faster to paste it into your AI assistant and ask it to update the prompt directly (no editor required). Use the terminal for interactive editing or when you prefer your local tools.
Export your prompt library for backup or sharing. For safety, export asks for a one‑line confirmation before writing.
Options:
--output <file>- Output file path--raw- Export without sanitization (includes sensitive data)--format <format>- Output format (json, markdown)
Create reusable templates with variables using {{VARIABLE}} or ${VARIABLE} syntax:
Project: {{PROJECT_NAME}}
Environment: ${ENV}
API Endpoint: {{API_URL}}Then substitute when retrieving:
cuecli get api-template --vars PROJECT_NAME="MyAPI" ENV=staging API_URL="https://api.example.com"Protect sensitive information with built-in sanitization:
#!/usr/bin/env bash
# Scan for sensitive data without modifying
cuecli get my-prompt --scan-only
# Bypass sanitization (raw)
cuecli get my-prompt --raw
# Export with or without sanitization (confirm when prompted)
cuecli export --output shared-prompts.json
cuecli export --raw --output shared-prompts.jsonAutomatically detects:
- API keys and tokens
- Passwords and credentials
- SSH private keys
- Credit card numbers
- Email addresses (optional)
- URLs with embedded credentials
cueCLI stores data in ~/.cuecli/:
~/.cuecli/
├── config.json # Global configuration
├── prompts.json # Your prompt library
├── backups/ # Automatic backups
└── templates/ # Prompt templates
CUECLI_CONFIG_DIR- Override default config directoryEDITOR- Default editor for prompt editingLOG_LEVEL- Set logging level (ERROR, WARN, INFO, DEBUG)NO_COLOR- Disable colored output
- Default editor resolution order:
--editorflag →~/.cuecli/config.json→$EDITOR→code. - If your editor isn’t found, cueCLI prints actionable fixes (install/configure an editor CLI, use
--editoronce, or set$EDITOR/ config). No automatic fallback is performed. - Recommended defaults:
- macOS:
open -W -e(TextEdit, waits) orcode -w(VS Code CLI) ornano/vim. - Linux:
nano,vim, orvi. - Windows:
notepador a configured editor CLI.
- macOS:
Using with AI assistants:
- Editing via an AI assistant is ideal for deterministic updates (e.g., “replace section X with Y”).
- Running commands is best done directly in your terminal.
cueCLI comes with 7 universal prompts ready to use:
Ensures precise execution without assumptions or creative interpretations.
cuecli get strict-implementationComprehensive "1000 users" testing audit for finding bugs and UX issues.
cuecli get qa-simulationSurgical updates to existing systems with zero scope creep.
cuecli get precision-modificationComprehensive documentation standards for all modifications.
cuecli get change-documentationDeep dive analysis of a specific screen or component.
cuecli get single-screen-reviewComprehensive task tracking and documentation for multi-step projects.
cuecli get progress-trackerSystematic accessibility audit for WCAG 2.1 Level AA and App Store compliance.
cuecli get wcag-complianceThese prompts work best when:
- You need precise, accountable work with no surprises
- You're working with existing systems that shouldn't be disrupted
- You need comprehensive testing or review
- You require detailed documentation of changes
- You want to eliminate assumptions and ensure exact execution
# Add your project README as context
cuecli add project --from-file ./README.md --tags documentation
# Use it in your AI chat
cuecli get project# Create a reusable debug template
echo "Debug {{SERVICE}} at {{TIME}} with level {{LEVEL}}" | cuecli add debug --from-clipboard
# Use with different values
cuecli get debug --vars SERVICE=auth TIME="2025-01-04 14:00" LEVEL=verbose# Export without sensitive data
cuecli export --output team-prompts.json
# Team member imports
cuecli import team-prompts.jsongit clone https://github.com/cuecli/cueCLI
cd cuecli
npm installManual smoke checks (preview‑first, copy‑first, guardrails):
# Seed a prompt
cuecli add strict-implementation --from-file prompts/strict-implementation.md --desc "Strict-mode directive"
# List (interactive in TTY)
cuecli list
# Retrieve (preview → copy/print → summary)
cuecli get strict-implementation
# Non-executable guard (exit 1)
cuecli get --execute strict-implementation; echo $?- Bump & tag locally (example: patch release):
npm version patch -m "chore(release): %s"git push origin main --follow-tags
- Publish via CI (recommended):
- Add repo secret
NPM_TOKEN(npm Automation token) under GitHub → Settings → Secrets → Actions - Push a tag like
v1.3.99(created bynpm version), the Release workflow will:- Install, lint, test
- Publish to npm (skips if version already exists)
- Create a GitHub Release from the tag
- Add repo secret
- Manual publish (optional):
npm publish --access public- Then
git tag vX.Y.Z && git push origin vX.Y.Z
We welcome contributions! Please see our Contributing Guide for details.
MIT © 2025 Alex Kisin
- Documentation: cuecli.com/docs
- Issues: GitHub Issues
- Email: alex@cuecli.com
Enjoying cueCLI? Consider buying me a coffee to keep this project going!
Your support helps maintain and improve cueCLI for everyone. Thank you! 🙏
Built with:
- Commander.js - CLI framework
- Chalk - Terminal styling
- Clipboardy - Clipboard access
- fs-extra - File system utilities
✨ Enjoy cueCLI! It's been crafted with care to make your AI workflow smoother.
If it's helped you, star this repo and share it with others!