Skip to content
/ weft Public

A vim-like terminal reader to chat with your books

License

Notifications You must be signed in to change notification settings

dpunj/weft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

weft 🪢

A vim-like terminal reader to chat with your books

https://x.com/dpunjabi/status/1854361314040446995

Features

Vim-like navigation

  • Flip between chapters: h/l or /
  • Scroll through pages: j/k or /
  • Jump to start/end: g/G
  • See table of contents: t

Chat with your books

  • a - Chat with your current text
  • s - Generate summary
  • r - Listen text
  • > - Listen to the compass

Uses LLM to interface with OpenAI, Anthropic, and other providers. You can also install plugins to run local models on your machine.

Getting started

Clone this repo and setup & activate venv using either uv (recommended)

uv venv
source .venv/bin/activate

Or, standard Python tools:

python3 -m pip install virtualenv
python3 -m virtualenv .venv
source .venv/bin/activate

Install dependencies with:

uv pip install -r requirements.txt # if using `uv` - faster!
# or
pip install -r requirements.txt

Bring your keys from OpenAI (default):

llm keys set OPENAI_API_KEY

Or use Anthropic's Claude:

llm install llm-claude-3
llm keys set ANTHROPIC_API_KEY
llm models default claude-3-5-sonnet-latest

Or, install a local model and run it on your machine:

llm install llm-gpt4all
llm models list # shows a list of available models
llm -m orca-mini-3b-gguf2-q4_0 '3 names for a pet cow' # tests the orca model locally (and downloads it first if needed)

Try it!

Get a book from Project Gutenberg and try it out:

uv run reader.py path/to/book.epub

About

A vim-like terminal reader to chat with your books

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages