Skip to content
Teak
Esc
navigateopen⌘Jpreview
On this page

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-cli
bun add -g teak-cli
npx teak-cli@latest --help

After installing globally, the teak command is available on your PATH.

Authentication

Run:

teak login

Teak 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 --json

Generate 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_KEY with a key from Settings.
Commands return "Unauthorized"
  • Run teak login to refresh your session.
  • If using TEAK_API_KEY, confirm the key is still active in Teak Settings.
Still stuck?

Reach out via Support.

Last updated on August 27, 2026

Was this page helpful?