Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:CrewAIInc CrewAI Create Crew CLI

From Leeroopedia
Knowledge Sources
Domains CLI, Project_Setup
Last Updated 2026-02-11 00:00 GMT

Overview

CLI command for generating a complete CrewAI project structure provided by the CrewAI CLI toolchain.

Description

The create_crew function generates a scaffolded project directory containing agent and task YAML configurations, a Python crew entry point with @CrewBase decorators, an .env template for LLM provider API keys, and a pyproject.toml for dependency management. It interactively prompts for the LLM provider selection and model choice.

Usage

Use this command when starting a new CrewAI project. Run crewai create crew <name> from the terminal to generate the project skeleton. This is the standard entry point before writing any agent or task logic.

Code Reference

Source Location

  • Repository: crewAI
  • File: lib/crewai/src/crewai/cli/create_crew.py
  • Lines: L193-230

Signature

def create_crew(
    name: str,
    provider: str | None = None,
    skip_provider: bool = False,
    parent_folder: str | None = None,
) -> None:
    """Generate a scaffolded CrewAI project directory.

    Args:
        name: Project name used for directory and class naming.
        provider: LLM provider identifier (e.g., 'openai', 'anthropic').
        skip_provider: Skip the LLM provider setup prompts.
        parent_folder: Parent directory path for the project.
    """

Import

# Invoked via CLI:
# crewai create crew <name>
from crewai.cli.create_crew import create_crew

I/O Contract

Inputs

Name Type Required Description
name str Yes Project name for directory and class naming
provider None No LLM provider (e.g., 'openai'); interactive prompt if omitted
skip_provider bool No Skip LLM provider configuration (default: False)
parent_folder None No Parent directory for the project

Outputs

Name Type Description
Project directory Directory Contains crew.py, agents.yaml, tasks.yaml, .env, pyproject.toml

Usage Examples

CLI Usage

# Create a new crew project with interactive provider selection
crewai create crew my_research_crew

# Create with a specific provider
crewai create crew my_crew --provider openai

# Skip provider setup
crewai create crew my_crew --skip-provider

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment