frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Webctl – Browser automation for agents based on CLI instead of MCP

https://github.com/cosinusalpha/webctl
134•cosinusalpha•3w ago
Hi HN, I built webctl because I was frustrated by the gap between curl and full browser automation frameworks like Playwright.

I initially built this to solve a personal headache: I wanted an AI agent to handle project management tasks on my company’s intranet. I needed it to persist cookies across sessions (to handle SSO) and then scrape a Kanban board.

Existing AI browser tools (like current MCP implementations) often force unsolicited data into the context window—dumping the full accessibility tree, console logs, and network errors whether you asked for them or not.

webctl is an attempt to solve this with a Unix-style CLI:

- Filter before context: You pipe the output to standard tools. webctl snapshot --interactive-only | head -n 20 means the LLM only sees exactly what I want it to see.

- Daemon Architecture: It runs a persistent background process. The goal is to keep the browser state (cookies/session) alive while you run discrete, stateless CLI commands.

- Semantic targeting: It uses ARIA roles (e.g., role=button name~="Submit") rather than fragile CSS selectors.

Disclaimer: The daemon logic for state persistence is still a bit experimental, but the architecture feels like the right direction for building local, token-efficient agents.

It’s basically "Playwright for the terminal."

Comments

philipbjorge•3w ago
This looks remarkably similar to https://github.com/vercel-labs/agent-browser

How is it different?

hugs•3w ago
vibium clicker, too. https://github.com/VibiumDev/vibium/blob/main/CONTRIBUTING.m...

"browser automation for ai agents" is a popular idea these days.

cosinusalpha•3w ago
To be honest, I hadn't seen that one yet!

The main difference is likely the targeting philosophy. webctl relies heavily on ARIA roles/semantics (e.g. role=button name="Save") rather than injected IDs or CSS selectors. I find this makes the automation much more robust to UI changes.

Also, I went with Python for V1 simply for iteration speed and ecosystem integration. I'd love to rewrite in Rust eventually, but Python was the most efficient way to get a stable tool working for my specific use case.

renegat0x0•3w ago
A little bit different, but also allows to scrape efficiently. Json http communication rather than cli.

https://github.com/rumca-js/crawler-buddy

More like a framework for other mechanisms

binalpatel•3w ago
Cool to see lots of people independently come to "CLIs are all you need". I'm still not sure if it's a short-term bandaid because agents are so good at terminal use or if it's part of a longer term trend but it's definitely felt much more seamless to me then MCPs.

