# CLI URL: /docs/cli Scaffold projects, add components, and manage updates from the command line. *** title: CLI description: 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 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 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 uses `create-next-app` with assistant-ui starter templates. **Available Templates** | Template | Description | Command | | ----------- | ------------------------------------ | -------------------------------------- | | `default` | Basic setup with Vercel AI SDK | `npx assistant-ui create` | | `cloud` | With Assistant Cloud for persistence | `npx assistant-ui create -t cloud` | | `langgraph` | LangGraph integration | `npx assistant-ui create -t langgraph` | | `mcp` | Model Context Protocol support | `npx assistant-ui create -t mcp` | **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 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