Spegel - Reflect the web through AI
January 20, 2026 · View on GitHub
Automatically rewrites the websites into markdown optimised for viewing in the terminal. Read intro blog post here
This is a proof-of-concept, bugs are to be expected but feel free to raise an issue or pull request.
Screenshot
Sometimes you don't want to read through someone's life story just to get to a recipe

Installation
Requires Python 3.11+
$ pip install spegel
or clone the repo and install it in editable mode
# Clone and enter the directory
$ git clone https://github.com/simedw/spegel.git
$ cd spegel
# Install dependencies and the CLI
$ pip install -e .
API Keys
Spegel is using litellm, which allows the use of the common LLMs, both local and external.
By default Gemini 2.5 Flash Lite is used, which requires you to set the GEMINI_API_KEY, see env_example.txt
Usage
Launch the browser
spegel # Start with welcome screen
spegel bbc.com # Open a URL immediately
Or, equivalently:
python -m spegel # Start with welcome screen
python -m spegel bbc.com
Basic controls
/– Open URL inputTab/Shift+Tab– Cycle linksEnter– Open selected linke– Edit LLM prompt for current viewb– Go backq– Quit
Editing settings
Spegel loads settings from a TOML config file. You can customize views, prompts, and UI options.
Config file search order:
./.spegel.toml(current directory)~/.spegel.toml~/.config/spegel/config.toml
To edit settings:
- Copy the example config:
cp example_config.toml .spegel.toml # or create ~/.spegel.toml - Edit
.spegel.tomlin your favorite editor.
Example snippet:
[settings]
default_view = "terminal"
app_title = "Spegel"
[ai]
default_model="gpt-5-mini"
[[views]]
id = "raw"
name = "Raw View"
hotkey = "1"
order = "1"
prompt = ""
[[views]]
id = "terminal"
name = "Terminal"
hotkey = "2"
order = "2"
prompt = "Transform this webpage into the perfect terminal browsing experience! ..."
model="claude-4-5-haiku-20250414"
Local Models with Ollama
To run with a local model using Ollama, first pull and serve your desired model:
$ ollama pull llama2
$ ollama serve
Then set the model in .spegel.toml as follows:
model = "ollama/llama2"
Ollama supports models like Llama, Mistral, and many others.
License
MIT License - see LICENSE file for details.
For more, see the code or open an issue!