N2NHU LABS CLI-Browser

CLI-Browser · version 6.2

SlyKissHoTMetaL

A text-mode Chromium browser written in PowerShell. It turns any modern web page, including the JavaScript-heavy admin console on your firewall, into a numbered list you can drive from the keyboard or from an unattended script.

  • PowerShellWindows PowerShell 5.1
  • Chromiumvia Chrome DevTools Protocol
  • RMM-readyHeadless, scriptable

Real screens · version 6.2

For firewalls and the web

Real captures from Windows Terminal. The same engine that drives a firewall console reads any modern website.

SlyKiss HoTMetaL 6.2 start screen: ASCII banner, credits, a TLS notice, and a Where to? address prompt
LaunchStart it and type where to go: a website, a firewall's IP and port, or a bookmark.
Reader mode showing a long news article as clean paragraphs, with a status bar reading lines 251 to 278 of 339
ReaderPress r and a full article becomes clean, pageable text. No ads, no pop-ups.
Browse mode on CNN.com: numbered headlines with item 54 highlighted, and a note that the page was still busy after 20 seconds so HoTMetaL showed what was there
BrowseA busy, JavaScript-heavy news site as numbered lines. When a page never stops loading, HoTMetaL says so and shows you what's there after 20 seconds instead of hanging.

Say it out loud

CLI. CSS. HTML.

The name is a typographic pun on the three layers it works with. Read the acronyms aloud and you get SlyKiss HoTMetaL.

CLISly

The command line: where you live, and where your scripts run.

CSSKiss

The styling layer that decides what's actually visible on the page.

HTMLHoTMetaL

The page itself, melted down and recast as plain, numbered text.

Inspired by the Linotype machine, which changed publishing by casting molten metal into neat slugs of type, one line at a time. HoTMetaL does the same with a modern web page: it takes the chaotic, constantly changing stream of page elements and casts it into a clean, numbered, line-by-line inventory.

The problem it solves

Web consoles went rich. Admin went headless.

The consoles moved to the web

Firewalls, hypervisors and cloud tools now manage everything through JavaScript-heavy single-page web apps. Many settings exist only in the web UI.

The admins moved off the desktop

With RMM platforms like Datto, engineers increasingly run PowerShell jobs on remote endpoints with no interactive desktop at all.

Invoke-WebRequest

Breaks on multi-step logins, session tokens, cookie handshakes and forms the page builds on the fly.

Lynx and w3m

Parse static HTML only. Modern single-page apps render nothing they can read.

Selenium, Puppeteer

Work, but drag in Node.js or WebDriver and a heavy dependency tree you don't want on an unattended endpoint.

HoTMetaL

A real Chromium engine, driven entirely from one PowerShell script. It renders the JavaScript, then hands you the page as structured, numbered text you can act on by hand or by script.

Built to be trusted on production gear

The five laws

When the page you're driving is a live firewall, “close enough” isn't good enough. HoTMetaL enforces five rules, and its built-in self-test checks them.

  1. One namespace

    Every link, button, field, list and checkbox gets one number in one list. A number always means the item in the most recently shown list.

  2. Handles are checked

    Before acting on item 12, HoTMetaL confirms it's still on the page and still has the same fingerprint (kind|tag|label|name). If the page changed underneath you, the command fails instead of clicking the wrong thing.

  3. Dialogs are data

    Browser alert, confirm and prompt boxes never freeze the session. Confirmations answer Cancel by default. Add ! to a command, like 7!, to answer OK for that command only.

  4. Fill is idempotent

    Running 6=on twice leaves the box checked. Running 3=admin twice still leaves one value. Scripts can safely run again.

  5. Nothing is auto-clicked

    No cookie banners, no “Continue,” no “Accept” unless you ask for it with the consent command.

Theory of operation

The browser is a state machine

Everything you type is first parsed into a command value, with no browser involved. That part is pure and is tested offline. Each command is then evaluated as one transition on the browser's state, and it either succeeds or fails.

Commands chain with a semicolon. The next one only runs if the last one succeeded, which is exactly the behavior you want from a script logging into a firewall.

Only one piece of code ever touches the page: a single, ASCII-only JavaScript function called the kernel, run inside Chromium. It knows eight operations:

snapactsettletextarmdisarmmarkconsent
parseLine → [Cmd]Pure. No browser needed.
evalCmd × State → Ok | ErrEvery effect goes through one primitive: the kernel.
seqa ; bb runs only if a is Ok.

Where it fits

HoTMetaL vs. the alternatives

SlyKiss HoTMetaLBrowshLynx / w3mSelenium / Puppeteer
EngineChromium via CDP (Pup module)Headless Firefox + web extensionNone; parses HTMLWebDriver / Node.js runtime
How it worksDeterministic text state machineDraws pixels as terminal charactersStatic HTML renderingProgrammatic code API
RMM & PowerShellNativeRuns headless in PowerShellPoorNeeds local FirefoxPoorExternal shell toolsPoorHeavy runtimes
Firewall grids & framesSpecializedReads jqGrid tables and framesGeneralShows the visual layoutBrokenFails on modern JS appsCustomYou write the code
Human in the loopHands a visible window to you, then resumesInteractive onlyInteractive onlyComplex remote debugging

Browsh is impressive for browsing visually in a terminal, but it's built for human eyes. HoTMetaL turns the browser into structured data, putting scripted control and a small footprint first.

Command reference

Point at a number. Act on it.

Press : in browse mode to type a command, or pass commands to the script with -Exec. Items can be addressed by number or by their label in quotes.

