---
title: slides
description: プレゼンテーションの取得・作成と Slides API の呼び出しを行います。
canonical_url: https://orchestor.io/docs/cli/slides
markdown_url: https://orchestor.io/docs/cli/slides.md
contentType: reference
---

# slides

`orc slides` は `--target CONNECTION_ID` でスライドの接続先を選びます。現在は Google Workspace 接続に対応しています。接続 ID は位置引数ではありません。

`get` は presentations.get の応答を返し、`create` は `--title` でプレゼンテーションを作成します。`api get` と `api update` は Discovery にある読み取りと書き込みのメソッドを呼び出します。`batch-requests create` は各オブジェクトに Request キーが一つだけあることを検証します。`schemas list/get` は接続なしでメソッド・Request 型・スキーマを調べます。

既存の接続に Slides スコープがなければ再接続してください。書き込みには manage モードが必要です。`--readonly` は書き込みを拒否し、`--wrap-untrusted` は外部のテキストを囲みます。タイムアウト後は、再送する前にプレゼンテーションを読み直して結果を確認してください。

`exports get PRESENTATION_ID --format pdf|pptx --output FILE` は PDF または PowerPoint を保存します（Drive export、上限 10 MB）。`drive.file` では、アプリで作成したファイルか Picker 等でアプリへのアクセスを許可したファイルだけを対象にできます。ユーザーが所有しているだけでは足りず、共有・再接続だけで既存ファイルへのアクセスが増えるわけではありません。対象外は share/reconnect を案内する CONFLICT を返します。制限付きの drive / drive.readonly スコープは追加しません。

`thumbnails get PRESENTATION_ID PAGE_ID [--size SMALL|MEDIUM|LARGE]` は `content_url`、`width`、`height` を返します。`--output FILE` を付けると CLI が PNG を保存します。URL は通常 30 分間有効で、URL を知る人は画像へアクセスできます。どちらも `--readonly` で利用できます。

`create --markdown FILE` は Slidev Markdown から新規作成し、`update PRESENTATION_ID --markdown FILE` は全スライドを置換します。FILE は UTF-8 ファイルのパス、または標準入力を読む `-` です。API の markdown フィールドには内容を直接渡します。先頭の frontmatter title をプレゼンテーション名に使い、`--title` だけでの作成も使えます。タイトル・本文・notes・hide を変換し、未対応の機能は安全なテキストに戻して 0 始まりの slide_index とともに report に返します。

`get PRESENTATION_ID --format markdown [--output deck.md]` は既存のスライドを Slidev Markdown に変換します。タイトル・本文・リスト・表・画像 URL・発表者ノート・hide を保持し、手作業で追加したテキストも位置順に読み込みます。API は `{ markdown, report }` を返します。区別できないレイアウトの別名は cover / center 等に正規化します。図形・動画・チャート等の未対応要素と、有効期限のある contentUrl は report に記録します。画像は sourceUrl を優先します。

## 使い方

```bash title="terminal"
orc slides get PRESENTATION_ID --target CONNECTION_ID --workspace WORKSPACE_ID --wrap-untrusted --json
```

*Get a presentation*

```bash title="terminal"
orc slides create --target CONNECTION_ID --title "Weekly review" --workspace WORKSPACE_ID --json
```

*Create a presentation*

## サブコマンド

### `get`

Get a presentation

```bash title="terminal"
orc slides get <presentation-id> [options]
```

#### 固有のオプション

##### `--target`

Connection ID of the slides backend (currently a google-workspace connection); max 200 chars

型: `string`。必須。

```bash title="terminal"
orc slides get <presentation-id> --target <value>
```

### `create`

Create a presentation

```bash title="terminal"
orc slides create [options]
```

#### 固有のオプション

##### `--markdown`

Path to a UTF-8 file, or - for stdin. Slidev Markdown content. CLI: path to a UTF-8 file, or - for stdin.; max 1000000 chars

型: `string`。任意。

```bash title="terminal"
orc slides create --markdown <value>
```

##### `--target`

(required) Connection ID of the slides backend (currently a google-workspace connection); max 200 chars

型: `string`。任意。

```bash title="terminal"
orc slides create --target <value>
```

##### `--title`

Body field: title; max 500 chars

型: `string`。任意。

```bash title="terminal"
orc slides create --title <value>
```

### `api get`

Call a read-only Slides API method

```bash title="terminal"
orc slides api get [options]
```

#### 固有のオプション

