Skip to main content

Spegel - Reflect the web through AI. A terminal browser with multiple AI-powered views.

Project description

Spegel – Reflect the web through AI

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 Recipe Example

Installation

Requires Python 3.11+

pip install spegel

or clone the repo and install it editable mode

# Clone and enter the directory
$ git clone <repo-url>
$ cd spegel

# Install dependencies and the CLI
$ pip install -e .

API Keys

Spegel is currently only support Gemini 2.5 Flash, to use it you need to provide your API key in the env

GEMINI_API_KEY=...

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 input
  • Tab/Shift+Tab – Cycle links
  • Enter – Open selected link
  • e – Edit LLM prompt for current view
  • b – Go back
  • q – Quit

Editing settings

Spegel loads settings from a TOML config file. You can customize views, prompts, and UI options.

Config file search order:

  1. ./.spegel.toml (current directory)
  2. ~/.spegel.toml
  3. ~/.config/spegel/config.toml

To edit settings:

  1. Copy the example config:
    cp example_config.toml .spegel.toml
    # or create ~/.spegel.toml
    
  2. Edit .spegel.toml in your favorite editor.

Example snippet:

[settings]
default_view = "terminal"
app_title = "Spegel"

[[views]]
id = "raw"
name = "Raw View"
prompt = ""

[[views]]
id = "terminal"
name = "Terminal"
prompt = "Transform this webpage into the perfect terminal browsing experience! ..."

For more, see the code or open an issue!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spegel-0.1.0.tar.gz (40.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spegel-0.1.0-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file spegel-0.1.0.tar.gz.

File metadata

  • Download URL: spegel-0.1.0.tar.gz
  • Upload date:
  • Size: 40.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for spegel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 035cb67b808f8dff372d3b56277474498626758e2518838e6342d287025c75bd
MD5 27482ddb3de49e71c15dc3025a6092f4
BLAKE2b-256 8b63160637453b32d0e26cdc6cac020c9137859c4c55084855835e624034192f

See more details on using hashes here.

Provenance

The following attestation bundles were made for spegel-0.1.0.tar.gz:

Publisher: publish.yml on simedw/spegel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spegel-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: spegel-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for spegel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 72b39202ce275fe26626531ee01389c79b59f1171f7695534a691e6574404eac
MD5 900de92832f9eb4683b3fbef46ae7299
BLAKE2b-256 beb2ccb3c1d720f0494bcd7ff7c5cf39c6d002073f76481c2a9846c8fd2c0886

See more details on using hashes here.

Provenance

The following attestation bundles were made for spegel-0.1.0-py3-none-any.whl:

Publisher: publish.yml on simedw/spegel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page