Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gphorvath committed Nov 11, 2024
1 parent 6171ff0 commit 8861aac
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 9 deletions.
35 changes: 32 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,53 @@ A prompt engineer's ***Grimoire*** to assist with getting the best results from
- **Prompt Management**: Easily manage and organize your prompts.
- **Clipboard Integration**: Seamlessly copy and paste prompts using the clipboard service.
- **Command Line Interface**: Interact with Grimoire through a user-friendly CLI.
- **Ollama Integration**: Generate text using AI models with Ollama's local LLM integration.

## Installation

To install Grimoire, run the following commands:
To install Grimoire, follow these steps:

1. Clone the repository and navigate to the directory:
```sh
git clone https://github.com/gphorvath/grimoire.git
cd grimoire
```

2. Build and install using Make:
```sh
# 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

## Usage

Run the Grimoire CLI:
After installation, you can use Grimoire through its CLI:

```sh
grimoire
# 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
grimoire edit <prompt-name>

# Use echo prompt to verify prompt loading
# Requires Ollama running locally with a configured model (default: llama3)
grimoire generate -p echo "Testing generation functionality"
```

## License
Expand Down
13 changes: 9 additions & 4 deletions docs/content/grimoire_generate.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
## grimoire generate

Get generation from Ollama
Get generation from Ollama.

### Synopsis

Requests generation from Ollama while optionally prepending a prompt

```
grimoire generate [prompt] [flags]
grimoire generate [flags] [input...]
```

### Options

```
-h, --help help for generate
-h, --help help for generate
-p, --prompt string Prompt file to prepend to input
```

### SEE ALSO

* [grimoire](grimoire.md) - Grimoire - A CLI tool for managing and using GenAI prompts

###### Auto generated by spf13/cobra on 9-Nov-2024
###### Auto generated by spf13/cobra on 10-Nov-2024
4 changes: 2 additions & 2 deletions src/cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ var (

generateCmd = &cobra.Command{
Use: "generate [flags] [input...]",
Short: "Get generation from Ollama.",
Long: "Requests generation from Ollama while optionally prepending a prompt.",
Short: "Get generation from Ollama",
Long: "Requests generation from Ollama while optionally prepending a prompt",
Args: cobra.MinimumNArgs(1),
RunE: runGenerate,
}
Expand Down

0 comments on commit 8861aac

Please sign in to comment.