Addressing

12
Activate item 12: click, toggle, or prompt for a value
"Login"
The same, by label: exact match, else a unique partial match
12!
…and answer OK to any confirmation it raises
4=admin
Set a field
4=?
Prompt for the value without echoing it
4=env:FWPASS
Take the value from an environment variable
7=on|off · 9=port3
Set a checkbox · pick from a dropdown

Go

10.1.1.1:4443
An IP and port, a hostname or a full URL
@name
Jump to a bookmark
b · f · reload
Back, forward, reload. Add ! to leave a page that asks “are you sure?”

Look

p · ls [filter]
Page and items; ls in, btn, a, sel, chk filter by type
r · text
Article reader, or the whole page as text
find <re> · opts <n>
Regex search · list a dropdown's options
frames · cert · savehtml
Inspect frames, the TLS certificate, or save the HTML

Forms & tabs

type <n> <text>
Type into a field
secret <n>
Type without echo
submit [n] · enter
Submit a form, or press Enter
key <Tab|Escape…>
Send a key
upload <n> <file>
Attach a file to an upload field
tabs · tab · new · close
Work with several pages at once
bm add · del · <name>
Manage bookmarks

Scripting & output

a ; b ; c
Run in order, stopping at the first failure
run <file|name>
Run a saved .cli script
expect <text>
Wait for text; fail the script if it never appears
wait <sec>
Pause
shot · pdf · dl
Screenshot, PDF, or set the download folder
auth <user>
HTTP Basic sign-in (auth clear to reset)
consent · log · debug
Click a cookie banner on request · view the log

Browse mode keys

Launch it with just an address and you get a Lynx-style screen: arrow keys and Enter, no commands to memorize.

↑ ↓Move the highlight (or j / k)
EnterOpen the highlighted line
12 ⏎Jump straight to item 12
mOpen the site's folded menu
rRead the article as text
tThe whole page as text
/Show only lines with a word
gGo to an address or @bookmark
b fBack and forward
!Press a button and answer OK
vHand over to a visible window
LShow the log of every Chrome call

Made for network gear

It understands admin consoles

Tables that act like tables

Real data rows, including jqGrid grids common on firewalls, are tied to their column headings and table title. Enter selects a row; Enter again opens it, like a double-click.

Frames and shadow DOM

Walks into shadow roots and same-origin frames, while skipping advertising and tracking frames.

Knows when a page is done

Watches background requests and page changes to decide when the page has truly settled, instead of guessing with fixed delays.

New things are marked +

After a click that stays on the same page, anything that appeared (a menu, a panel, an edit form) is marked + and the highlight jumps to it.

Page dialogs take the stage

A firewall's own “Remove user?” box takes over the list while it's open: the question first, then its buttons. Esc closes most of them.

“I'm not a robot”

Tick the box yourself. If the site wants pictures picked, press v: a normal window opens, you answer it, and the session continues headless as you.

Headless automation

A firewall login in one RMM job

HoTMetaL runs inside an ordinary PowerShell component job. It logs into a web console, changes what you tell it to, reads tables and pulls audit data, with no one at the keyboard.

Datto RMM component, one line
.\CLI-Browser.ps1 fw01.corp.local:8443 `
  -Exec '"Username"=admin; "Password"=env:FWPASS; "Login"; expect Dashboard; text' `
  -Dump
Fill username→Password from env→Click Login→Wait for “Dashboard”→Print page text
Saved scripts
.\CLI-Browser.ps1 fw01.corp.local:8443 -Run fortigate-login
# runs ~/.cli-browser/scripts/fortigate-login.cli
-Exec "a; b"Run commands, then exit (non-interactive)
-Run <name>Run a saved .cli script
-DumpPrint the page as text and exit
-VisibleShow the Chromium window
-StrictTlsVerify TLS certificates. Off by default for self-signed firewall consoles; use it on public sites.
-Proxy · -UserAgentRoute through a proxy · set the browser identity
-TimeoutSec 20How long to wait for pages
-ClassicPrompt-style command loop instead of browse mode
-SelfTestRun the offline and live test suites
-OfflineTestRun the parser tests with no browser

Get started

One script. One command.

  • SystemWindows with Windows PowerShell 5.1
  • ModulePup 0.4.5 or newer (PuppeteerSharp). Installed for you from the PowerShell Gallery on first run.
  • BrowserPup downloads its own Chromium on first run. Nothing else to install.
  • TLSOff by default (“firewall mode”), so self-signed admin consoles just work. Add -StrictTls when browsing public sites.
  • FootprintA single .ps1 file. No Node.js, no WebDriver.
~/.cli-browser/bookmarks.json~/.cli-browser/scripts/~/.cli-browser/downloads/~/.cli-browser/debug.log
  1. Download

    Grab CLI-Browser.ps1 from the GitHub repo.

  2. Launch

    Run .\CLI-Browser.ps1 from PowerShell, or use the Start-CLI-Browser.bat launcher. Add an address or leave it off to be asked. The first run installs Pup and its Chromium for you.

  3. Browse

    Type an address like news.google.com or 10.1.1.1:4443. Press ? for help and : for commands.

  4. Check it

    Run .\CLI-Browser.ps1 -SelfTest to run the offline tests plus live tests in headless Chromium, with no network needed.

The web, as text.

Script the consoles that never had an API. Browse from a terminal. Keep a human in the loop only when a human is truly needed.

Designed and coded by Jim Ames, N2NHU Labs, with Claude, Grok, DeepSeek and Google Gemini. Questions or commercial use: jimpames@gmail.com