> Discover all available pages from the documentation index: https://mastra.zisheng.pro/ko/llms.txt # 창조 마스트라 독립형 Mastra 프로젝트를 만듭니다. 기본적으로`create-mastra`기본 스타터를 설치하고 선택한 Model 공급자에 맞게 구성합니다. **npm**: ```bash npx create-mastra@latest ``` **pnpm**: ```bash pnpm dlx create-mastra@latest ``` **Yarn**: ```bash yarn dlx create-mastra@latest ``` **Bun**: ```bash bun x create-mastra@latest ``` ## 생성 모드 ### 기본 스타터 기본 스타터는 작업 공간 Tool, Memory, 작업 추적, 웹 액세스, 반복 일정, 저장 및 Observability을 갖춘 Agent 하네스를 생성합니다. OpenAI, Anthropic, Gemini 또는 xAI를 Model 공급자로 선택하세요. Prompt 없이 프로젝트를 생성하려면 프로젝트 이름과 Provider를 모두 제공하세요. 이 예제에서는 Anthropic을 사용합니다. `openai`, `google` 또는 `xai`를 전달할 수도 있습니다. **npm**: ```bash npx create-mastra@latest my-mastra-project --llm anthropic ``` **pnpm**: ```bash pnpm dlx create-mastra@latest my-mastra-project --llm anthropic ``` **Yarn**: ```bash yarn dlx create-mastra@latest my-mastra-project --llm anthropic ``` **Bun**: ```bash bun x create-mastra@latest my-mastra-project --llm anthropic ``` Provider를 선택하고 선택적으로 API 키를 대화형으로 입력하려면 `--llm`을 생략하세요. 대화형 설정에서는 프로젝트를 Mastra 플랫폼에 연결하는 옵션도 제공합니다. 활성화하면 명령이 브라우저 인증 흐름을 열고 로컬 프로젝트와 같은 이름으로 플랫폼 프로젝트를 생성합니다. 그런 다음 `MASTRA_PLATFORM_ACCESS_TOKEN`과 `MASTRA_PROJECT_ID`를 `.env`에 기록합니다. ### 주형 템플릿 슬러그 또는 공개 GitHub URL을 사용하세요. **npm**: ```bash npx create-mastra@latest my-mastra-project --template agent-harness ``` **pnpm**: ```bash pnpm dlx create-mastra@latest my-mastra-project --template agent-harness ``` **Yarn**: ```bash yarn dlx create-mastra@latest my-mastra-project --template agent-harness ``` **Bun**: ```bash bun x create-mastra@latest my-mastra-project --template agent-harness ``` **npm**: ```bash npx create-mastra@latest my-mastra-project --template https://github.com/mastra-ai/template-agent-harness ``` **pnpm**: ```bash pnpm dlx create-mastra@latest my-mastra-project --template https://github.com/mastra-ai/template-agent-harness ``` **Yarn**: ```bash yarn dlx create-mastra@latest my-mastra-project --template https://github.com/mastra-ai/template-agent-harness ``` **Bun**: ```bash bun x create-mastra@latest my-mastra-project --template https://github.com/mastra-ai/template-agent-harness ``` 대화형으로 템플릿을 선택하려면 템플릿 값을 비워 두세요. **npm**: ```bash npx create-mastra@latest my-mastra-project --template ``` **pnpm**: ```bash pnpm dlx create-mastra@latest my-mastra-project --template ``` **Yarn**: ```bash yarn dlx create-mastra@latest my-mastra-project --template ``` **Bun**: ```bash bun x create-mastra@latest my-mastra-project --template ``` 템플릿 작성자는 자체 종속성, Model, 환경 변수, 소스 코드를 관리합니다. `create-mastra`는 `--llm` 또는 `--llm-api-key`를 적용하지 않습니다. ### 빈 비계 Agent, 예제, Model SDK, 환경 파일이 없는 최소 Provider 비종속 프로젝트를 생성하려면 `--empty`를 사용하세요. **npm**: ```bash npx create-mastra@latest my-empty-project --empty ``` **pnpm**: ```bash pnpm dlx create-mastra@latest my-empty-project --empty ``` **Yarn**: ```bash yarn dlx create-mastra@latest my-empty-project --empty ``` **Bun**: ```bash bun x create-mastra@latest my-empty-project --empty ``` ## 자동 설정 종속성을 설치한 후 명령은 다음과 같습니다. 1. `PATH`에서 지원되는 코딩 도우미를 감지하고 Mastra Skill을 설치합니다. 감지되지 않으면 범용 Skill을 설치합니다. 2. 현재 디렉터리와 생성된 프로젝트가 아직 Git 리포지토리 안에 없으면 초기 Git 커밋을 생성합니다. 이 단계를 건너뛰려면 `--no-skills` 또는 `--no-git`을 사용하세요. Skill 및 Git 설정 실패 시 경고가 표시되지만 성공적으로 생성된 프로젝트는 제거되지 않습니다. ## 충돌 및 검증 - `--empty`와 `--template`은 함께 사용할 수 없습니다. - `--llm`과 `--llm-api-key`는 기본 스타터 프로젝트에서만 유효합니다. - 프로젝트 이름은 안전한 소문자 단일 디렉터리 이름이어야 하며 대상이 이미 존재해서는 안 됩니다. 템플릿을 가져오거나 파일을 생성하기 전에 잘못된 입력이 거부됩니다. ## 인수 및 플래그 **\[project-name]** (`string`): 프로젝트 디렉터리 및 패키지 이름입니다. 생략하면 명령이 입력을 요청합니다. **--empty** (`boolean`): 최소 구성의 Provider 비종속 Mastra 프로젝트를 생성합니다. **-l, --llm \** (`string`): 관리형 Agent 하네스 Provider: openai, anthropic, google 또는 xai. **-k, --llm-api-key \** (`string`): 자동 Provider 설정이 성공하면 선택한 Provider API 키를 생성된 .env 파일에 기록합니다. **--no-skills** (`boolean`): Mastra Skill 자동 설치를 건너뜁니다. **--no-git** (`boolean`): Git 자동 초기화 및 초기 커밋을 건너뜁니다. **--no-install** (`boolean`): 종속성 설치를 건너뜁니다. **-t, --template \[template]** (`string`): 템플릿 슬러그 또는 공개 GitHub URL을 사용합니다. 대화형으로 선택하려면 값을 생략하세요. **--timeout \** (`number`): 종속성 설치의 양의 정수 제한 시간입니다. 기본값은 60000입니다. **--version** (`boolean`): create-mastra 버전을 출력합니다. **--help** (`boolean`): 명령 도움말을 표시합니다. ## 원격 측정 Mastra는 운영 체제, Mastra 버전, Node.js 버전 등 익명의 CLI 사용 정보를 수집합니다. 다음을 검토할 수 있습니다.[analytics source](https://github.com/mastra-ai/mastra/blob/main/packages/cli/src/analytics/index.ts). 옵트아웃하려면 `MASTRA_TELEMETRY_DISABLED=1`을 설정하세요. ```bash MASTRA_TELEMETRY_DISABLED=1 npx create-mastra@latest my-project --empty ```