Skip to content
Start free
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_..."

Run a multi-source research task:

Terminal window
tabstack agent research "latest developments in quantum computing"

Convert a public 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

Pause an automation to supply form values the agent cannot know, then resume by request ID:

Terminal window
tabstack agent automate "Sign up for the newsletter and confirm the success message" \
--url https://example.com --interactive
tabstack agent input <request-id> \
--data '{"fields":[{"ref":"field1","value":"yes"}]}'

Hosted automation runs on public websites and cannot log in, so use this for public forms rather than authenticated flows. See the interactive mode guide for the full pause/resume flow.

The CLI ships a client for the Tabstack schema library: ready-made extraction schemas you can pull locally and pass to extract or generate by name.

Terminal window
# Browse the library, or just what you have already pulled
tabstack schema list
tabstack schema list --local
# Pull by name, by category, or by full path
tabstack schema pull job-posting
tabstack schema pull jobs
tabstack schema pull jobs/job-posting.json
tabstack schema pull --all
# Then reference it by name instead of spelling out a file
tabstack extract json https://example.com/careers/1 --schema-name job-posting

--schema-name resolves against the local store and never hits the network, so it works offline once a schema is pulled. A name matching more than one stored schema is rejected; pass the full category/name.json path to disambiguate.

Keep a project-local store by pointing both commands at the same directory:

Terminal window
tabstack schema pull product-listing --storage ./schemas
tabstack extract json https://example.com --schema-name product-listing --storage ./schemas

Pull records what it fetched, so you can see how your copies relate to the library:

Terminal window
tabstack schema status # "modified" means your edits, "outdated" means upstream changed
tabstack schema status --local # skip the network, flag local edits only
tabstack schema path job-posting
tabstack schema rm job-posting

A pulled schema is a starting point, not a finished one. Schema design covers how to adapt one to the pages you are actually extracting from.


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