gemini-api-cli

โดย google-gemini

คู่มือการใช้เครื่องมือ CLI ของ Gemini API ใช้เมื่อคุณต้องการโต้ตอบกับ Gemini API ผ่านทางบรรทัดคำสั่ง จัดการเอเจนต์ หรือสร้างสื่อ (รูปภาพ, …)

npx skills add https://github.com/google-gemini/gemini-api-cli --skill gemini-api-cli

Gemini API CLI Skill

This skill provides guidance on using the gemini-api command-line interface.

Overview

The gemini-api CLI allows you to:

  • Run prompts against various Gemini models.
  • Manage the full lifecycle of Gemini Agents.
  • Generate and edit media (images, audio, TTS).

References

For detailed usage and examples, see the following references:

Basic Usage

The primary command is gemini-api run.

gemini-api run "Hello, who are you?"

Always ensure your GEMINI_API_KEY environment variable is set.

Global Flags & Features

The CLI supports several flags that are useful for debugging and automation:

Dry Run (--dry-run)

Prints the equivalent curl command and exits without making an API call. Useful for verifying what request would be sent.

gemini-api run "Hello" --dry-run

Help (--help)

Displays usage information and available flags for any command.

gemini-api --help
gemini-api run --help

JSON Output (--json)

Outputs raw SSE events as JSONL (one event per line), useful for machine parsing.

gemini-api run "Hello" --json

Verbose (--verbose / -v)

Outputs complete JSON step objects line-by-line as they finish. Recommended for programmatic parsing by calling agents.

gemini-api run "Hello" --verbose

Skills เพิ่มเติมจาก google-gemini

greeter
google-gemini
ทักษะการทักทายที่เป็นมิตร
official
code-reviewer
google-gemini
การตรวจสอบโค้ดอัตโนมัติสำหรับการเปลี่ยนแปลงในเครื่องและคำขอดึงข้อมูลระยะไกล พร้อมการวิเคราะห์เชิงโครงสร้างในด้านความถูกต้อง การบำรุงรักษา และความปลอดภัย รองรับทั้งการเปลี่ยนแปลงในระบบไฟล์ท้องถิ่น (ที่จัดเตรียมและไม่ได้จัดเตรียม) และ PR ระยะไกล (ตามหมายเลขหรือ URL) พร้อมการเช็คเอาต์อัตโนมัติผ่าน GitHub CLI วิเคราะห์โค้ดในเจ็ดมิติ: ความถูกต้อง การบำรุงรักษา ความสามารถในการอ่าน ประสิทธิภาพ ความปลอดภัย การจัดการกรณีขอบ และความครอบคลุมของการทดสอบ รันชุดตรวจสอบก่อนการทำงานแบบเลือกได้ (เช่น npm run preflight) เพื่อตรวจจับ...
official
review-duplication
google-gemini
ใช้ทักษะนี้ในระหว่างการตรวจสอบโค้ดเพื่อตรวจสอบฐานโค้ดอย่างเชิงรุกหาฟังก์ชันการทำงานที่ซ้ำซ้อน การสร้างล้อขึ้นมาใหม่ หรือการไม่นำสิ่งที่มีอยู่แล้วกลับมาใช้ใหม่…
official
reconciliation
google-gemini
กระทบยอดค่าใช้จ่ายที่โหลดแล้วกับฐานข้อมูลใบแจ้งหนี้ที่แยกวิเคราะห์ไว้ล่วงหน้า โดยระบุความไม่สอดคล้อง เช่น จำนวนเงินไม่ตรงกัน ใบแจ้งหนี้ที่ขาดหายไป และชื่อผู้ค้าไม่ตรงกัน…
official
agent-tui
google-gemini
Main Agents: Do NOT use this skill directly. If you need to test the TUI, invoke the `tui_tester` subagent. Drive terminal UI (TUI) applications…
official
async-pr-review
google-gemini
เรียกใช้ทักษะนี้เมื่อผู้ใช้ต้องการเริ่มการตรวจสอบ PR แบบอะซิงโครนัส เรียกใช้การตรวจสอบพื้นหลังบน PR หรือตรวจสอบสถานะของ async PR ที่เริ่มไว้ก่อนหน้านี้…
official
ci
google-gemini
ทักษะเฉพาะสำหรับ Gemini CLI ที่ให้ประสิทธิภาพสูงและล้มเหลวเร็ว
official
critique
google-gemini
ความเชี่ยวชาญในการตรวจสอบและแก้ไขสคริปต์ในคลังข้อมูลและเวิร์กโฟลว์ของ GitHub Actions เพื่อให้มั่นใจถึงความแข็งแกร่งทางเทคนิคและความปลอดภัย
official