> For the complete documentation index, see [llms.txt](https://getsquish.gitbook.io/squish/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://getsquish.gitbook.io/squish/ja/hajimeni/quickstart-cli.md).

# クイックスタート: CLI

**AI に動画へのランダムアクセスを提供します。** Squish CLI は、動画をタイムスタンプ付きのコンタクトシート（各セルに絶対タイムコードが入ったフレームのグリッド）に変換します。すべてローカルマシン上で完結し、アップロードされることは一切ありません。すべての密度設定が無料です。

## 要件

* **Node ≥ 20**
* **`ffmpeg` + `ffprobe` PATH に含まれていること**
  * macOS: `brew install ffmpeg`
  * Ubuntu: `sudo apt-get install ffmpeg`

## 最初のシート

インストールは不要です — npm からそのまま実行できます:

```bash
npx -y @getsquish/squish clip.mov
```

または、グローバルにインストールします:

```bash
npm install -g @getsquish/squish
squish clip.mov
```

## ディスクに保存されるもの

シートは入力の横に次の名前で保存されます `clip.sheet-1.jpg` （パターン: `<basename>.sheet-N.jpg`）— タイムコード付きのフレームグリッドです。デフォルトの 3×3 密度なら *何が* 起きたか; `4x4`–`6x6` 把握する *どのように* 実行されたか。 `--out <dir>` で出力先を指定します。

このシートは任意の vision model に渡せます。セルは時系列順に、左→右、上→下へ並び、各セルには表示しているフレームの絶対タイムコードが含まれます。

## 機械可読な出力: `--json`

と組み合わせると、 `--json`stdout は 1 つのオブジェクトになります（固定された契約です — 解析して `契約` 破壊的変更を検出してください）:

```json
{
  "input": "/abs/path/clip.mov",
  "duration": 20.275,
  "frames": 9,
  "sheets": 1,
  "files": ["/abs/path/clip.sheet-1.jpg"],
  "warnings": [],
  "contract": "squish-cli-v0"
}
```

終了 `0` 成功 · `1` 失敗（メッセージは stderr に出力されます）。一時フレームは常にクリーンアップされます。

## 範囲を拡大表示する

`--start` / `--end` 秒を指定します（`90`）またはシートに印字されたものと完全に一致するタイムコード（`1:30`, `1:07.3`）を指定して、その範囲に実行を絞り込みます:

```bash
squish clip.mov --start 1:00 --end 1:30 --density 5x5
```

**タイムコードは常に元動画基準の絶対値です**。そのため、何度でも拡大できます: 全体を把握 → 範囲を特定 → 再実行で `--start`/`--end` → より細かいタイムコード → さらに掘り下げる。短いウィンドウではサブ秒のタイムコード（`1:07.3`）が付与されるため、隣接セルを区別できます。ウィンドウ指定の実行ではさらに `"window": { "start": …, "end": … }` （解決済みの境界、秒）を `--json` 出力に含めます — ウィンドウが指定されていない場合、そのキーはありません。

## 次へ

* [ナビゲーションのループ](/squish/ja/purimitibu/the-navigation-loop.md) — エージェントが全体把握 → 拡大 → 拡大をつなぎ、クリップを再生し直すのではなく証拠に基づいて回答する方法です。
* [CLI リファレンス](/squish/ja/rifarensu/cli.md) — すべてのフラグ、終了コード、完全な JSON 契約です。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://getsquish.gitbook.io/squish/ja/hajimeni/quickstart-cli.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
