Skip to main content
Run 21st help (or any command with --help) for inline usage. Add --json to most read commands for machine-readable output.

Auth & account

CommandDescription
21st loginBrowser sign-in, saved to ~/.config/21st/auth.json
21st logoutClear the saved session
21st whoamiShow the signed-in account
21st usageTier + remaining free quota
Credential order: --token/--api-key flag → TWENTYFIRST_TOKENAPI_KEY_21ST → stored login.

Find & install

CommandDescription
21st search <query>Search components, themes, templates (free)
21st logo <query>Search brand + UI SVG logos (free, no login)
21st get <id>Fetch a component’s code + demo
21st theme <id>Fetch a theme’s CSS (free)
21st add <user>/<slug>Install via npx shadcn@latest add (--print to just print)
See Find & install for all search flags.

Bookmarks, lists & teams

CommandDescription
21st bookmarksList your bookmarks
21st bookmark <id> --type <kind>Bookmark / unbookmark (--remove)
21st listsYour named lists
21st list <listId>Items in a list
21st list-new <name>Create a list
21st list-add <listId> <id> --type <kind>Add / remove (--remove) an item
21st teamsYour teams
21st team <teamId>A team’s libraries
21st team-lists <teamId>A team’s shared lists
21st team-components <teamId>Components in a team library (--library <id>)

Generate with 21st AI

CommandDescription
21st generate <prompt>Start a generation, open preview (uses credits)
21st generation <projectId>List a generation’s drafts (free)
21st iterate <projectId> "<change>"Refine a draft, --take N (uses credits)
21st take <projectId>Grab a draft’s code, --take N, --code (free)
See Generate with 21st AI.

Publish & manage

CommandDescription
21st publish <file> --description "…"Publish a component
21st publish-theme <file.css> --name "…"Publish a theme (needs :root + .dark)
21st publish-template <name> --site <url> --preview <img>Submit a template listing
21st edit <id|slug> --type <kind>Update name / description / tags / visibility
21st delete <id|slug> --type <kind> --yesUnpublish (component/theme) or delete (template)
Publishing and management commands require a secret API key (21st_sk_…), not a login session. See Publish & manage.

Profile

CommandDescription
21st profile getRead your bento board as blocks
21st profile set --file <json>Replace the board (--clear to reset)
21st profile upload <image>Upload media, print its URL
See Your profile.

Editor & MCP setup

CommandDescription
21st init --client <name>Print MCP config (--write to save)
21st install-skillInstall the global 21st.dev skills
21st helpFull help text
See Editor & MCP setup.