notebooklm について
notebooklm は、Google NotebookLM をコマンドラインから操作するプラグインです。ノートブックやソースを管理し、引用付きの質問応答や複数形式の成果物生成を行えます。
主な機能
- 01ソースに基づく引用付き質問応答
- 02スライド、音声、動画の生成
- 03マインドマップや学習教材の作成
- 04レポート、インフォグラフィック、データ表の生成
- 05ノートブック、ソース、ノートの管理
活用シーン
- 01ノートブックの資料を要約して追加質問
- 02調査内容を複数形式で出力
- 03ノートブックのソースと個人メモを管理
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ proyecto26/ notebooklm-ai-plugin --skill notebooklmインストール後、Claude Code で/notebooklmを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
scripts/artifact-generator.tsauth.tschat.tsconstants.tscookie-store.tsget-cookie.tsmain.tsnotebook-manager.tsnotes-manager.tspaths.tsresearch-manager.tsrpc-client.tsrpc-types.tssource-manager.tstypes.ts詳細
NotebookLM AI Plugin
ターミナルから Google NotebookLM(https://notebook.google.com)を操作します。notebook.google.com と notebooklm.google.com のどちらのノートブック URL にも対応しています。
対応機能:
- Notebook AI とのチャット(出典に基づく質疑応答と引用)
- スライドデッキの生成(PPTX/PDF)
- Audio Overview(M4A — 詳細、簡潔、批評、ディベート形式)
- Video Overview(MP4 — 自動、クラシック、ホワイトボード、かわいい、アニメ、水彩、レトロ印刷、ヘリテージ、ペーパークラフトのスタイル)
- マインドマップ(JSON ツリー)
- フラッシュカード/クイズ(インタラクティブ HTML)
- インフォグラフィック(PNG — 横長、縦長、正方形;11 種類のビジュアルスタイル)
- レポート(Markdown — ブリーフィング資料、学習ガイド、ブログ記事、カスタムプロンプト)
- データテーブル(CSV)
- ソース管理(URL、YouTube、ファイル、貼り付けたテキストの追加;一覧表示、削除)
- 高速/詳細なウェブ調査と自動インポート
- ノート管理(作成、更新、削除、一覧表示)
- ノートブックライブラリ管理(追加、一覧表示、検索、アクティブ化)+アカウント内のノートブック一覧表示
すべてのコマンドは、このスキルディレクトリから実行します。
cd <skill-dir> # the folder containing SKILL.md
npx -y bun scripts/main.ts <command> [options]
クイックスタート
# 1. Authenticate (opens Chrome for Google login; cookies are cached)
npx -y bun scripts/main.ts login
# 2. Check the session and see your notebooks (ids + source counts)
npx -y bun scripts/main.ts notebooks remote
# 3. Save one as the default
npx -y bun scripts/main.ts notebooks add https://notebook.google.com/notebook/<id> --name "My Research"
# 4. Use it
npx -y bun scripts/main.ts chat --question "What are the key findings?"
npx -y bun scripts/main.ts generate slide_deck --output slides.pdf
npx -y bun scripts/main.ts generate audio --format deep_dive --length long
npx -y bun scripts/main.ts generate quiz --difficulty medium --quantity more --output quiz.html
npx -y bun scripts/main.ts generate data_table --instructions "Compare the frameworks" --output table.csv
認証
login を実行すると Chrome が起動し(データディレクトリ内に専用プロファイルが作成されます)、notebook.google.com へのサインインを待ってから、Google のセッション Cookie を取得します。Cookie の有効期限は数週間後です。ログインへのリダイレクトが発生したコマンドでは、login --force の実行が案内されます。
npx -y bun scripts/main.ts login # reuse cached cookies if still valid
npx -y bun scripts/main.ts login --force # always re-open Chrome
npx -y bun scripts/main.ts notebooks remote # fast auth check: lists notebooks from your account
すべての RPC 呼び出しでは、アプリページから最新の CSRF トークン(SNlM0e)とセッション ID(FdrFJe)を取得するため、ほかに更新が必要なものはありません。オリジンが再び変更された場合は、NOTEBOOKLM_BASE_URL を設定するか、scripts/constants.ts を編集してください。
コマンド
ノートブック管理
npx -y bun scripts/main.ts notebooks remote # notebooks on your Google account (live)
npx -y bun scripts/main.ts notebooks list # local library
npx -y bun scripts/main.ts notebooks add <url> [--name <name>] [--description <desc>] [--topics <t1,t2>]
npx -y bun scripts/main.ts notebooks remove <id>
npx -y bun scripts/main.ts notebooks activate <id> # default for every other command
npx -y bun scripts/main.ts notebooks search <query>
Notebook AI とのチャット
npx -y bun scripts/main.ts chat --question "What are the key findings?" --notebook <url|id>
npx -y bun scripts/main.ts chat --question "Tell me more about that" --conversation-id <id>
npx -y bun scripts/main.ts chat --question "Summarize the methodology" --json # answer + citations
チャットでは、ノートブック内の 準備完了 状態にあるすべてのソースを使用します。引用にはソース ID が記載されます(sources list を参照)。
ソース管理
npx -y bun scripts/main.ts sources list --notebook <url|id> # id, title, type, status, url
npx -y bun scripts/main.ts sources add-url https://example.com/article
npx -y bun scripts/main.ts sources add-youtube https://youtube.com/watch?v=xxx
npx -y bun scripts/main.ts sources add-text --title "My Notes" --content "Important findings..."
npx -y bun scripts/main.ts sources add-file ./paper.pdf
npx -y bun scripts/main.ts sources delete <sourceId>
新しいソースはしばらくの間 status: processing と表示されます。生成とチャットで使用されるのは、ステータスが ready のソースのみです。対応ファイル:PDF、TXT、MD、DOCX、PPTX、CSV、EPUB、画像(PNG、JPG、WEBP)、音声/動画。
調査
npx -y bun scripts/main.ts research fast --query "latest AI agent frameworks" # ~1–3 min
npx -y bun scripts/main.ts research deep --query "state of LLM reasoning" # ~5–10 min, produces a report
npx -y bun scripts/main.ts research fast --query "topic" --import # import found sources
npx -y bun scripts/main.ts research status
ノート
npx -y bun scripts/main.ts notes list
npx -y bun scripts/main.ts notes create --title "Key Takeaways" --content "1. Finding one..."
npx -y bun scripts/main.ts notes update <noteId> --title "Updated" --content "New content"
npx -y bun scripts/main.ts notes delete <noteId>
アーティファクト
npx -y bun scripts/main.ts artifacts list # everything in the Studio panel, with status
npx -y bun scripts/main.ts generate <type> [options]
種類:slide_deck、audio、video、mind_map、flashcards、quiz、infographic、report、data_table
生成は Google 側で非同期に実行されます。コマンドはアーティファクトを作成し、Studio の一覧をポーリングして、生成が完了し、かつダウンロード URL が利用可能になるまで待機してからダウンロードします(音声/動画には 10~20 分かかる場合があります)。自動ダウンロードに失敗した場合は、ブラウザーで開けるよう URL が表示されます。
オプション
グローバルオプション
| オプション | 説明 |
|---|---|
--notebook <url|id> | ノートブック URL またはライブラリ ID(省略時はアクティブなノートブック) |
--output <path> | 出力ファイルのパス(省略時はデータディレクトリ内に自動で名前を付けて保存) |
--instructions <text> | 生成時のカスタム指示/重点項目 |
--language <code> | 出力言語(デフォルトは en) |
--json | 機械可読形式で出力 |
種類ごとのオプション
| 種類 | オプション |
|---|---|
audio | --format deep_dive|brief|critique|debate、--length short|default|long |
video | --style auto|classic|whiteboard|kawaii|anime|watercolor|retro_print|heritage|paper_craft、--format explainer|brief|cinematic|short |
slide_deck | --format detailed|presenter|pdf|pptx、--length default|short(デフォルトは PPTX。--format pdf または .pdf の出力パスを指定すると PDF が選択されます) |
quiz、flashcards | --difficulty easy|medium|hard、--quantity fewer|standard|more |
infographic | --orientation landscape|portrait|square、--detail concise|standard|detailed、--style auto|sketch_note|professional|bento_grid|editorial|instructional|bricks|clay|anime|kawaii|scientific |
report | --format briefing|study_guide|blog_post|custom、--prompt "<full prompt>"(カスタム) |
mind_map | --instructions のみ |
data_table | --instructions(表にまとめる内容) |
出力形式
| 種類 | 出力 |
|---|---|
slide_deck | PPTX(または PDF) |
audio | M4A |
video | MP4 |
mind_map | JSON ツリー { name, children: [...] } |
flashcards, quiz | 自己完結型のインタラクティブ HTML |
infographic | PNG |
report | Markdown |
data_table | CSV(ヘッダー + 行) |
環境変数
| 変数 | 説明 |
|---|---|
NOTEBOOKLM_BASE_URL | アプリのオリジンの上書き(デフォルト https://notebook.google.com) |
NOTEBOOKLM_DATA_DIR | データディレクトリ(Cookie、ライブラリ、Chrome プロファイル、出力) |
NOTEBOOKLM_COOKIE_PATH | Cookie ファイルのパス |
NOTEBOOKLM_CHROME_PATH / NOTEBOOKLM_CHROME_PROFILE_DIR | Chrome の実行ファイル / プロファイル |
NOTEBOOKLM_OUTPUT_DIR | デフォルトの出力ディレクトリ |
NOTEBOOKLM_BL | チャットリクエストで送信されるビルドラベル(サーバーによる検証なし) |
レート制限(無料プラン)
| リソース | 制限 |
|---|---|
| 音声 / 動画の概要 | 1 日あたり 3 回 |
| レポート / フラッシュカード / クイズ | 1 日あたり 10 回 |
| 1 日あたりのチャット | 50 回 |
| ノートブック | 100 件、各 50 個のソース |
クォータによる拒否は、種類が rate_limit の RPCError として表示されます。
トラブルシューティング
| 症状 | 意味 / 対処法 |
|---|---|
redirected (302) to …/login | Cookie の有効期限が切れています → login --force |
redirected … The app origin may have changed | Google が再びアプリを移動しました → NOTEBOOKLM_BASE_URL を設定してください |
RPC xxxx not present in response … method ID may have changed | Google が RPC ID を更新しました → scripts/rpc-types.ts を更新してください(notebooklm-py と比較してください) |
INVALID_ARGUMENT / FAILED_PRECONDITION | ペイロードの形式が拒否されました — npx -y bun test を実行し、scripts/*-manager.ts を参照プロジェクトと比較してください |
did not return an artifact ID | ノートブックに 準備完了 のソースがないか、アカウントでアーティファクトの種類が有効になっていません |
テスト
cd test
npx -y bun install # dev deps only (typescript, types)
npx -y bun x tsc --noEmit # type-check
npx -y bun test unit # offline: payload shapes + decoders against recorded responses
npx -y bun test live.test.ts # live: auth + read endpoints (skips without a session)
NOTEBOOKLM_LIVE_WRITE=1 npx -y bun test live.test.ts # + add/delete a text source and a note
NOTEBOOKLM_LIVE_GENERATE=quiz npx -y bun test live.test.ts # + generate one artifact end-to-end
スキルレベルの評価(skill-creator ハーネス用のプロンプト + アサーション)は test/evals.json にあります。