Command Line
The Teak CLI lets you save, search, favorite, update, and delete cards without leaving your terminal.
Install
Section titled “Install”npm i -g teak-cliAfter installing, the teak command is available globally.
Authentication
Section titled “Authentication”Browser sign-in (recommended)
Section titled “Browser sign-in (recommended)”teak loginOpens your browser to authorize the CLI with your Teak account. Credentials are stored locally so you stay signed in across sessions.
API key (for scripts and CI)
Section titled “API key (for scripts and CI)”Set the TEAK_API_KEY environment variable to skip interactive sign-in:
TEAK_API_KEY=teakapi_... teak ls --jsonGenerate and manage API keys in Teak Settings → Manage API Keys.
Sign out
Section titled “Sign out”teak logoutRemoves stored credentials from your machine.
Commands
Section titled “Commands”teak add "A note from the terminal" --tags researchteak add --url https://example.com --tags research,webteak add --file ./screenshot.png --notes "Inspiration" --tags inspirationteak add --file ./component.tsx --tags sourceteak lsteak search "blue buttons"teak cards get <card-id>teak cards update <card-id> --tags design,referenceteak fav <card-id>teak rm <card-id>teak tagsteak 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 up to 100 MB. The CLI infers the media and card type from the file name, so no type flag is required.
Getting help
Section titled “Getting help”Run any command with --help to see available options:
teak --helpteak add --helpteak search --helpOutput Format
Section titled “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
Section titled “Troubleshooting”teak: command not found
Section titled “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
Section titled “Login opens the browser but never completes”- Check your internet connection.
- Try again — the local callback server occasionally fails to start if the port is in use.
- As a fallback, use
TEAK_API_KEYwith a key from Settings.
Commands return “Unauthorized”
Section titled “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?
Section titled “Still stuck?”Reach out via Support.