Zed Threads Reader
Read AI conversation threads from Zed's local SQLite database and display them as human-readable YAML.
Database location
~/.local/share/zed/threads/threads.db
Quick usage
# Show the most recent thread (index 0)
uv run ~/prg/skills-akaihola/zed-threads/scripts/read_zed_threads.py
# Show thread at a specific index (0 = most recent, 1 = second most recent, …)
uv run ~/prg/skills-akaihola/zed-threads/scripts/read_zed_threads.py 5
# Disable syntax highlighting (useful when piping to a file)
uv run ~/prg/skills-akaihola/zed-threads/scripts/read_zed_threads.py --no-color
# Combine: third thread without colour
uv run ~/prg/skills-akaihola/zed-threads/scripts/read_zed_threads.py 2 --no-color
The script prints the number of threads found and the number successfully parsed to stderr, so you can see the thread count without it mixing into the YAML output.
Output format
Each thread is rendered as YAML with the following structure:
messages:
- User: "user message text"
- Agent: "assistant reply text"
- Thinking: "chain-of-thought reasoning (if present)"
- Tool:
name: read_file
input: { path: "/some/file" }
result: "file contents..."
Mentions (file references, rules) are expanded inline:
- User: |
@/path/to/file.py
```py
<file contents>
```
Can you review this?
Thread indexing
Threads are ordered by updated_at DESC, so index 0 is always the most recently
updated thread.
Requirements
uvin PATH (handles all Python dependencies via PEP 723 inline metadata)- Zed installed with at least one AI conversation recorded
- Dependencies (auto-managed):
ruamel.yaml,zstandard,pygments,pydantic