跳到正文
Skillpedia
PDF、Word 与幻灯片16k · #10819

banana-cli

它能做什么

这个技能让你的智能体使用 Banana Slides 命令行工具制作演示文稿。适合希望根据想法、大纲或现有项目来制作幻灯片的人。

适用场景

  • ✓当你想根据想法或大纲生成演示文稿或幻灯片时。
  • ✓当你需要把现有项目导出为 PowerPoint、PDF 或图片文件时。
  • ✓当你想一次性批量生成多个演示文稿时。

技能链接

https://github.com/Anionex/banana-slides/blob/main/skills/banana-cli/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/Anionex/banana-slides/blob/main/skills/banana-cli/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请根据这份大纲制作一份十页的关于我们季度业绩的幻灯片,并导出为 PowerPoint 文件。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会先检查 Banana Slides 后端是否在你的电脑上运行,如果没有,会引导你完成设置。然后它会创建项目,生成大纲、说明和图片,并将结果导出为文件。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

banana-cli

CLI for creating, managing, and exporting AI-generated presentations.

Environment Check

Before running any command, verify the backend is reachable:

curl -sf http://localhost:5011/health

If this fails, the backend is not running. Read references/setup.md and follow the steps to clone the repo, configure .env, and start the backend. Do not proceed until the health check passes.

Invocation

banana-cli <command> [options]

If banana-cli is not on PATH, use uv run banana-cli from the project root, or install globally with uv tool install .

End-to-End Workflow

# 1. Create project and set as working project
result=$(banana-cli --json projects create --creation-type idea --idea-prompt "Your topic")
project_id=$(echo "$result" | jq -r '.data.project_id')
banana-cli projects use "$project_id"

# 2. Generate everything (outline → descriptions → images)
banana-cli workflows full --language zh --pages 8

# 3. Export to local file
banana-cli exports pptx --output ./slides.pptx

Once a working project is set, --project-id is optional on all subsequent commands.

Key Patterns

Short ID prefix matching

All --project-id and --page-id accept short prefixes (like git short hashes):

banana-cli projects get a1b2          # matches a1b2c3d4-...
banana-cli pages edit-image --page-id b9c8 --instruction "change title to red"

Working project context

Avoid repeating --project-id by setting a working project:

banana-cli projects use a1b2     # set (accepts prefix)
banana-cli workflows outline      # uses working project
banana-cli projects use           # show current
banana-cli projects unuse         # clear

Page count control

--pages is a hint to the AI — actual page count may differ. The CLI warns on stderr when they don't match.

banana-cli workflows outline --pages 5
banana-cli workflows full --pages 10 --language en

Export with auto-download

# Download directly to local path
banana-cli exports pptx --output ./slides.pptx
banana-cli exports pdf --output ./report.pdf

# Without --output, returns a server-side download URL
banana-cli exports pptx

Batch generation

cat > jobs.jsonl << 'EOF'
{"job_id":"t1","job_type":"full_generation","creation_type":"idea","idea_prompt":"AI Intro","language":"zh","export":{"formats":["pptx"]}}
{"job_id":"t2","job_type":"full_generation","creation_type":"idea","idea_prompt":"ML Basics","language":"zh","export":{"formats":["pptx","pdf"]}}
EOF

banana-cli run jobs --file jobs.jsonl --report report.json --state-file state.json

Renovate existing PPT

banana-cli renovation create --file /absolute/path/to/slides.pptx --language zh

JSON output for scripting

banana-cli --json projects list | jq '.data.projects[].project_id'

Important Notes

  • File path arguments (--file, --image) require absolute paths
  • Async tasks (descriptions, images, editable export) wait by default and show progress on stderr. Pass --no-wait to get a task_id immediately
  • --wait / tasks wait can be interrupted (Ctrl+C) and resumed anytime — backend tasks are unaffected
  • Progress lines go to stderr (format: [PROGRESS] STAGE STATUS completed/total), keeping stdout JSON clean
  • --help output is plain text when piped (non-TTY) — safe for agent consumption
  • Config priority: CLI args > env vars (BANANA_CLI_*) > TOML config (~/.config/banana-slides/cli.toml) > defaults

Discovering Commands

Run banana-cli --help for the top-level command list, and banana-cli <command> --help for subcommand options. Help output is plain text when piped (non-TTY).

常见问题

它需要服务器在运行吗?

需要。该技能会先检查本地后端,如果没有运行,会引导你进行设置。

它能导出哪些文件类型?

该技能可以导出为 PPTX、PDF 或图片。

它可以重做已有的演示文稿吗?

可以。该技能可以翻新或重新设计已有项目。

详情

作者的原始描述

CLI tool for creating, managing, and exporting AI-generated presentations via the Banana Slides API. Use when the user asks to: (1) generate a PPT/presentation/slides from an idea, outline, or description, (2) export a project to PPTX, PDF, or images, (3) batch-generate multiple presentations, (4) manage projects, pages, materials, or templates programmatically, (5) renovate/redesign an existing PPT or PDF, (6) edit slide images with natural language.

repo: Anionex/banana-slides

热度

GitHub 星标
16k
排名
#10819
许可证
AGPL-3.0
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

相似技能