Show HN: Using LLMs to make the Emacs Web Browser great again

sammy09101 pts0 comments

GitHub - sstraust/simpleweb: Simplify the Web! · GitHub

/" data-turbo-transient="true" />

Skip to content

Search/

Sign in<br>Sign upAppearance settings

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

sstraust

simpleweb

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star<br>11

master

BranchesTags

Go to file

CodeOpen more actions menu

Latest commit

History<br>43 Commits<br>43 Commits

Folders and files<br>NameNameLast commit message<br>Last commit date<br>simpleweb

simpleweb

.gitignore

.gitignore

DemoScreenshot.png

DemoScreenshot.png

LICENSE

LICENSE

README.html

README.html

README.md

README.md

simpleweb-process-url.el

simpleweb-process-url.el

View all files

Repository files navigation

SimpleWeb

An Emacs package that simplifies web pages , so they render correctly in the Emacs Web Browser

Why Do I Need This?

Emacs is a text-based editor, but the modern web isn't very text-based. Javascript, visual applications, it's all too much and I don't like it.

This package uses machine learning to translate modern HTML into the much older style of the 1990s. Simple HTML with simple, well labeled tags, that load well in the emacs browser.

New FEATURES

Hot off the press! you can't afford to miss these!

Instead of using raw LLMs to operate on a page's source, you can now generate a program that operates on the page's source.

In practice, I've found this to be both a faster browsing experience, and produce more accurate output. I had been planning to do this for a long time, but only recently found that the current class of models were producing good enough output.

Warnings:

This uses a lot of tokens, at least initially, to generate the pages. It's recommended that you use a subscription plan or something with a reasonable cap if you turn on this feature.

This works by sending the full webpage text to an LLM, and does the modifications by injecting js into a firefox browser. It relies on browser sandboxing, which I am happy with, but I'd warn against using it with anything that contains logged-in information/secrets/etc.

It runs with the claude CLI, so make sure you're happy with calling the claude CLI. I plan to add more models/options in the future.

Notes:

The modifications do not take effect the first time you visit a new type of page. If there isn't a modifier already generated, we load the page as-normal, and then use a background queue to generate the modifier program. We do this because it takes a long time for the program to generate. The next time you visit the page after generation, the changes should take effect.

This spins up 2 firefox drivers, 1 for live browsing, and 1 for program generation. You can look at them to see what they are doing, but if you close them it will mess things up.

Each generated program lives in simpleweb/generated_programs. If there's something you don't like, you can always delete it and regenerate it. It's sometimes worth iterating a few times for sites you frequently visit.

It takes a moment for the webserver to start up after you first open emacs. You may need to wait 10seconds after you first open emacs to be able to start browsing.

Installation Instructions

Clone The Repository

mkdir -p ~/.emacs.d && cd $_<br>git clone https://github.com/sstraust/simpleweb.git

Install Python Dependencies

sudo apt install python3-pip<br>pip install openai<br>pip install google-generativeai<br>pip install --upgrade requests

Add your GEMINI API key

(setenv "GEMINI_API_KEY" "your_api_key")

to your .emacs file

Turn on the Library

Add the following to your .emacs file:

(add-to-list 'load-path "~/.emacs.d/simpleweb")<br>(simpleweb-initialize)

Use the library in program-generation mode

Make sure Claude CLI is available, and set the CLI path

(setenv "CLAUDE_CLI_PATH" "path to your claude")

you will also need to install firefox and geckodriver

Add the following to your .emacs file:

(add-to-list 'load-path "~/.emacs.d/simpleweb")<br>(simpleweb-initialize-program-generation)

It takes a few seconds (10 or so) after emacs starts up before the server is ready.

If you don't want to turn it on for every load, you can use the command simpleweb-simplify-page from inside a eww buffer insted.

Debugging

debugging: if things don't happen the way you expect them to<br>check the *Messages* and the *simplify-web-server* buffer.

This is a new feature that's still a little unpolished, so feel free to reach out directly if you have any problems getting it up and running.

Changelog

8/23/26 add toggle for on-off, as well as command to one-shot run.

8/12/26 add tooling for program generation

About<br>Simplify the Web!<br>Resources<br>Readme<br>Apache-2.0 license<br>Activity<br>Stars<br>11 stars<br>Watchers<br>2 watching<br>Forks<br>2 forks<br>Report...

emacs simpleweb program page install browser

Related Articles