favicon vanhalt.com

Meta's Muse Wonder 1.0

I’ve been doing all my coding tasks with Muse Code from Meta. Their pay-as-you-go model has been perfect for me lately while I’m searching for new job opportunities.

You can get started at https://dev.meta.ai/ — that’s where you install the CLI and manage everything.

Install Muse Code:

curl -fsSL https://dev.meta.ai/install.sh | bash

Once installed, the same portal at https://dev.meta.ai/ also lets you create API keys if you want to use Meta’s models, including Muse Wonder, with other clients and coding tools.

Today I wanted to try the new model, Muse Wonder — which you can use via Muse Code, the Meta Model API, and the Muse agent app — to build something I’ve wanted for a while: a TUI (Terminal User Interface) to manage Obscura browser instances.

My budget was $5. Yes, just $5. Here are the results:

 muse-wonder-1.0 · high · ~/code/obscura-manager · ctx 20% · git main · tokens 15,004,663 · ~$5.46 · YOLO

YOLO is the right way.

The Stack

The Goal

Obscura is powerful, but juggling commands across multiple sessions gets messy. I wanted a keyboard-first control plane that could:

  1. Spawn Obscura tasks with all its CLI flags and functionalities
  2. List all instances and their live state
  3. Centralize outputs in a dedicated folder defined by OBSCURA_ROOT, with an artifacts subfolder for csv, txt, images, etc.
  4. Have a dedicated section for CDP capabilities

Actions Taken

First prompt:

/plan Using https://ratatui.rs/concepts/ as the Terminal User Interface framework. Create a terminal oriented manager for the https://github.com/h4ckf0r0day/obscura browser that supports ALL of its CLI features. The idea of the UI is to:

  • spawn obscura tasks with several actions and functionalities
  • have a list of all the obscura instances and their state
  • have a dedicated folder defined by an environment variable like OBSCURA_ROOT where there would be a folder called “artifacts” for csv, txt, images etc file dumping
  • a dedicated section for the CDP capabilities

Research on the internet for a guide on how to create a great UI/UX experience for the terminal. If you need to further expand the capabilities of the ratatui framework use the following Github repository https://github.com/ratatui/awesome-ratatui

Then I refined the plan with a key constraint:

obscura binary is now on path. It is located at: “$HOME/.local/bin”. No reattached session, once a session is dead. User must spawn a new one

Result 1: The full manager

 ◆ Top finding: the live CDP round-trip now works end to end — two real bugs found during verification 
 (missing WebSocket handshake headers and missing CDP page-session handling) were fixed, and a manager-spawned 
 obscura serve was navigated, evaluated, screenshotted, and killed entirely from the TUI.

  Run it:
    cargo build --release
    OBSCURA_ROOT=~/.local/share/obscura-manager ./target/release/obscura-manager
    # optional: --root <DIR> | OBSCURA_BIN=/path/to/obscura
   What was built — a Ratatui 0.30 + crossterm TUI using The Elm Architecture (main/app/event/tui/ui/update plus cli/config/instance/cdp/artifacts modules):
  • Full live-CLI coverage in src/cli.rs, diffed against obscura 0.2.4 at $HOME/.local/bin/obscura: every global flag plus all fetch (including --file/--concurrency), serve (including --max-connections/--ready-file/--font-dir), scrape, and mcp
    flags, and all documented OBSCURA_* variables in the Config tab.
  • Instance manager with no reattach in src/instance.rs: spawn/stream/kill, Exited/Failed/Killed are terminal, restart spawns a new ID/PID, and stale Running rows load as Exited — spawn a new instance (no reattach).
  • Seven tabs (Dashboard, Tasks with forms for all four kinds, CDP, Artifacts, Config, Logs, Help), keyboard-first (1–7, j/k, n/f/v/p/m, s/r/d, /, ?, q) at ~20 fps measured in the PTY harness.
  • Artifacts under $OBSCURA_ROOT/artifacts/{screenshots,dumps,scrapes,pdfs,exports,logs} with preview/open/delete, per-instance log files, instances.json history, and config.json persistence.

  Live verification (PTY-driven, real binary):
  • Spawned serve from the Tasks form → shown Running; connected in the CDP tab; Page.navigate returned a frameId; Runtime.evaluate document.title returned "Example Domain"; DOM.getDocument returned a node tree.
  • Page.captureScreenshot saved a 63,715-byte PNG to artifacts/screenshots/ and Page.printToPDF saved a 98,351-byte PDF to artifacts/pdfs/. I inspected the PNG visually: it shows the rendered example.com page content.
  • Killing the serve instance from Tasks produced the CDP tab's Disconnected: serve instance died state, instances.json records it as Killed, and q exited cleanly with code 0.
  • An earlier broad PTY sweep additionally exercised fetch/scrape/mcp form submission (fetch dump artifact created), Config editing (OBSCURA_TIMEZONE=Europe/Berlin persisted), tab/key navigation, filtering, and kill-confirm dialogs; the only failing
    harness needle was the literal word "Connected," fragmented by terminal diff rendering — the subsequent successful navigate/evaluate calls prove the connection.

  Gates: cargo test 14 passed, cargo clippy --all-targets -- -D warnings clean, cargo fmt --check clean, release build succeeds.

Second prompt:

The dumps are not working properly and when changing tabs, it doesn’t show the current section we are working with.

Result 2: Two UX bugs fixed

Both are fixed — the tab bar was clipped to zero visible rows, and dumps went to a file the Tasks view never displayed.

Tabs — root cause and fix in src/ui.rs: The tab strip was Length(2) wrapped in a fully-bordered Block, leaving 0 inner rows for the titles. It’s now a 3-row strip with no full border. The active tab renders as black-on-cyan bold ▶ N:Label, plus a yellow ▶ SECTION: <NAME> (n/7 …) banner and a — ▶ <Section> suffix in the header, so you always know where you are.

Dumps — fixes in src/cli.rs, src/update.rs, src/ui.rs, and src/app.rs:

Verification: cargo test 19 passed, clippy and fmt clean. A real terminal emulator confirmed SECTION: follows every tab key, and two quick fetches produced two distinct dumps.

Takeaway

For about $5.46 in usage, I got a ready-to-test Ratatui app with proper CDP handling — the part where these wrappers usually break. The two bugs it caught on its own, WebSocket handshake headers and CDP session handling, would have cost me an afternoon.

If you want to try it: install from https://dev.meta.ai/ with

curl -fsSL https://dev.meta.ai/install.sh | bash # and you can generate API keys there for other clients too.

Github

Obscura Manager

NOTES: This blog post has been edited with https://meta.ai/. Checked grammar errors. You can see hyphens everywhere…