21st-cli-use
Installation
SKILL.md
21st CLI — find, install & generate from the terminal
The 21st CLI (npx @21st-dev/cli, bin 21st) is the command-line surface for
the 21st.dev catalog. Search first, install what fits, and only hand-write UI
when nothing matches. To publish your own components/themes/templates, use
the 21st-registry skill; to publish a project's design as a theme, use
21st-design-sync.
Auth (do this once)
Two interchangeable credentials, both sent as the API key:
- Login session —
npx @21st-dev/cli loginopens the browser and saves a token to~/.config/21st/auth.json. Best for interactive/dev machines. - API key —
21st_sk_…from https://21st.dev/mcp (or https://21st.dev/settings/api-keys). Pass via--api-key <key>or theTWENTYFIRST_TOKEN/API_KEY_21STenv var. Best for CI.