🟒 Docs β†’ context

You get: any docs page as clean markdown. Pairs with: your clipboard, your agent’s context window, a 100Γ— token discount.

tabstack extract markdown https://bun.sh/docs/api/spawn | jq -r .content | pbcopy

What it does

Fetches the page, strips everything that isn’t content β€” nav, ads, footers, cookie banners, sidebars β€” and returns clean markdown. What goes to your clipboard (or your agent) is the actual documentation, not 400KB of div soup.

Why it matters for agents

When you feed a raw HTML page to an LLM, most of the tokens are noise. A typical docs page is 80–90% chrome. extract markdown returns only the signal β€” the prose, the code examples, the headings. That’s a 10–100Γ— reduction in tokens for the same information.

# Feed a library's API docs directly to an agent
tabstack extract markdown https://docs.stripe.com/api/charges/create 
  | jq -r .content

Batch multiple pages

for path in /api/charges/create /api/refunds/create /api/customers/create; do
  tabstack extract markdown "https://docs.stripe.com$path" | jq -r .content
  echo "---"
done > stripe-context.md

Pipe into your editor

# Neovim β€” paste directly into a buffer
tabstack extract markdown https://svelte.dev/docs/kit/routing 
  | jq -r .content | nvim -

# VS Code β€” open as a new file
tabstack extract markdown https://example.com/docs 
  | jq -r .content > /tmp/docs.md && code /tmp/docs.md

The JSON envelope

When piped, the output is {"url": "...", "content": "..."}. The jq -r .content unwraps the markdown. Without the jq, you get the full envelope β€” useful when you need the URL alongside the content in a pipeline.