promma
v0.1.3
Published
CLI提示词管理工具,支持提示词的增删查改,并集成Gemini AI进行提示词生成
Readme
Prompt Manager (Promma)
A command-line AI prompt management tool that supports CRUD operations for prompts and integrates Gemini AI for intelligent generation and semantic search.
✨ Features
- 🔍 Prompt Management: Efficiently create, read, update, and delete your AI prompts.
- 🤖 AI Intelligent Generation: Utilize Gemini AI to generate structured prompts based on your descriptions.
- 🧠 AI Semantic Search: Find relevant prompts through natural language search, even if you don't remember exact keywords.
- 📊 Beautiful Display: Clear and formatted preview of your prompts.
- 📤 Multiple Export Formats: Export prompts as plain text, Markdown, or JSON.
- 📂 Flexible Storage: Supports custom configuration and data storage paths, compatible with different devices.
- 📦 Convenient Import: Batch import prompts from JSON files.
- ⚡ Quick Commands: Supports command aliases for faster operations.
🔗 Repository
https://github.com/kunieone/promma.git
🚀 Quick Installation
Promma can be installed globally via Bun or npm, allowing you to use the promma command from anywhere.
Install with Bun (Recommended)
If you have Bun installed, you can quickly install Promma using the following command:
bun install -g prommaInstall with npm
If you prefer using npm, you can also install it globally with the following command:
npm install -g promma⚙️ Configure Gemini API Key (Optional, for AI Features)
To use the AI generation and AI search features, you need to configure your Gemini API Key.
1. Get Your Gemini API Key
- Visit Google AI Studio.
- Log in with your Google account.
- Click on your profile picture in the top right corner -> "API keys".
- Create a new API key.
- Copy your API key.
2. Configure the Key
Run the promma config command in your terminal, then follow the prompts to enter your API key:
promma configAlternatively, you can configure it by setting an environment variable:
export GEMINI_API_KEY=your_api_key_here💡 Usage
After installation and configuration, you can directly run the promma command in your terminal.
View Help Information
promma --helpList All Prompts
promma listOr use aliases:
promma ls
promma lFilter by Category and Tags
promma list -c Writing -t CopywritingView Prompt Details (Interactive)
promma view <id>Or use aliases:
promma v <id>Create New Prompt
promma createOr use aliases:
promma c
promma addDelete Prompt
promma delete <id>Or use aliases:
promma d
promma rmGenerate Prompt with AI
You can directly provide content, or enter interactive mode:
# Generate directly
promma generate "I need a prompt to help with writing"
# Interactive generation
promma generateOr use aliases:
promma g
promma genAI Semantic Search for Prompts
Based on your description, AI will intelligently match the most relevant prompts:
promma ai-search "I need help designing a product"Or use aliases:
promma ai
promma aisExport Prompt
Supports text, md (Markdown), json formats:
promma export <id> mdOr use aliases:
promma ex <id> mdImport Prompts
Import prompts from a JSON file. The file content should be an array of prompt objects:
promma import <filePath>Or use aliases:
promma i
promma add-fileList All Categories
promma categoriesOr use aliases:
promma catList All Tags
promma tagsOr use aliases:
promma t
promma tagClear All Prompt Data (Use with Caution!)
promma clear-allOr use aliases:
promma clearView Digestion History
promma historyOr use aliases:
promma hist
promma hDigest Web Content
promma digest <url> [custom_instruction] [options]<url>: The web page link to digest.[custom_instruction]: Optional, custom instruction for summarizing the content.[options]:-d, --depth <number>: Recursive crawling depth, defaults to0(no recursion, only crawls the initial page). For example,1means crawling the initial page and its first level of links, and so on. All collected content will be used as a holistic context for summarization.
Example:
promma digest https://example.com/article "Summarize main points" -d 1📂 Data Storage
All prompt data is stored in a local SQLite database, with the default path being ~/.promma/prompts.db. You can customize the data storage location by setting the PROMMA_DATA_DIR environment variable.
API keys and configurations are stored in ~/.promma/config.json. You can also customize the configuration storage location by setting the PROMMA_CONFIG_DIR environment variable.
🤝 Contributing
Contributions via Pull Requests or Issue reports are welcome!
📄 License
This project is licensed under the MIT License.
Thank you for your support, and we hope Promma becomes a valuable assistant for managing your prompts in your daily work!
