AgentSkillsCN

zeabur-project-create

在创建新的 Zeabur 项目时,可选用此功能。当您将模板部署到新项目时,亦可选用此功能。

SKILL.md
--- frontmatter
name: zeabur-project-create
description: Use when creating a new Zeabur project. Use when deploying templates to a new project.

Zeabur Project Create

Create Project

bash
# Create project with name and region
npx zeabur@latest project create -n "<project-name>" -r "<region>" -i=false

# Example
npx zeabur@latest project create -n "my-app" -r "hnd1" -i=false

Get Project ID

bash
# List projects and find ID
npx zeabur@latest project list -i=false 2>/dev/null | grep "<project-name>"

# Extract ID (first column, strip ANSI codes)
PROJECT_ID=$(npx zeabur@latest project list -i=false 2>/dev/null | grep "<project-name>" | awk '{print $1}' | sed 's/\x1b\[[0-9;]*m//g')

Set Context

bash
# Set project context for subsequent commands
npx zeabur@latest context set project --id <project-id> -i=false -y

Available Regions

RegionCode
Tokyo (Haneda)hnd1
Hong Konghkg1
Singaporesin1
San Franciscosfo1
Frankfurtfra1
São Paulogru1

Deploy Template to Project

bash
# Deploy template file to specific project (non-interactive)
npx zeabur@latest template deploy -i=false \
  -f <template-file> \
  --project-id <project-id> \
  --var PUBLIC_DOMAIN=myapp \
  --var KEY=value

Full Workflow Example

bash
# 1. Create project
npx zeabur@latest project create -n "wrenai-prod" -r "hnd1" -i=false

# 2. Get project ID
PROJECT_ID=$(npx zeabur@latest project list -i=false 2>/dev/null | grep "wrenai-prod" | awk '{print $1}' | sed 's/\x1b\[[0-9;]*m//g')
echo "Project ID: $PROJECT_ID"
echo "Dashboard: https://zeabur.com/projects/$PROJECT_ID"

# 3. Deploy template (non-interactive)
npx zeabur@latest template deploy -i=false -f template.yml --project-id $PROJECT_ID --var PUBLIC_DOMAIN=myapp

# 4. Set context for subsequent commands
npx zeabur@latest context set project --id $PROJECT_ID -i=false -y