Skip to main content

Overview

banana-cli is the command-line tool for Banana Slides, implementing all features through the backend REST API. Ideal for:
  • Batch generation: Create PPTs in bulk from JSONL/CSV files
  • Automation pipelines: Integrate into CI/CD or scripts
  • AI Agent orchestration: Use as a tool-calling interface for agents

Installation

From the project root:

Agent Skill

If you use AI Agents in Claude Code, install the banana-cli skill with a single command so the Agent automatically knows how to use the CLI:
Once installed, the Agent will invoke /banana-cli as needed, with full environment detection, setup guidance, and usage examples.

Global Options

All commands support the following global options:

Configuration Priority

CLI args > Environment variables (BANANA_CLI_*) > TOML config file > Defaults Environment variable mapping:

Short ID Prefix Matching

All --project-id and --page-id parameters accept short prefixes (like git short hashes) instead of full UUIDs:
The prefix must uniquely match one project/page. If multiple matches are found, you’ll be prompted to provide more characters.

Working Project Context

Set a working project to skip --project-id on subsequent commands:
The working project is stored in ~/.config/banana-slides/context.json and persists across sessions.

Command Reference

projects — Project Management

workflows — Workflows

End-to-end PPT generation pipeline.
workflows full supports skipping steps:

pages — Page Operations

exports — Export

--output specifies a local download path; if omitted, the server-side download URL is returned. --filename only sets the filename generated on the server side.

materials — Material Management

refs — Reference Files

templates — Templates

renovation — PPT Renovation

settings — Settings

tasks — Task Status

tasks wait can be interrupted with Ctrl+C and resumed at any time — the backend task is not affected.

styles — Style Extraction

files — File Download


Batch Jobs

Job File Format

Supports JSONL and CSV formats. Each line defines one generation task. JSONL example (jobs.jsonl):
Field descriptions:

Running Batch Jobs

  • --state-file: Writes running state in real-time for monitoring
  • --done-marker-file: Records completed jobs; automatically skipped on re-run
  • --continue-on-error / --fail-fast: Continue after failure or stop immediately

Monitoring Run Status

Interactive Job File Builder


Typical Workflow Examples

From Idea to PPTX

Batch Generate 10 PPTs


Notes

  1. Backend must be running: The CLI calls the backend API over HTTP — ensure the backend is started before use
  2. File paths must be absolute: All --file, --image parameters require absolute paths
  3. Waits for completion by default: Async tasks such as description generation, image generation, and editable export wait for completion and show progress by default. Pass --no-wait to return the task_id immediately, then use tasks wait to poll manually
  4. Interruptible and resumable: --wait and tasks wait can be interrupted with Ctrl+C at any time. The backend task is unaffected — you can resume waiting with the same task_id
  5. --pages is a hint: --pages is passed as a hint to the AI; the actual number of generated pages may differ. When there is a mismatch, the CLI prints a notice to stderr
  6. Progress output: While waiting for a task, progress information is written to stderr (format: [PROGRESS] stage status completed/total) and does not interfere with JSON output on stdout
  7. Shell completion: Run banana-cli --install-completion to install auto-completion for your current shell
  8. AI Agent friendly: When stdout is piped (non-TTY), --help automatically outputs plain text without Rich formatting