fix: restore README mangled by sed

This commit is contained in:
2026-06-17 20:48:28 +10:00
parent fd8d72d968
commit 178d462789

View File

@@ -4,49 +4,49 @@ An AI agent prompt plugin for the [Enlightenment](https://www.enlightenment.org/
## Usage
Open the Everything launcher and type `ai:`?`ai:` followed by your question:
Open the Everything launcher and type `ai:` followed by your question:
`ai:``ai:`
?what is the capital of France
`ai:``ai:`
```
ai:what is the capital of France
```
The plugin shows **Asking AI...** while waiting, then updates the item with the AI response. Select the item to copy it to clipboard.
## Supported backends
- **Claude** (Anthropic API) — set `ai:`ANTHROPIC_API_KEY`ai:` in your environment
- **Ollama** (local LLM) — runs against `ai:`http://localhost:11434`ai:` by default
- **Claude** (Anthropic API) — set `ANTHROPIC_API_KEY` in your environment
- **Ollama** (local LLM) — runs against `http://localhost:11434` by default
Backend is auto-detected: Claude is used when `ai:`ANTHROPIC_API_KEY`ai:` is set, otherwise Ollama is assumed.
Backend is auto-detected: Claude is used when `ANTHROPIC_API_KEY` is set, otherwise Ollama is assumed.
## Configuration
Set these environment variables (e.g. in `ai:`~/.profile`ai:`):
Set these environment variables (e.g. in `~/.profile`):
| Variable | Default | Description |
|---|---|---|
| `ai:`ANTHROPIC_API_KEY`ai:` | — | Anthropic API key; enables Claude when set |
| `ai:`AI_PROVIDER`ai:` | auto | Force `ai:`"claude"`ai:` or `ai:`"ollama"`ai:` |
| `ai:`CLAUDE_MODEL`ai:` | `ai:`claude-haiku-4-5-20251001`ai:` | Claude model to use |
| `ai:`OLLAMA_MODEL`ai:` | `ai:`llama3.2`ai:` | Ollama model to use |
| `ai:`OLLAMA_HOST`ai:` | `ai:`http://localhost:11434`ai:` | Ollama server base URL |
| `ANTHROPIC_API_KEY` | — | Anthropic API key; enables Claude when set |
| `AI_PROVIDER` | auto | Force `"claude"` or `"ollama"` |
| `CLAUDE_MODEL` | `claude-haiku-4-5-20251001` | Claude model to use |
| `OLLAMA_MODEL` | `llama3.2` | Ollama model to use |
| `OLLAMA_HOST` | `http://localhost:11434` | Ollama server base URL |
## Applying to your Enlightenment source tree
This repo mirrors the directory structure of the Enlightenment source tree. Copy the files into `ai:`src/modules/everything/`ai:` in your Enlightenment checkout.
This repo mirrors the directory structure of the Enlightenment source tree. Copy the files into `src/modules/everything/` in your Enlightenment checkout.
**Files changed:**
| File | Change |
|---|---|
| `ai:`src/modules/everything/evry_plug_ai.c`ai:` | New plugin (the main implementation) |
| `ai:`src/modules/everything/e_mod_main.h`ai:` | Added `ai:`evry_plug_ai_init/shutdown/save`ai:` declarations |
| `ai:`src/modules/everything/e_mod_main.c`ai:` | Added `ai:`evry_plug_ai_init(m)`ai:` and `ai:`evry_plug_ai_shutdown()`ai:` calls |
| `ai:`src/modules/everything/meson.build`ai:` | Added `ai:`evry_plug_ai.c`ai:` to the source list |
| `src/modules/everything/evry_plug_ai.c` | New plugin (the main implementation) |
| `src/modules/everything/e_mod_main.h` | Added `evry_plug_ai_init/shutdown/save` declarations |
| `src/modules/everything/e_mod_main.c` | Added `evry_plug_ai_init(m)` and `evry_plug_ai_shutdown()` calls |
| `src/modules/everything/meson.build` | Added `evry_plug_ai.c` to the source list |
Then rebuild with meson/ninja.
## Requirements
- `ai:`curl`ai:` must be available in `ai:`PATH`ai:` (used to call the AI APIs)
- `curl` must be available in `PATH` (used to call the AI APIs)
- Enlightenment with the Everything module enabled