# CLI URL: /docs/cli Scaffold projects, add components, and manage updates from the command line. Use the `assistant-ui` CLI to quickly set up new projects and add components to existing ones. init \[#init] Use the `init` command to initialize configuration and dependencies for a new project. The `init` command installs dependencies, adds components, and configures your project for assistant-ui. ```bash npx assistant-ui@latest init ``` This will: * Detect if you have an existing project with a `package.json` * Use `shadcn add` to install the assistant-ui quick-start component * Add the default assistant-ui components (thread, composer, etc.) to your project * Configure TypeScript paths and imports **When to use:** * Adding assistant-ui to an **existing** Next.js project * First-time setup in a project with `package.json` **Options** ```bash Usage: assistant-ui init [options] initialize assistant-ui in a new or existing project Options: -c, --cwd the working directory. defaults to the current directory. -h, --help display help for command ``` create \[#create] Use the `create` command to scaffold a new Next.js project with assistant-ui pre-configured. ```bash npx assistant-ui@latest create [project-directory] ``` This command scaffolds a project from assistant-ui starter templates or examples. **Available Templates** | Template | Description | Command | | ------------- | ------------------------------------ | ---------------------------------------- | | `default` | Default template with Vercel AI SDK | `npx assistant-ui create` | | `minimal` | Bare-bones starting point | `npx assistant-ui create -t minimal` | | `cloud` | Cloud-backed persistence starter | `npx assistant-ui create -t cloud` | | `cloud-clerk` | Cloud-backed starter with Clerk auth | `npx assistant-ui create -t cloud-clerk` | | `langgraph` | LangGraph starter template | `npx assistant-ui create -t langgraph` | | `mcp` | MCP starter template | `npx assistant-ui create -t mcp` | **Available Examples** Use `--example` to create a project from one of the monorepo examples with full feature demonstrations: | Example | Description | Command | | -------------------------- | ----------------------------------------- | ------------------------------------------------------------ | | `with-ai-sdk-v6` | Vercel AI SDK v6 integration | `npx assistant-ui create my-app -e with-ai-sdk-v6` | | `with-artifacts` | HTML artifact rendering with live preview | `npx assistant-ui create my-app -e with-artifacts` | | `with-langgraph` | LangGraph agent with custom tools | `npx assistant-ui create my-app -e with-langgraph` | | `with-cloud` | Assistant Cloud persistence | `npx assistant-ui create my-app -e with-cloud` | | `with-ag-ui` | AG-UI protocol integration | `npx assistant-ui create my-app -e with-ag-ui` | | `with-assistant-transport` | Custom backend via Assistant Transport | `npx assistant-ui create my-app -e with-assistant-transport` | | `with-chain-of-thought` | Chain-of-thought with JS execution | `npx assistant-ui create my-app -e with-chain-of-thought` | | `with-external-store` | External message store | `npx assistant-ui create my-app -e with-external-store` | | `with-custom-thread-list` | Custom thread list UI | `npx assistant-ui create my-app -e with-custom-thread-list` | | `with-react-hook-form` | React Hook Form integration | `npx assistant-ui create my-app -e with-react-hook-form` | | `with-ffmpeg` | FFmpeg video processing tool | `npx assistant-ui create my-app -e with-ffmpeg` | | `with-elevenlabs-scribe` | ElevenLabs voice transcription | `npx assistant-ui create my-app -e with-elevenlabs-scribe` | | `with-parent-id-grouping` | Message part grouping | `npx assistant-ui create my-app -e with-parent-id-grouping` | | `with-expo` | Expo / React Native | `npx assistant-ui create my-app -e with-expo` | | `with-react-ink` | Terminal UI chat | `npx assistant-ui create my-app -e with-react-ink` | | `with-react-router` | React Router v7 integration | `npx assistant-ui create my-app -e with-react-router` | | `with-tanstack` | TanStack Start integration | `npx assistant-ui create my-app -e with-tanstack` | **Examples** ```bash # Create with default template npx assistant-ui@latest create my-app # Create with cloud template npx assistant-ui@latest create my-app -t cloud # Create with cloud + clerk template npx assistant-ui@latest create my-app -t cloud-clerk # Create from an example npx assistant-ui@latest create my-app --example with-langgraph # Create with specific package manager npx assistant-ui@latest create my-app --use-pnpm # Skip package installation npx assistant-ui@latest create my-app --skip-install ``` **Options** ```bash Usage: assistant-ui create [project-directory] [options] create a new project Arguments: project-directory name of the project directory Options: -t, --template