A command-line client for the Tabstack AI API: browser automation, web research, and structured extraction and generation from any URL.
macOS / Linux — quickest:
git clone https://github.com/Mozilla-Ocho/tabstack-cli.git
cd tabstack-cli
make install-local # builds and copies to /usr/local/bin — works in any terminal immediatelyPre-built binaries (no Go required) are available on the Releases page once a tagged release is cut.
Go developers (go install puts the binary in $GOPATH/bin, usually ~/go/bin):
go install github.com/Mozilla-Ocho/tabstack-cli/cmd/tabstack@latestIf tabstack is not found after that, add ~/go/bin to your PATH:
# Add to ~/.zshrc or ~/.bashrc and restart your terminal
export PATH="$HOME/go/bin:$PATH"Get an API key from your Tabstack account, then store it:
tabstack auth login # prompts for the key, saves it to the config file
tabstack auth status # shows how your key is being resolved (never prints it)A key can come from three sources, highest precedence first:
--api-keyflagTABSTACK_API_KEYenvironment variable- config file at
$XDG_CONFIG_HOME/tabstack/config.toml(defaults to~/.config/tabstack/config.toml)
The base URL can likewise be set with --base-url or TABSTACK_BASE_URL.
# Convert a page to clean Markdown
tabstack extract markdown https://example.com --metadata
# Extract structured data shaped by a JSON schema
tabstack extract json https://example.com --schema @schema.json
tabstack extract json https://example.com --schema '{"type":"object","properties":{"title":{"type":"string"}}}'# Fetch a page and transform it with AI into your schema
tabstack generate json https://example.com \
--instructions "Summarise the article and list key points." \
--schema @schema.json# Browser automation (streams progress events)
tabstack agent automate "Find the pricing for the Pro plan" --url https://example.com
# Web research (streams progress; prints a report with cited sources)
tabstack agent research "What is the capital of France?" --mode fast
# Respond to a paused automation that asked for input (provide field values)
tabstack agent input <request-id> --data '{"fields":[{"ref":"field1","value":"yes"}]}'
# Or decline the request
tabstack agent input <request-id> --data '{"cancelled":true}'--schema, --instructions, and --data all accept a literal string, @file
to read a file, or - to read from stdin.
Output is pretty (styled, human-readable) on a terminal and JSON when
piped, so it composes with tools like jq:
tabstack extract markdown https://example.com | jq .Force a mode with -o/--output pretty|json, or disable colour with --no-color
(or the NO_COLOR env var). Streaming commands emit one NDJSON line per event in
JSON mode.
| Code | Meaning |
|---|---|
0 |
success |
1 |
runtime / network error |
2 |
usage / invalid input |
3 |
API error or in-band task failure |
These make the CLI scriptable — branch on the exit status to tell a bad request from a network failure from an API rejection.
make build # build into ./bin
make test # go test ./...
make lint # gofmt -w . && go vet ./...
make smoke # live API smoke test (needs a key; SKIP_AGENT=1 to skip costly calls)
make help # list all targetsSee CLAUDE.md for an architecture overview. The API surface is described in openapi.yaml.
Contributions are welcome — see CONTRIBUTING.md. This project follows the Mozilla Community Participation Guidelines. To report a security issue, see SECURITY.md.
Tagged releases (vMAJOR.MINOR.PATCH) build cross-platform binaries via
goreleaser. Build a local snapshot with make snapshot.