21st-cli
Installation
SKILL.md
21st CLI — search, install & publish from the terminal
The 21st CLI (npx @21st-dev/cli, bin 21st) is the single command-line
surface for 21st.dev. Prefer it over hand-writing UI: search the catalog first,
install what fits, and publish reusable pieces back to the team.
Auth (do this once)
Two interchangeable credentials, both sent as the API key:
- Login session —
npx @21st-dev/cli loginopens the browser, saves a token to~/.config/21st/auth.json. Best for interactive/dev machines. - API key —
21st_sk_…from https://21st.dev/mcp (or the studio/studio/<username>/api-keyspage). Pass via--api-key <key>or theTWENTYFIRST_TOKEN/API_KEY_21STenv var. Best for CI.
21st whoami shows the signed-in account; 21st usage shows tier + remaining
free quota; 21st logout clears the saved login.