CLI for yapit.md — fetch clean markdown from URLs, files, and documents.
uv tool install yapit# Create document from URL, print markdown
yapit https://example.com/article
yapit https://arxiv.org/abs/2301.00001
# Local files
yapit paper.pdf
yapit notes.md
# With AI transformation (TTS annotations, spoken readings for math, figure extraction, noise filtering)
yapit paper.pdf --ai
# Fetch existing document
yapit https://yapit.md/listen/<doc-id>
yapit <doc-id> --annotated
# Save to directory with images
yapit <doc-id> -o .
# Stdin
echo "hello world" | yapit -Creating documents or accessing private docs requires a yapit.md account and an API token. Create one in your account settings, then:
export YAPIT_TOKEN=yapit_...The CLI sends it as Authorization: Bearer. Fetching shared documents works without auth.
Point the CLI at your own instance with YAPIT_BASE_URL:
export YAPIT_BASE_URL=http://localhost
yapit fetch paper.pdfYAPIT_BASE_URL is the address you open yapit at in the browser; the CLI calls the API under its /api path.
If your server runs with AUTH_ENABLED=false (the make self-host default), no token is needed. If auth is enabled on your instance, set YAPIT_TOKEN as above. The self-hosting guide in yapit's docs/auth.md shows how to create a token on the server.
-o <dir> saves markdown, TTS annotations, and images:
<dir>/<slug>/
<slug>.md # clean markdown, image paths rewritten to relative
TTS.md # annotated version (yap-speak, yap-show tags)
<slug>-<N>.png # images renamed sequentially
Errors if the output directory already exists.