##### `--method`

(required) Read-only Discovery method ID, for example presentations.pages.get.; enum: presentations.get|presentations.pages.get|presentations.pages.getThumbnail

型: `string`。任意。

```bash title="terminal"
orc slides api get --method <value>
```

##### `--params`

Path and query parameters by Discovery name, for example {"presentationId":"…","pageObjectId":"…"}. Run `orc slides schemas get <method>` for parameters.; (JSON object, e.g. '{"custom_id":"x"}')

型: `string`。任意。

```bash title="terminal"
orc slides api get --params <value>
```

##### `--target`

(required) Connection ID of the slides backend (currently a google-workspace connection); max 200 chars

型: `string`。任意。

```bash title="terminal"
orc slides api get --target <value>
```

### `api update`

Call a mutating Slides API method

```bash title="terminal"
orc slides api update [options]
```

#### 固有のオプション

##### `--body`

Request body in the Discovery request schema.; (JSON object, e.g. '{"custom_id":"x"}')

型: `string`。任意。

```bash title="terminal"
orc slides api update --body <value>
```

##### `--method`

(required) Mutating Discovery method ID, for example presentations.batchUpdate.; enum: presentations.batchUpdate|presentations.create

型: `string`。任意。

```bash title="terminal"
orc slides api update --method <value>
```

##### `--params`

Path and query parameters by Discovery name, for example {"presentationId":"…","pageObjectId":"…"}. Run `orc slides schemas get <method>` for parameters.; (JSON object, e.g. '{"custom_id":"x"}')

型: `string`。任意。

```bash title="terminal"
orc slides api update --params <value>
```

##### `--target`

(required) Connection ID of the slides backend (currently a google-workspace connection); max 200 chars

型: `string`。任意。

```bash title="terminal"
orc slides api update --target <value>
```

### `batch-requests create`

Apply Slides batchUpdate requests

```bash title="terminal"
orc slides batch-requests create <presentation-id> [options]
```

#### 固有のオプション

##### `--requests`

(required) batchUpdate requests, each with exactly one Request key, for example {"createSlide":{…}}. Run `orc slides schemas list` for types.; JSON array of objects (use --stdin for large resources)

型: `string`。任意。

```bash title="terminal"
orc slides batch-requests create <presentation-id> --requests <value>
```

##### `--target`

(required) Connection ID of the slides backend (currently a google-workspace connection); max 200 chars

型: `string`。任意。

```bash title="terminal"
orc slides batch-requests create <presentation-id> --target <value>
```

##### `--write-control`

Slides WriteControl, for example {"requiredRevisionId":"…"}.; (JSON object, e.g. '{"custom_id":"x"}')

型: `string`。任意。

```bash title="terminal"
orc slides batch-requests create <presentation-id> --write-control <value>
```

### `schemas list`

List Slides API methods and request types

```bash title="terminal"
orc slides schemas list [options]
```

### `schemas get`

Get a Slides API schema

```bash title="terminal"
orc slides schemas get <name> [options]
```

### `exports get`

Export a presentation

```bash title="terminal"
orc slides exports get <presentation-id> [options]
```

#### 固有のオプション

##### `--target`

Connection ID of the slides backend (currently a google-workspace connection); max 200 chars

型: `string`。必須。

```bash title="terminal"
orc slides exports get <presentation-id> --target <value>
```

### `thumbnails get`

Get a slide thumbnail

```bash title="terminal"
orc slides thumbnails get <presentation-id> <page-id> [options]
```

#### 固有のオプション

##### `--target`

Connection ID of the slides backend (currently a google-workspace connection); max 200 chars

型: `string`。必須。

```bash title="terminal"
orc slides thumbnails get <presentation-id> <page-id> --target <value>
```

##### `--size`

Thumbnail width: SMALL 200px, MEDIUM 800px, LARGE 1600px. Google chooses the default when omitted.; enum: SMALL|MEDIUM|LARGE

型: `string`。任意。

```bash title="terminal"
orc slides thumbnails get <presentation-id> <page-id> --size <value>
```

### `update`

Replace all slides from Slidev Markdown

```bash title="terminal"
orc slides update <presentation-id> [options]
```

#### 固有のオプション

##### `--markdown`

(required) Path to a UTF-8 file, or - for stdin. Slidev Markdown content. CLI: path to a UTF-8 file, or - for stdin.; max 1000000 chars

型: `string`。任意。

