A prompt engineer's Grimoire to assist with getting the best results from Generative AI prompts.
- Prompt Management: Easily manage and organize your prompts.
- Clipboard Integration: Seamlessly copy and paste prompts to the clipboard.
- Command Line Interface: Interact with Grimoire through a user-friendly CLI.
- Ollama Integration: Generate text using AI models with Ollama's local LLM integration.
To install Grimoire, follow these steps:
- Clone the repository and navigate to the directory:
git clone https://github.com/gphorvath/grimoire.git
cd grimoire
- Build and install using Make:
# Build the binary
make build
# Install binary and prompts (requires sudo)
make install
This will:
- Build the Grimoire binary
- Create the ~/.grimoire directory
- Copy default prompts to ~/.grimoire/prompts
- Install the binary to /usr/local/bin
After installation, you can use Grimoire through its CLI:
# List all available prompts
grimoire list
# Copy a prompt to clipboard
grimoire copy <prompt-name>
# Create a new prompt
grimoire new <prompt-name>
# Edit an existing prompt in default editor
grimoire edit <prompt-name>
# Use echo prompt to verify prompt loading
# Requires Ollama running locally with a configured model (default: llama3)
grimoire generate --prompt echo "Testing generation functionality"
# Modify prompt in default editor before generation (doesn't require arg)
grimoire generate --prompt echo --edit
GRIMOIRE environment variables control the configuration of the application.
-
GRIMOIRE_OLLAMA_MODEL
(default: "llama3") The model to be used with Ollama for AI inference. -
GRIMOIRE_OLLAMA_URL
(default: "http://localhost:11434/api") The URL endpoint for the Ollama API server. -
GRIMOIRE_OLLAMA_STREAM
(default: true) Controls whether to stream responses from Ollama. Set to "true" to enable streaming, "false" to disable.
GRIMOIRE_EDITOR
(default: "vim") The text editor to use when editing prompts or configuration files.
This project is licensed under the MIT License. See the LICENSE file for details.