A CLI tool to enhance prompts using Ollama AI.
Project description
enhance-this ✨
🚀 What is enhance-this?
At its core, enhance-this helps you achieve superior results from AI. By transforming your basic input into a comprehensive, well-structured prompt, it ensures the AI understands your intent precisely. This leads to higher quality and more useful responses, all powered by AI models running locally on your machine for speed and privacy.
✨ Key Features
- Live Streaming Output: Witness your prompt being crafted in real-time, character by character, directly in your terminal.
- Flexible Enhancement Styles: Choose from predefined styles (like
detailed,creative, ortechnical) to tailor your prompt's output. This allows you to guide the AI precisely for your needs. - Customizable Templates: Define and use your own prompt enhancement templates, allowing for highly personalized AI interactions.
- Diff View: Easily compare your original prompt with the enhanced version using a clear, color-coded diff display.
- Local Ollama Integration: Seamlessly connect with your local Ollama instance to leverage powerful AI models directly on your machine, ensuring fast responses and data privacy.
- Intelligent Model Management:
- Automatically detects running Ollama instances and available models.
- Automatically selects an optimal AI model if not specified.
- Facilitates model downloads: If a recommended model is missing,
enhance-thiscan download it for you with progress indication. - Resilient Network Handling: Includes retry logic for network requests to ensure robust communication.
- Automated Setup: A single command (
enhance --auto-setup) can automatically configure Ollama with a recommended AI model. - Rich Terminal Output: Utilizes
richfor clear, color-coded, and well-formatted terminal output, including markdown rendering. - Clipboard Integration: Automatically copies the enhanced prompt to your system's clipboard for immediate use.
- Highly Configurable: Customize behavior through a simple YAML configuration file, controlling aspects like model creativity and prompt enhancement logic.
🚀 Prequisite
Get Ollama: If you don't have it, download and install Ollama for your operating system. Make sure it's running!
📦 Installation
enhance-this is available through popular package managers:
PyPI (Python Package Index)
pip install enhance-this
NPM (Node.js Package Manager)
npm install -g enhance-this
Homebrew (macOS & Linux)
brew install hariharen9/tap/enhance-this
For Developers & Contributors
If you're looking to contribute or develop locally, clone the repository and install in editable mode:
git clone https://github.com/hariharen9/enhance-this.git
cd enhance-this
pip install -e .
💡 How to Use
Once installed and set up, using enhance-this is straightforward:
Basic Prompt Enhancement:
enhance "write a blog post about AI"
See the Changes with Diff View:
enhance "review my code" --diff
Use a Custom Prompt Style:
(First, define your custom style in your ~/.enhance-this/config.yaml file)
enhance "a logo for a coffee shop" -s my-logo-style
Command-Line Options
| Option | Short | What it Does |
|---|---|---|
<prompt> |
Your initial idea or request. | |
--model <MODEL> |
-m |
Choose which Ollama AI model to use. |
--temperature <T> |
-t |
Adjust the AI's creativity (0.0-2.0, higher is more creative). |
--length <LENGTH> |
-l |
Set the maximum length for the enhanced prompt. |
--style <STYLE> |
-s |
Pick an enhancement style (like detailed, creative, technical). |
--diff |
Show you the differences between your original and enhanced prompt. | |
--output <FILE> |
-o |
Save the enhanced prompt to a file. |
--no-copy |
-n |
Don't copy the prompt to your clipboard. |
--verbose |
-v |
Show more details about what's happening behind the scenes. |
--list-models |
See all the AI models you have available in Ollama. | |
--download-model <MODEL> |
Download a specific AI model from Ollama. | |
--auto-setup |
Automatically sets up Ollama with a recommended model. | |
--version |
Show the tool's version. | |
--help |
-h |
Display this helpful message. |
📚 More Information
- Configuration Guide: Learn how to customize
enhance-thisto fit your exact needs, including setting up your own prompt styles. - Troubleshooting Guide: Find quick solutions to common questions and issues.
- Examples: Discover more ways to use
enhance-thiswith practical examples.
🤝 Get Involved!
We love contributions! Whether it's reporting a bug, suggesting a new feature, or helping with code, your input is welcome. Check out our CONTRIBUTING.md for details on how to get started.
📄 License
This project is open-source and available under the MIT License - see the LICENSE file for more details.
This README was crafted and enhanced by Gemini to make enhance-this even more accessible and exciting!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file enhance_this-0.1.6.tar.gz.
File metadata
- Download URL: enhance_this-0.1.6.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac446140572fbe238c852283d1bf6cf71266f81976805a41bdf69023bbded9f7
|
|
| MD5 |
a4a094751ae1b59e4c73dd24c5da2db2
|
|
| BLAKE2b-256 |
44829707385363fd5f1400005b12b724aa25ffd67d60c6253a24d1d1d3cbfb52
|
File details
Details for the file enhance_this-0.1.6-py3-none-any.whl.
File metadata
- Download URL: enhance_this-0.1.6-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
543362f8cd02a435329f9f3613f4309feca6226bbfa4a8e9d0c642ca61aa458c
|
|
| MD5 |
816f9185f4dd05490637c7ff854a14b1
|
|
| BLAKE2b-256 |
e15e3333e2cf970d03ff04a5d06fa0a1a556e8ca166e77e7870b07ffb2f1b75f
|