{"slug": "giving-your-agents-a-terminal-a-first-look-at-the-tabstack-cli", "title": "Giving your agents a terminal: a first look at the tabstack CLI", "summary": "Mozilla released the tabstack CLI, a single Go binary that wraps the Tabstack AI API to turn any URL into clean Markdown or schema-shaped JSON, run natural-language browser automation, and answer research questions with cited sources. The tool ships as a static binary for macOS, Linux, and Windows, with credential handling via flag, environment variable, or config file. Commands follow a predictable `tabstack <group> <action> <target>` pattern, including structured extraction with JSON schema support.", "body_md": "Every project I touch lately ends up needing the same awkward thing: a reliable way to pull the web into a script or an agent. Not a brittle scrape held together with CSS selectors and hope, but something that takes a URL and hands back clean, structured text I can actually pipe into the next step. I have built that wrapper more than once, and it is never as small as you think it will be. So when Mozilla dropped the `tabstack`\n\nCLI, a single Go binary that wraps the Tabstack AI API, I wanted to spend a proper afternoon with it.\n\nThe pitch on the README is direct: every web interaction your agent or stack needs, from the terminal or a script. It turns any URL into clean Markdown or schema-shaped JSON, runs natural-language browser automation, and answers research questions with cited sources. The part that made me sit up is that the output is pretty in a terminal and pipeable into `jq`\n\nwithout a flag. That is a small detail, and it tells you the people who built it actually live on the command line.\n\nLet me walk you through it the way I poked at it myself.\n\nThere is no runtime to install and nothing to bootstrap, because it ships as a single static binary built for macOS, Linux, and Windows. The quickest route is the install script:\n\n```\ncurl -fsSL https://tabstack.ai/install.sh | sh\n```\n\nThat fetches the right binary for your platform and puts it on your `PATH`\n\n, and you are ready to go. If you would rather not pipe a script into your shell, there are a couple of alternatives. With Go on your machine you can use:\n\n```\ngo install github.com/Mozilla-Ocho/tabstack-cli/cmd/tabstack@latest\n```\n\nThat drops the binary in `$GOPATH/bin`\n\n, which is usually `~/go/bin`\n\n. If your shell cannot find `tabstack`\n\nafterwards, you almost certainly have not got that directory on your `PATH`\n\n:\n\n```\nexport PATH=\"$HOME/go/bin:$PATH\"\n```\n\nAnd if you want to avoid Go entirely, there are pre-built binaries on the Releases page, or you can clone the repo and run `make install-local`\n\n, which builds it and copies it to `/usr/local/bin`\n\nso it works in any terminal straight away. Several routes, all of them boring in the best possible way.\n\nThis is the bit I want to praise first, because credential handling is where a lot of CLIs get careless. You log in once:\n\n```\ntabstack auth login            # prompts for the key, input hidden, saved to the config file\ntabstack auth status           # shows how your key is being resolved, never prints it\n```\n\nA key can come from three places, and the precedence is exactly the order you would hope for:\n\n`--api-key`\n\nflag`TABSTACK_API_KEY`\n\nenvironment variable`$XDG_CONFIG_HOME/tabstack/config.toml`\n\n, defaulting to `~/.config/tabstack/config.toml`\n\nThe config file is written `0600`\n\n, so it is not world-readable, and `auth status`\n\nwill tell you which source won without ever leaking the value. This is the contract I want from any tool that holds a secret: a flag for one-off overrides, an environment variable for CI, and a locked-down file for everyday local use. If no key is found, the API commands exit with code `2`\n\nand tell you how to set one, rather than failing with a stack trace. We will come back to those exit codes, because they matter.\n\nEvery command follows the same shape: `tabstack <group> <action> <target>`\n\n. Once that clicks, the whole surface area feels predictable.\n\nThe first thing I reached for was `extract`\n\n. At its simplest it converts a page to clean Markdown:\n\n```\ntabstack extract markdown https://example.com --metadata\n```\n\nThe `--metadata`\n\nflag pulls in the title, author, and similar bits alongside the content. Useful, but the version I keep coming back to is structured extraction, where you hand it a JSON schema and it shapes the output to match:\n\n```\ntabstack extract json https://example.com --schema @schema.json\ntabstack extract json https://example.com --schema '{\"type\":\"object\",\"properties\":{\"title\":{\"type\":\"string\"}}}'\n```\n\nNotice the `@schema.json`\n\nsyntax. That `@file`\n\nconvention reads the schema from a file, and it works the same way for the other input flags too. You can pass a literal string, point at a file with `@`\n\n, or read from stdin with `-`\n\n, which is the same ergonomics as `curl -d`\n\n. So this is perfectly valid:\n\n```\necho '{\"type\":\"object\"}' | tabstack extract json https://example.com --schema -\n```\n\nIf you have ever written the glue that decides \"is this argument a path or a literal\", you will appreciate that they solved it once and applied it everywhere.\n\nWhere `extract`\n\npulls what is on the page, `generate`\n\nfetches a page and transforms it with AI into the shape you describe. You give it instructions as well as a schema:\n\n```\ntabstack generate json https://example.com \\\n  --instructions \"Summarise the article and list the key points.\" \\\n  --schema @schema.json\n```\n\nThe mental model I landed on is this: `extract json`\n\nis for getting the data that is genuinely there, and `generate json`\n\nis for asking a model to produce something new from the page, summaries, classifications, restructured points, while still constraining the output to a schema you control. Keeping those two as separate verbs is a good call, because it stops you reaching for the heavier, slower path when all you wanted was the title.\n\nThis is where it stops being a fetch tool and starts being something more interesting. The `agent`\n\ngroup runs server-side and streams progress back as it works.\n\nBrowser automation takes a natural-language task:\n\n```\ntabstack agent automate \"Find the pricing for the Pro plan\" --url https://example.com\n```\n\nResearch searches the web, synthesises an answer, and prints a report with numbered, cited sources:\n\n```\ntabstack agent research \"What are the latest developments in quantum computing?\" --mode balanced\n```\n\nThe feature I did not expect, and rather liked, is interactive automation. You can start a run that is allowed to pause and ask you for input partway through:\n\n```\ntabstack agent automate \"Log in and download the latest invoice\" --url https://example.com --interactive\n```\n\nWhen it pauses, it gives you a request ID, and you answer it with a separate command:\n\n```\ntabstack agent input <request-id> --data '{\"fields\":[{\"ref\":\"field1\",\"value\":\"yes\"}]}'\n```\n\nOr you decline:\n\n```\ntabstack agent input <request-id> --data '{\"cancelled\":true}'\n```\n\nThat `agent input`\n\ncommand only applies to runs started with `--interactive`\n\n. Without the flag, an automation never stops to ask. It is a clean way to handle the reality that some tasks genuinely need a human in the loop, without baking that assumption into every run.\n\nHere is the design decision I keep telling people about. The output is pretty and styled when you are sitting at a terminal, and it switches to JSON automatically when the output is piped. No flag required:\n\n```\ntabstack extract markdown https://example.com | jq .\n```\n\nYou can force a mode with `-o pretty`\n\nor `-o json`\n\nif you want to be explicit, and you can kill colour with `--no-color`\n\nor the `NO_COLOR`\n\nenvironment variable. The streaming commands, `automate`\n\nand `research`\n\n, emit one NDJSON line per event when they are in JSON mode, so you can process events as they arrive rather than waiting for the whole thing to finish.\n\nThe other half of scriptability is the exit codes, and they are thought through:\n\n| Code | Meaning |\n|---|---|\n`0` |\nsuccess |\n`1` |\nruntime or network error |\n`2` |\nusage, invalid input, or missing config such as no API key |\n`3` |\nAPI error or in-band task failure |\n\nDistinct codes mean you can branch on the actual cause in a shell script, telling a bad argument apart from a network blip apart from an API rejection:\n\n```\nif ! tabstack extract markdown \"$url\" > out.md; then\n  case $? in\n    2) echo \"check your arguments\" ;;\n    3) echo \"the API rejected the request\" ;;\n    *) echo \"network or runtime error\" ;;\n  esac\nfi\n```\n\nI cannot tell you how often I have wanted exactly this from a tool and been handed a flat exit `1`\n\nfor every conceivable failure instead.\n\nA few common options round it out. `--effort`\n\nlets you pick the speed and capability tradeoff on `extract`\n\nand `generate`\n\n: `min`\n\nis fastest with no fallback, `standard`\n\nis the balanced default, and `max`\n\ndoes full browser rendering for JavaScript-heavy sites at the cost of taking longer. `--geo GB`\n\nroutes the fetch through a given country using an ISO 3166-1 alpha-2 code, which is handy when a page behaves differently by region. And `--nocache`\n\nbypasses the cache when you need a fresh read.\n\nThe detail that tells you where this is headed is the AGENTS.md file in the repo. The CLI is designed to be driven by LLM agents as well as humans, and that file documents every command, flag, and exit code in a form tuned for machine consumption. If you are wiring `tabstack`\n\ninto Claude Code or your own harness, you point the agent at that file and let it learn the surface area itself.\n\nThis is the right shape for the moment we are in. A well-behaved CLI with predictable verbs, machine-readable output, and meaningful exit codes is exactly the kind of tool an agent can use safely, because every outcome is legible. The same properties that make it pleasant for me at the terminal make it tractable for a model in a loop.\n\nYes, and for a specific reason. The web-access problem keeps showing up in my work, and I have written enough of these wrappers to know the unglamorous parts: credential precedence, the file-or-literal-or-stdin question, knowing whether a failure was mine or theirs, behaving differently when piped. The `tabstack`\n\nCLI has answered all of those the way I would want them answered, and it has done it in a single binary with no runtime to manage. It is v1.0.0, MIT licensed, and it came out of Mozilla, so it is not a weekend experiment you are betting your pipeline on.\n\nIf your stack or your agents need to read the web, give it an afternoon. Start with `tabstack auth login`\n\nand `tabstack extract markdown`\n\non a page you know, and build out from there. The shape of the thing rewards exploration.\n\n*I have a feeling the interesting work is not in the extraction at all, but in what you wire on the other end of that pipe. That is the article I want to write next.*", "url": "https://wpnews.pro/news/giving-your-agents-a-terminal-a-first-look-at-the-tabstack-cli", "canonical_source": "https://dev.to/juststevemcd/giving-your-agents-a-terminal-a-first-look-at-the-tabstack-cli-1fcb", "published_at": "2026-06-16 21:38:57+00:00", "updated_at": "2026-06-16 21:59:38.974142+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "ai-tools"], "entities": ["Mozilla", "Tabstack", "tabstack CLI", "Go"], "alternates": {"html": "https://wpnews.pro/news/giving-your-agents-a-terminal-a-first-look-at-the-tabstack-cli", "markdown": "https://wpnews.pro/news/giving-your-agents-a-terminal-a-first-look-at-the-tabstack-cli.md", "text": "https://wpnews.pro/news/giving-your-agents-a-terminal-a-first-look-at-the-tabstack-cli.txt", "jsonld": "https://wpnews.pro/news/giving-your-agents-a-terminal-a-first-look-at-the-tabstack-cli.jsonld"}}