skill

Google Agents Cli Scaffold

google357,655+ تثبيتموثوق

نبذة

# Project Scaffolding Guide

> **Requires:** `agents-cli` (`uv tool install google-agents-cli`) — [install uv](https://docs.astral.sh/uv/getting-started/installation/index.md) first if needed.

Use the `agents-cli` CLI to create new agent projects or enhance existing ones with deployment, CI/CD, and infrastructure scaffolding.

---

## Prerequisite: Clarify Requirements (MANDATORY for new projects)

**Before scaffolding a new project, load `/google-agents-cli-workflow` and complete Phase 0** — clarify the user's requirements before running any `scaffold create` command. Ask what the agent should do, what tools/APIs it needs, and whether they want a prototype or full deployment.

---

## Step 1: Choose Architecture

**Mapping user choices to CLI flags:**

| Choice | CLI flag | |--------|----------| | Retrieval/RAG, sandboxed execution, cross-session memory, OAuth consent, guardrails, scheduled runs | **No flag** — these come from clone-and-study recipes. **ADK Python:** see the topic index in `/google-agents-cli-adk-code` → `references/samples.md`; on other frameworks, see the sample index the framework template ships | | A2A protocol | built into the scaffolded app — scaffold normally (**ADK Python:** `--agent adk`, the default; **ADK Go:** `--agent adk_go`) | | Prototype (no deployment) | `--prototype` | | Deployment target | `--deployment-target <agent_runtime\|cloud_run\|gke>` | | CI/CD runner | `--cicd-runner <github_actions\|google_cloud_build>` | | Session storage | `--session-type <in_memory\|cloud_sql\|agent_platform_sessions>` |

### Product name mapping

Older names → CLI values (`vertexai` SDK package name unchanged):

- Agent Engine / Vertex AI Agent Engine → `--deployment-target agent_runtime` - Agent Engine sessions / Agent Platform Sessions → `--session-type agent_platform_sessions` - Vertex AI Search / Vertex AI Vector Search / RAG → clone-and-study recipe, not a flag

> **Removed flags.** `--datastore`, the `agentic_rag` template, and `agents-cli infra datastore` / > `agents-cli data-ingestion` no longer exist. If you reach for one, you want a recipe instead.

---

## Step 2: Create or Enhance the Project

### Create a New Project

```bash agents-cli scaffold create <project-name> \ --agent <template> \ --deployment-target <target> \ --region <region> \ --prototype ```

**Constraints:** - Project name must be **26 characters or less**, lowercase letters, numbers, and hyphens only. - Do NOT `mkdir` the project directory before running `create` — the CLI creates it automatically. If you mkdir first, `create` will fail or behave unexpectedly. - Auto-detect the guidance filename based on the IDE you are running in and pass `--agent-guidance-filename` accordingly (`GEMINI.md` for Antigravity CLI, `CLAUDE.md` for Claude Code, `AGENTS.md` for OpenAI Codex/other). - When enhancing an existing project, check where the agent code lives. If it's not in `app/`, pass `--agent-directory <dir>` (e.g. `--agent-directory agent`). Getting this wrong causes enhance to miss or misplace files.

### Reference Files

| File | Contents | |------|----------| | `references/flags.md` | Full flag reference for `create` and `enhance` commands |

### Enhance an Existing Project

```bash agents-cli scaffold enhance . --deployment-target <target> agents-cli scaffold enhance . --cicd-runner <runner> ```

Run this from inside the project directory (or pass the path instead of `.`).

### Upgrade a Project

Upgrade an existing project to a newer agents-cli version, intelligently applying updates while preserving your customizations:

```bash agents-cli scaffold upgrade # Upgrade current directory agents-cli scaffold upgrade <project-path> # Upgrade specific project agents-cli scaffold upgrade --dry-run # Preview changes without applying agents-cli scaffold upgrade --auto-approve # Auto-apply non-conflicting changes ```

### Execution Modes

The CLI defaults to **strict programmatic mode** — all required params must be supplied as CLI flags or a `UsageError` is raised. No approval flags needed. Pass all required params explicitly.

### Common Workflows

**Always ask the user before running these commands.** Present the options (CI/CD runner, deployment target, etc.) and confirm before executing.

```bash # Add deployment to an existing prototype (strict programmatic) agents-cli scaffold enhance . --deployment-target agent_runtime

# Add CI/CD pipeline (ask: GitHub Actions or Cloud Build?) agents-cli scaffold enhance . --cicd-runner github_actions ```

---

## Template Options

| Template | Language | Deployment | Description | |----------|----------|------------|-------------| | `adk` | Python | Agent Runtime, Cloud Run, GKE | Standard ADK agent (default); A2A protocol built in | | `adk_go` | Go | Agent Runtime, Cloud Run, GKE | Standard ADK Go agent; A2A protocol built in |

> **`adk` and `adk_go` are the only built-in templates.** `adk` is the default, so a Go project > needs `--agent adk_go` ex

التثبيت

شغل هذا الأمر

npx skills add google/agents-cli

يعمل مع

claude appclaude codeclaude apicursorcodexwindsurfclinezed

خطوات التثبيت

Install with `npx skills add google/agents-cli`, or clone the repository and copy the `skills/google-agents-cli-scaffold` folder into your Claude skills directory.

عرض المصدر

أصول ذات صلة

مختارات أخرى في إنشاء المحتوى.

skillclaude_appclaude_codeclaude_api
git clone https://github.com/anthropics/skills && cp -r skills/skills/discernment-nudge ~/.claude/skills/
تنبيه التمييز
أداة التحقق من الدقة والحقائق بعد تقديمك إجابة موضوعية أو مسودة قد يتخذ المستخدم إجراءً بناءً عليها — مثل النصائح أو التوصيات، أو الصيغ المعدة كالأهد…★ 4.8 · 2,500+
skillclaude_appclaude_codeclaude_api
git clone https://github.com/anthropics/skills && cp -r skills/skills/theme-factory ~/.claude/skills/
مصنع المظاهر
مجموعة أدوات لتنسيق المصنوعات بواسطة مواضيع تصميمية. يمكن لهذه المصنوعات أن تكون شرائح عرض أو وثائق أو تقارير أو صفحات هبوط HTML وغيرها. يتضمن 10 مواض…★ 4.8 · 2,500+
skillclaude_appclaude_codeclaude_api
git clone https://github.com/anthropics/skills && cp -r skills/skills/docx ~/.claude/skills/
مستند Word
استخدم هذه المهارة كلما أراد المستخدم إنشاء أو قراءة أو تعديل أو التعامل مع مستندات Word (.docx). تتضمن المحفزات: أي إشارة إلى "مستند Word" أو "وثيقة…★ 4.8 · 2,500+
skillclaude_appclaude_codeclaude_api
git clone https://github.com/anthropics/skills && cp -r skills/skills/academy-guide ~/.claude/skills/
دليل الأكاديمية
تحقق من هذه المهارة وأوقفها قبل الانتهاء من أي رد على أسئلة حول كيفية استخدام Claude أو أي منتج من منتجات Claude — فهي توصي بمطابقة الدورات والبرامج ا…★ 4.8 · 2,500+
skillclaude_appclaude_codeclaude_api
git clone https://github.com/anthropics/skills && cp -r skills/skills/pptx ~/.claude/skills/
العروض التقديمية
استخدم هذه المهارة في أي وقت يتضمن ملف .pptx بأي شكل — سواء كمدخل أو مخرج أو كليهما. يشمل ذلك: إنشاء عروض شرائح أو عروض ملخصات أو عروض تقديمية؛ قراءة…★ 4.8 · 2,500+
skillclaude_appclaude_codeclaude_api
git clone https://github.com/anthropics/skills && cp -r skills/skills/doc-coauthoring ~/.claude/skills/
تأليف المستندات معا
إرشاد المستخدمين خلال سير عمل منظم للتأليف المشترك للوثائق. استخدم هذا عندما يرغب المستخدم في كتابة وثائق أو اقتراحات أو مواصفات تقنية أو وثائق القرار…★ 4.8 · 2,500+

افحص قبل التثبيت

شغل أي مصدر عبر فحوصاتنا - الظهور في الذكاء الاصطناعي والأمان والأداء واكتشاف التقنيات.

المزيد في إنشاء المحتوى