(my one of many contribution https://github.com/caesarnine/binsmith)

desireco42•3w ago
Hey this looks cool. So each agent or session is one thread. Nice. I like it.
0x696C6961•3w ago
MCP let's you hide secrets from the LLM
pylotlight•3w ago
you can do same thing with cli via env vars no?
verdverm•3w ago
Yes, I'm using Dagger and it has great secret support, obfuscating them even if the agent, for example, cats the contents of a key file, it will never be able to read or print the secret value itself

tl;Dr there are a lot of ways to keep secret contents away from your agent, some without actually having to keep them "physically" separate

cosinusalpha•3w ago
I am also not sure if MCP will eventually be fixed to allow more control over context, or if the CLI approach really is the future for Agentic AI.

Nevertheless, I prefer the CLI for other reasons: it is built for humans and is much easier to debug.

binalpatel•3w ago
100% - sharing CLIs with the agent has felt like another channel to interact with them once I’ve done it enough, like a task manager the agent and I can both use using the same interface
cjp•3w ago
Have a look at code mode mcp. https://github.com/universal-tool-calling-protocol/code-mode
fudged71•3w ago
Thank you for posting binsmith, I've built something similar over the past few days and you've made some great decisions in here
grigio•3w ago
is there a benchmark? there are a lot of scraping agents nowdays..
cosinusalpha•3w ago
I don't have an objective benchmark yet. I tried several existing solutions, especially the MCP servers for browser automation, and none of them were able to reproducibly solve my specific task.

An objective benchmark is a great idea, especially to compare webctl against other similar CLI-based tools. I'll definitely look into how to set that up.

randito•3w ago
If you look at Elixir keynote for Phoenix.new -- a cool agentic coding tool -- you'll see some hints about a browser control using a API tool call. It's called "web" in the video.

Video: https://youtu.be/ojL_VHc4gLk?t=2132

More discussion: https://simonwillison.net/2025/Jun/23/phoenix-new/

desireco42•3w ago
How are you holding session if every command is issues through cli? I assume this is essential for automation.
cosinusalpha•3w ago
A background daemon holds the session state between different CLI calls. This daemon is started automatically on the first webctl call and auto-closes after a timeout period of inactivity to save resources.
desireco42•3w ago
I see, nice. Is there a way to run multiple sessions?
cosinusalpha•3w ago
Yes, you can create isolated environments using the "--session NAME" flag.

It isolates cookies and local storage for that specific run. Since it's a V1 release, there might be some edge cases in the session isolation - if you hit any, please open an issue!

the_mitsuhiko•3w ago
At this point I'm fully down the path of the agent just maintaining his own tools. I have a browser skill that continues to evolve as I use it. Beats every alternative I have tried so far.
kinduff•3w ago
whats the name of the skill?
lgas•3w ago
why would that matter?
dtkav•3w ago
Same. Claude Opus 4.5 one-shots the basics of chrome debug protocol, and then you can go from there.

Plus, now it is personal software... just keep asking it to improve the skill based on you usage. Bake in domain knowledge or business logic or whatever you want.

I'm using this for e2e testing and debugging Obsidian plugins and it is starting to understand Obsidian inside and out.

chrisweekly•3w ago
Cool! Have you written more about this? (EDIT: from your profile, is that what https://relay.md is about?)
dtkav•3w ago
https://relay.md is a company I'm working on for shared knowledge management/ AI context for teams, and the Obsidian plugin is what i am driving with my live-debug and obsidian-e2e skills.

I can try to write it up (I am a bit behind this week though...), but I basically opened claude code and said "write a new skill that uses the chrome debug protocol to drive end to end tests in Obsidian" and then whenever it had problems I said "fix the skill to look up the element at the x,y coordinate before clicking" or whatever.

Skills are just markdown files, sometimes accompanied by scripts, so they work really naturally with Obsidian.

chrisweekly•3w ago
Hey FWIW Relay is AWESOME!! The granular sharing of a given dir within a vault (vs the whole thing) finally solves the split-brain problem of personal (private) vault on my own hardware vs mandated use of a company laptop... it's fast, intuitive, and SOLVES this long-time thorn in my side. Thanks for creating it, high five, hope it leads to massive success for you! :)
dtkav•3w ago
Thank you for the kind words <3
dtkav•3w ago
Sorry it took me a while. Hopefully this helps:

https://notes.danielgk.com/Obsidian/Obsidian+E2E+testing+Cla...

chrisweekly•2w ago
Thanks! It does help, it's a great blog. You shld consider posting a "show hn".
cosinusalpha•3w ago
Do you experience any context pollution with that approach?
the_mitsuhiko•3w ago
Not really. less bad than the mcps i used.
dtkav•3w ago
Writing your own skill is actually a lot better for context efficiency.

Your skill will be tuned to your use case over time, so if there's something that you do a lot you can hide most of the back-and-forth behind the python script / cli tool.

You can even improve the skill by saying "I want to be more token efficient, please review our chat logs for usage of our skill and factor out common operations into new functions".

If anything context waste/rot comes from documentation of features that other people need but you don't. The skill should be a sharp knife, not a multi-tool.

gregpr07•3w ago
Creator of Browser Use here, this is cool, really innovative approach with ARIA roles. One idea we have been playing around with a lot is just giving the LLM raw html and a really good way to traverse it - no heuristics, just BS4. Seems to work well, but much more expensive than the current prod ready [index]<div ... notation
cosinusalpha•3w ago
Thanks!

I actually tried a raw HTML when I was exploring solutions. It worked for "one-off" tasks, but I ran into major issues with replayability on modern SPAs.

In React apps, the raw DOM structure and auto-generated IDs shift so frequently that a script generated from "Raw HTML" often breaks 10 minutes later. I found ARIA/semantics to be the only stable contract that persists across re-renders.

You mentioned the raw HTML approach is "expensive". Did you feed the full HTML into the context, or did you create a BS4 "tool" for the LLM to query the raw HTML dynamically?

TheTaytay•3w ago
I really like this idea!

I’d like to see this other browser plugin’s API be exposed via your same CLI, so I don’t have to only control a separate browser instance. https://github.com/remorses/playwriter (I haven’t investigated enough to know how feasible it is, but as I was reading about your tool, I immediately wanted to control existing tabs from my main browser, rather than “just” a debug-driven separate browser instance.)

cosinusalpha•3w ago
Thanks! To clarify: webctl allows you to manually interact with the browser window at any time. It even returns "manual interaction" breakpoints to stdout if it detects an SSO/login wall.

But I agree, attaching to the OS "daily driver" instance specifically would be a nice addition.

Software factories and the agentic moment

https://factory.strongdm.ai/
39•mellosouls•3h ago•32 comments

Al Lowe on model trains, funny deaths and working with Disney

https://spillhistorie.no/2026/02/06/interview-with-sierra-veteran-al-lowe/
36•thelok•2h ago•3 comments

Hoot: Scheme on WebAssembly

https://www.spritely.institute/hoot/
95•AlexeyBrin•5h ago•17 comments

First Proof

https://arxiv.org/abs/2602.05192
46•samasblack•2h ago•34 comments

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
787•klaussilveira•20h ago•241 comments

StrongDM's AI team build serious software without even looking at the code

https://simonwillison.net/2026/Feb/7/software-factory/
29•simonw•2h ago•37 comments

Stories from 25 Years of Software Development

https://susam.net/twenty-five-years-of-computing.html
37•vinhnx•3h ago•4 comments

Reinforcement Learning from Human Feedback

https://arxiv.org/abs/2504.12501
59•onurkanbkrc•5h ago•4 comments

Start all of your commands with a comma (2009)

https://rhodesmill.org/brandon/2009/commands-with-comma/
456•theblazehen•2d ago•163 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
1037•xnx•1d ago•587 comments

France's homegrown open source online office suite

https://github.com/suitenumerique
496•nar001•4h ago•232 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
176•jesperordrup•10h ago•65 comments

Coding agents have replaced every framework I used

https://blog.alaindichiappari.dev/p/software-engineering-is-back
182•alainrk•5h ago•269 comments

A Fresh Look at IBM 3270 Information Display System

https://www.rs-online.com/designspark/a-fresh-look-at-ibm-3270-information-display-system
27•rbanffy•4d ago•5 comments

The AI boom is causing shortages everywhere else

https://www.washingtonpost.com/technology/2026/02/07/ai-spending-economy-shortages/
59•1vuio0pswjnm7•6h ago•56 comments

72M Points of Interest

https://tech.marksblogg.com/overture-places-pois.html
18•marklit•5d ago•0 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
107•videotopia•4d ago•27 comments

Where did all the starships go?

https://www.datawrapper.de/blog/science-fiction-decline
56•speckx•4d ago•62 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
267•isitcontent•20h ago•33 comments

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
280•dmpetrov•21h ago•148 comments

Learning from context is harder than we thought

https://hy.tencent.com/research/100025?langVersion=en
196•limoce•4d ago•105 comments

Making geo joins faster with H3 indexes

https://floedb.ai/blog/how-we-made-geo-joins-400-faster-with-h3-indexes
152•matheusalmeida•2d ago•46 comments

British drivers over 70 to face eye tests every three years

https://www.bbc.com/news/articles/c205nxy0p31o
165•bookofjoe•2h ago•150 comments

What Is Stoicism?

https://stoacentral.com/guides/what-is-stoicism
10•0xmattf•2h ago•5 comments

Ga68, a GNU Algol 68 Compiler

https://fosdem.org/2026/schedule/event/PEXRTN-ga68-intro/
37•matt_d•4d ago•12 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
547•todsacerdoti•1d ago•266 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
422•ostacke•1d ago•110 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
365•vecti•22h ago•167 comments

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
462•lstoll•1d ago•305 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
339•eljojo•23h ago•209 comments