```bash title="terminal"
orc slides update <presentation-id> --markdown <value>
```

##### `--target`

(required) Connection ID of the slides backend (currently a google-workspace connection); max 200 chars

型: `string`。任意。

```bash title="terminal"
orc slides update <presentation-id> --target <value>
```

## 使用例

### Inspect a method schema

```bash title="terminal"
orc slides schemas get presentations.pages.get --workspace WORKSPACE_ID --json
```

*Inspect a method schema*

### Read a page

```bash title="terminal"
orc slides api get --target CONNECTION_ID --method presentations.pages.get --params '{"presentationId":"PRESENTATION_ID","pageObjectId":"PAGE_ID"}' --workspace WORKSPACE_ID --readonly --json
```

*Read a page*

### Apply batch requests

```bash title="terminal"
orc slides batch-requests create PRESENTATION_ID --target CONNECTION_ID --requests '[{"createSlide":{"objectId":"slide_1"}}]' --workspace WORKSPACE_ID --dry-run
```

*Apply batch requests*

### Export PDF

```bash title="terminal"
orc slides exports get PRESENTATION_ID --target CONNECTION_ID --format pdf --output deck.pdf --workspace WORKSPACE_ID --readonly
```

*Export PDF*

### Export PowerPoint

```bash title="terminal"
orc slides exports get PRESENTATION_ID --target CONNECTION_ID --format pptx --output deck.pptx --workspace WORKSPACE_ID --readonly
```

*Export PowerPoint*

### Save a slide thumbnail

```bash title="terminal"
orc slides thumbnails get PRESENTATION_ID PAGE_ID --target CONNECTION_ID --size LARGE --output slide.png --workspace WORKSPACE_ID --readonly
```

*Save a slide thumbnail*

### Create from Markdown

```bash title="terminal"
orc slides create --target CONNECTION_ID --markdown deck.md --workspace WORKSPACE_ID --dry-run --json
```

*Create from Markdown*

### Replace all slides from stdin

```bash title="terminal"
cat deck.md | orc slides update PRESENTATION_ID --target CONNECTION_ID --markdown - --workspace WORKSPACE_ID --json
```

*Replace all slides from stdin*

### Read as Slidev Markdown

```bash title="terminal"
orc slides get --target CONNECTION_ID PRESENTATION_ID --format markdown --output deck.md --workspace WORKSPACE_ID --readonly
```

*Read as Slidev Markdown*

## Markdown と dry-run

Markdown の `--dry-run` は API に dry_run: true を送り、Google への書き込みを行いません。create は Google を呼ばず、update は現在のスライド ID と revision を読み取ります。応答は presentation_id（create は null）、slide_count、requests（Phase 1）、notes（slide_object_id と text）、report を含み、update は write_control.requiredRevisionId も返します。notes の object ID は作成後に決まるため、notes はリクエストではありません。実行時は Phase 1 でスライドを更新し、notes がある場合だけ GET と revision 付きの Phase 2 で全 notes を書き込みます。notes の失敗時はスライドの書き込み済みを示すエラーを返します。update を再実行して置換・再試行できます。

## Markdown の要素とレイアウト

箇条書き・番号付きリストはネストを含む native bullet に変換します。トップレベルのリストごとに一つの preset を使います。ネストの種類が混在する場合は最上位のスタイルを適用し、lists report に記録します。表は編集可能な table とし、先頭行を太字にします。太字・斜体・inline code（Courier New）・リンクをテキストスタイルにし、範囲は UTF-16 で計算します。Markdown 画像と frontmatter `image:` は絶対 HTTPS URL を受け付けます。Google が画像を取得し、Orchestor は取得・アップロードしません。`background:` はページ全体に引き伸ばす画像です。相対パス・data:・HTTP は report に返し、他の内容は変換します。Mermaid・KaTeX・code block・v-click・component・未知の option は report に残ります。通常の code block は編集可能な等幅文字列です。

