Command Line
Install and use the Teak CLI from your terminal
The Teak CLI lets you save, search, favorite, update, and delete cards without leaving your terminal.
Install
npm i -g teak-clibun add -g teak-clinpx teak-cli@latest --helpAfter installing globally, the teak command is available on your PATH.
Authentication
Run:
teak loginTeak opens your browser to authorize the CLI and stores the credentials locally so you stay signed in across sessions.
Set TEAK_API_KEY to skip interactive sign-in in scripts and CI:
TEAK_API_KEY=teakapi_... teak ls --jsonGenerate and manage API keys in Teak Settings → Manage API Keys.
teak logout
teak logout removes stored credentials from your machine.
To invalidate the CLI credentials on the server as well, disconnect Teak CLI
from Teak Settings → Connected apps.
Commands
teak add "A note from the terminal" --tags research
teak add --url https://example.com --tags research,web
teak add --file ./screenshot.png --notes "Inspiration" --tags inspiration
teak add --file ./component.tsx --tags source
teak ls
teak search "blue buttons"
teak cards get <card-id>
teak cards update <card-id> --tags design,reference
teak fav <card-id>
teak rm <card-id>
teak tags
teak add also accepts a bare URL or file path as the positional argument (for
example teak add https://example.com) — the CLI detects whether it’s text,
a URL, or a file. Use --url / --file when you want to be explicit or when
scripting.
File uploads support source and design-token files, Markdown and MDX, ZIP archives, PDF and Office documents, SVG, HEIC, animated GIF, WebM/MP4, Figma .fig, and common image/audio formats. .md and .markdown files become editable text cards, must be valid UTF-8, and are limited to 512 KiB; .mdx remains a document. Other supported files allow up to 100 MB.
Text passed to teak add, including standard input, is stored as raw Markdown exactly as submitted. Text cards have a 512 KiB UTF-8 limit.
Getting help
Run any command with --help to see available options:
teak --help
teak add --help
teak search --help
Output Format
By default, commands print human-readable output. Add --json to any command for machine-readable JSON, useful for piping into jq or other tools:
teak search "buttons" --json | jq '.[].url'
Troubleshooting
teak: command not found
- Confirm the package installed globally:
npm ls -g teak-cli - Make sure your npm global bin directory is in your
PATH.
Login opens the browser but never completes
- Check your internet connection.
- Try again in case the local callback port was already in use.
- As a fallback, use
TEAK_API_KEYwith a key from Settings.
Commands return "Unauthorized"
- Run
teak loginto refresh your session. - If using
TEAK_API_KEY, confirm the key is still active in Teak Settings.
Still stuck?
Reach out via Support.