CopilotKit CLI
npm install copilotkit> NOTE: The CopilotKit CLI is an optional tool that enhances the developer experience of CopilotKit. It is not required to use CopilotKit. Click here to get started with CopilotKit..


- Installation
- Commands
- init
- login
- dev
- Need help?
The CopilotKit CLI boosts your CopilotKit development experience. It integrates neatly with Copilot Cloud.
``shnpm
npm install -g copilotkit
Commands
$3
The fastest way to add CopilotKit to your Next.js project is with the init command:
`sh
Navigate to your Next.js project
cd my-nextjs-appRun the init command
copilotkit init
`This interactive command will:
- Set up the required UI components
- Configure AI agents if desired (LangGraph, CrewAI)
- Connect to Copilot Cloud (optional)
- Create all necessary configuration files
You can also pass flags to automate the setup:
`sh
copilotkit init --mode LangGraph
`$3
First, ensure you have an account on Copilot Cloud.
Then, run the following command to authenticate with Copilot Cloud:
`sh
copilotkit login
`$3
The CopilotKit CLI allows you to create a local tunnel to your CopilotKit remote endpoints, agents, and LangGraph apps.
For example, to create a local tunnel to an endpoint running locally on port 8000, you can run:
`sh
copilotkit dev --port 8000
`Need help?
You can always run
copilotkit --help` to get help on the CopilotKit CLI.You're welcome to join our Discord to get help from the CopilotKit team and community.