| Slidev layout | Google layout | 内容の割り当て |
| --- | --- | --- |
| cover, intro | TITLE | タイトルとサブタイトル |
| default | TITLE_AND_BODY | タイトルと本文 |
| section | SECTION_HEADER | タイトル。本文があれば TITLE_AND_BODY に戻し report に記録 |
| center, end | TITLE_ONLY | タイトル。本文があれば TITLE_AND_BODY に戻し report に記録 |
| two-cols | TITLE_AND_TWO_COLUMNS | 見出しをタイトル、default slot と ::left:: を BODY index 0、::right:: を BODY index 1 |
| two-cols-header | TITLE_AND_TWO_COLUMNS | 見出しと default slot の文字列をタイトル、::left:: を BODY index 0、::right:: を BODY index 1。default slot の表・画像は左列 |
| image-left, image-right | TITLE_AND_BODY | 指定側の半分に frontmatter 画像、反対側の本文 placeholder をサイズ指定した text box に置換。上にタイトル |
| image | BLANK | frontmatter 画像を全面に配置。Markdown 内容があれば重ねて表示 |
| full | BLANK | タイトル・本文を一つの全面 text box に配置。表・画像は独立した native 要素 |

画像の配置は 16:9（9,144,000 × 5,143,500 EMU）を基準とします。本文や列に文字列・表・Markdown 画像が混在する場合は縦に並べ、必要に応じて本文 placeholder をサイズ指定した native 要素に置換します。HTTPS 画像は Google がアクセスできる必要があります。createImage は縦横比を維持し、背景画像は引き伸ばします。

## 必要な権限

Workspace と connector:backend-execute が必要です。schemas は接続を必要としません。

## グローバルオプション

`orc slides` では、次の[グローバルオプション](https://orchestor.io/docs/cli/global-flags.md)を使用できます。

- [`--help`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%98%E3%83%AB%E3%83%97)
- [`--workspace`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%AF%E3%83%BC%E3%82%AF%E3%82%B9%E3%83%9A%E3%83%BC%E3%82%B9)
- [`--json`](https://orchestor.io/docs/cli/global-flags.md#json-%E5%87%BA%E5%8A%9B)
- [`--pretty`](https://orchestor.io/docs/cli/global-flags.md#json-%E5%87%BA%E5%8A%9B)
- [`--format`](https://orchestor.io/docs/cli/global-flags.md#%E5%87%BA%E5%8A%9B%E5%BD%A2%E5%BC%8F)
- [`--field`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%95%E3%82%A3%E3%83%BC%E3%83%AB%E3%83%89%E3%81%AE%E6%8A%BD%E5%87%BA)
- [`--fields`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%95%E3%82%A3%E3%83%BC%E3%83%AB%E3%83%89%E3%81%AE%E6%8A%BD%E5%87%BA)
- [`--raw`](https://orchestor.io/docs/cli/global-flags.md#%E5%80%A4%E3%81%A0%E3%81%91%E3%82%92%E5%87%BA%E5%8A%9B)
- [`--output`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%B8%E3%81%AE%E5%87%BA%E5%8A%9B)
- [`--no-pager`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%9A%E3%83%BC%E3%82%B8%E9%80%81%E3%82%8A)
- [`--dry-run`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E3%81%AE%E4%BA%8B%E5%89%8D%E7%A2%BA%E8%AA%8D)
- [`--yes`](https://orchestor.io/docs/cli/global-flags.md#%E7%A2%BA%E8%AA%8D%E3%81%AE%E7%9C%81%E7%95%A5)
- [`--stdin`](https://orchestor.io/docs/cli/global-flags.md#%E6%A8%99%E6%BA%96%E5%85%A5%E5%8A%9B)
- [`--from-stdin`](https://orchestor.io/docs/cli/global-flags.md#%E6%A8%99%E6%BA%96%E5%85%A5%E5%8A%9B)
- [`--page-all`](https://orchestor.io/docs/cli/global-flags.md#%E3%81%99%E3%81%B9%E3%81%A6%E3%81%AE%E3%83%9A%E3%83%BC%E3%82%B8%E3%82%92%E5%8F%96%E5%BE%97)
- [`--timing`](https://orchestor.io/docs/cli/global-flags.md#%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E6%99%82%E9%96%93)
- [`--readonly`](https://orchestor.io/docs/cli/global-flags.md#%E8%AA%AD%E3%81%BF%E5%8F%96%E3%82%8A%E5%B0%82%E7%94%A8%E3%83%A2%E3%83%BC%E3%83%89)
- [`--wrap-untrusted`](https://orchestor.io/docs/cli/global-flags.md#%E5%A4%96%E9%83%A8%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E7%9B%AE%E5%8D%B0%E4%BB%98%E3%81%91)

各オプションの詳細と使用例は、[グローバルオプション](https://orchestor.io/docs/cli/global-flags.md)を参照してください。

---

[Documentation index](https://orchestor.io/docs/llms.txt)
