Skip to content
Get started
Getting Started

Tabstack CLI

Use the full Tabstack API from your terminal. The Tabstack CLI is a single, dependency-free binary for browser automation, web research, and structured extraction, built for shell workflows and CI.

The Tabstack CLI brings every Tabstack capability to your terminal: markdown and structured extraction, AI generation, browser automation, and web research. It’s a single static binary with no runtime dependencies, so it drops cleanly into shell scripts, Makefiles, and CI pipelines.

Output is human-readable when you run it in a terminal and switches to JSON automatically when piped, so the same command reads well by hand and parses cleanly in a script.

The CLI is open source on GitHub.


Install the latest release with the install script:

Terminal window
curl -fsSL https://tabstack.ai/install.sh | sh

This downloads the right prebuilt binary for your platform (macOS, Linux, Windows) and puts tabstack on your PATH.

Verify the install:

Terminal window
tabstack --version

You’ll need a Tabstack API key first (get one at tabstack.ai).

Log in once and the key is saved to your config file:

Terminal window
tabstack auth login # prompts for your API key
tabstack auth status # shows how the key is being resolved

The CLI resolves your API key in this order of precedence:

  1. --api-key flag
  2. TABSTACK_API_KEY environment variable
  3. Config file at ~/.config/tabstack/config.toml (created with 0600 permissions)

For CI and scripts, set the environment variable instead of logging in:

Terminal window
export TABSTACK_API_KEY="sk_..."

Convert any URL to clean markdown:

Terminal window
tabstack extract markdown https://example.com --metadata

Pull structured data from a page against a JSON schema:

Terminal window
tabstack extract json https://example.com --schema @schema.json

Generate structured output from a page using natural-language instructions plus a schema:

Terminal window
tabstack generate json https://example.com \
--instructions "Extract the product name, price, and availability" \
--schema @schema.json

Drive a browser with a natural-language task:

Terminal window
tabstack agent automate "Find the price of the Pro plan" --url https://example.com

Run a multi-source research task:

Terminal window
tabstack agent research "latest developments in quantum computing" --mode balanced

Pause an automation to supply input mid-run (logins, forms), then resume by request ID:

Terminal window
tabstack agent automate "Log in and download the latest invoice" \
--url https://example.com --interactive
tabstack agent input <request-id> \
--data '{"fields":[{"ref":"field1","value":"yes"}]}'

See the interactive mode guide for the full pause/resume flow.


These flags work across the commands above:

FlagDescription
--effort {min|standard|max}Trade speed against capability. See effort levels.
--geo <CC>Route the request through a country (ISO 3166-1 alpha-2). See geotargeting.
--nocacheBypass the cache and fetch fresh.
-o, --output {pretty|json}Force the output format (auto-detected by default).
--timeout <dur>Request timeout, e.g. 30s.
--no-colorDisable colored output.

The --schema, --instructions, and --data flags all accept three input forms:

  • A literal string, like --instructions "Extract the title"
  • A file with @, like --schema @schema.json
  • stdin with - (like curl), as in --schema -
Terminal window
cat schema.json | tabstack extract json https://example.com --schema -

Output auto-detects context: pretty for terminals, JSON when piped. Pipe straight into jq:

Terminal window
tabstack extract markdown https://example.com | jq .

Exit codes make the CLI safe to branch on in scripts:

CodeMeaning
0Success
1Runtime / network error
2Usage / invalid input (e.g. missing API key)
3API error or task failure
Terminal window
if tabstack extract json "$URL" --schema @schema.json > out.json; then
echo "extracted"
else
echo "failed with exit $?"
fi