v0.2.87 c98b3d2

README.md RawHistoryFolder

weather — example zot extension (Go, tool-providing)

Demonstrates the tool registration half of the extension protocol (phase 2). The extension exposes a weather(city) tool that the LLM can invoke; the result is fake-but-deterministic so repeated calls for the same city return the same thing.

Build

cd examples/extensions/weather
go build -o weather .

Install

zot ext install .

Copies the directory (manifest + binary) into $ZOT_HOME/extensions/weather/. zot picks it up the next time you launch the TUI and registers the tool with the agent.

Use

In zot, ask:

  • "What's the weather in Berlin?"
  • "Compare the weather in Tokyo and Reykjavik."

The model decides on its own to call the weather tool because the description tells it what the tool is for. You don't need to invoke anything by hand.

Add the leading slash to your /help table

The tool also shows up in the system prompt's tool list because zot folds extension tools into the agent's registry at startup.

See also

  • examples/extensions/hello — slash-command extension (Go SDK)
  • examples/extensions/clock — slash-command extension (Node, no SDK)
  • docs/extensions.md — full protocol reference
source
1# weather — example zot extension (Go, tool-providing)
2
3Demonstrates the **tool registration** half of the extension protocol
4(phase 2). The extension exposes a `weather(city)` tool that the LLM
5can invoke; the result is fake-but-deterministic so repeated calls
6for the same city return the same thing.
7
8## Build
9
10```bash
11cd examples/extensions/weather
12go build -o weather .
13```
14
15## Install
16
17```bash
18zot ext install .
19```
20
21Copies the directory (manifest + binary) into
22`$ZOT_HOME/extensions/weather/`. zot picks it up the next time you
23launch the TUI and registers the tool with the agent.
24
25## Use
26
27In zot, ask:
28
29- "What's the weather in Berlin?"
30- "Compare the weather in Tokyo and Reykjavik."
31
32The model decides on its own to call the `weather` tool because the
33description tells it what the tool is for. You don't need to invoke
34anything by hand.
35
36## Add the leading slash to your /help table
37
38The tool also shows up in the system prompt's tool list because zot
39folds extension tools into the agent's registry at startup.
40
41## See also
42
43- `examples/extensions/hello` — slash-command extension (Go SDK)
44- `examples/extensions/clock` — slash-command extension (Node, no SDK)
45- `docs/extensions.md` — full protocol reference

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 476

↑↓ moveenter openesc close