Loading...
Loading...
Generate and iterate on UI with 21st AI from the terminal via the `21st` CLI (`@21st-dev/cli`): sketch a UI from a prompt, preview the variants in the browser, edit any variant in place with a natural-language change, and pull the final code into the project. Use whenever the user wants to BUILD / SKETCH new UI ("sketch a pricing page", "generate a hero with 21st", "make me a <X> section"), ITERATE on a generated draft ("edit the third variant", "add a toggle to that take"), or GRAB the code of a draft ("pull that variant's code", "сгенери UI на 21st", "поправь третий вариант", "забери код того наброска"). For finding/installing existing components use the `21st-cli-use` skill; to publish your own, `21st-registry`.
npx skill4agent add 21st-dev/skill 21st-ai21st21st login21st_sk_--api-keyTWENTYFIRST_TOKEN21st usage21st-cli-use# 1) Sketch — generate variants ("takes") from a prompt. Opens the preview in
# the browser and prints the projectId.
21st generate "a pricing section with 3 tiers and a monthly/annual toggle"
# 2) List the takes (1-based numbers + whether each has rendered yet).
21st generation <projectId>
# 3) Edit ONE take in place with a natural-language change (PAID — see Metering).
21st iterate <projectId> "make it enterprise-flavored, add an annual toggle" --take 3
# 4) Grab the code to bring into the project (FREE).
21st take <projectId> --take 3 # paste-ready copy-prompt (recommended)
21st take <projectId> --take 3 --code # raw self-contained HTML insteadgenerateiterate--take N--code21st usagegeneratemode: "sketch"get_generationiterate_generationget_takeiterate_generationhtmlcopyPrompt21st init --client <name> --writegeneration--take