notebooklm-cli
2026-03-29
新闻来源:网淘吧
围观:17
电脑广告
手机广告
NotebookLM 命令行界面
概述
此技能通过命令行界面提供对 Google NotebookLM 的完整访问。管理笔记本、资料来源,并生成各种内容格式,包括音频播客、报告、测验、闪卡、思维导图、幻灯片、信息图表、视频和数据表格。
使用此技能的时机
在以下情况下使用此技能:
- 以编程方式管理 NotebookLM 笔记本和资料来源
- 从笔记本资料生成音频概述(播客)
- 创建学习材料:测验、闪卡、报告
- 制作视觉内容:幻灯片、信息图表、思维导图、视频
- 通过聊天或一次性提问查询资料来源
- 自动研究和导入新资料
快速开始
身份验证
nlm login
启动 Chrome,导航至 NotebookLM,并提取会话 cookie。需要安装 Google Chrome。
列出笔记本
nlm notebook list
创建笔记本并添加资料来源
nlm notebook create "My Research"
nlm source add <notebook-id> --url "https://example.com/article"
nlm source add <notebook-id> --text "Your content here" --title "My Notes"
生成内容(所有类型)
所有生成命令都需要--confirm或-y:
nlm audio create <id> --confirm # Podcast
nlm report create <id> --confirm # Briefing doc or study guide
nlm quiz create <id> --confirm # Quiz questions
nlm flashcards create <id> --confirm # Flashcards
nlm mindmap create <id> --confirm # Mind map
nlm slides create <id> --confirm # Slide deck
nlm infographic create <id> --confirm # Infographic
nlm video create <id> --confirm # Video overview
nlm data-table create <id> "description" --confirm # Data table
认证
| 命令 | 描述 |
|---|---|
nlm login | 使用 NotebookLM 进行认证(打开 Chrome) |
nlm login --check | 验证当前凭据 |
nlm auth status | 检查会话有效性 |
nlm auth list | 列出所有配置文件 |
nlm auth delete <profile> --confirm | 删除一个配置文件 |
nlm login --profile <name> | 登录到特定配置文件 |
会话持续约20分钟。如果命令失败,请使用nlm login重新认证。
笔记本管理
| 命令 | 描述 |
|---|---|
nlm notebook list | 列出所有笔记本 |
nlm notebook create "标题" | 创建新笔记本 |
nlm notebook get <id> | 获取笔记本详情 |
nlm notebook describe <id> | AI 生成的摘要 |
nlm notebook query <id> "问题" | 基于来源的对话 |
nlm notebook delete <id> --confirm | 删除笔记本 |
来源管理
| 命令 | 描述 |
|---|---|
nlm source list <notebook-id> | 列出笔记本中的来源 |
nlm source list <notebook-id> --drive | 显示 Drive 来源及其新鲜度 |
nlm source add <id> --url "..." | 添加 URL 或 YouTube 来源 |
nlm source add <id> --text "..." --title "..." | 添加粘贴的文本 |
nlm source add <id> --drive <doc-id> | 添加谷歌云端硬盘文档 |
nlm source describe <source-id> | AI 对来源的总结 |
nlm source content <source-id> | 获取原始文本内容 |
nlm source stale <notebook-id> | 列出过时的云端硬盘来源 |
nlm source sync <notebook-id> --confirm | 同步云端硬盘来源 |
内容生成
所有生成命令都需要--confirm或-y:
媒体类型
| 命令 | 输出 |
|---|---|
nlm audio create <id> --confirm | 音频播客概览 |
nlm report create <id> --confirm | 简报文档或学习指南 |
nlm quiz create <id> --confirm | 测验问题 |
nlm flashcards create <id> --confirm | 记忆卡片 |
nlm mindmap create <id> --confirm | 思维导图 |
nlm slides create <id> --confirm | 幻灯片 |
nlm infographic create <id> --confirm | 信息图 |
nlm video create <id> --confirm | 视频概览 |
nlm data-table create <id> "description" --confirm | 数据表提取 |
工作室(工件管理)
| 命令 | 描述 |
|---|---|
nlm studio status <notebook-id> | 列出所有已生成的工件 |
nlm studio delete <notebook-id> <artifact-id> --confirm | 删除一个构件 |
聊天
| 命令 | 描述 |
|---|---|
nlm chat start <笔记本ID> | 启动交互式REPL会话 |
nlm chat configure <笔记本ID> | 配置聊天目标和响应风格 |
nlm notebook query <ID> "问题" | 一次性提问(无会话) |
聊天REPL命令:/sources,/clear,/help,/exit
研究
| 命令 | 描述 |
|---|---|
nlm research start "查询" --notebook-id <ID> | 网络搜索(约30秒) |
nlm research start "查询" --notebook-id <ID> --mode deep | 深度研究(约5分钟) |
nlm research start "查询内容" --notebook-id <ID> --source drive | 搜索Google Drive |
nlm research status <笔记本ID> | 检查研究进度 |
nlm research import <笔记本ID> <任务ID> | 导入已发现的来源 |
别名(UUID快捷方式)
nlm alias set myproject <uuid> # Create alias
nlm notebook get myproject # Use alias
nlm alias list # List all aliases
nlm alias get myproject # Resolve to UUID
nlm alias delete myproject # Remove alias
输出格式
大多数列表命令支持多种格式:
nlm notebook list # Rich table (default)
nlm notebook list --json # JSON output
nlm notebook list --quiet # IDs only (for scripting)
nlm notebook list --title # "ID: Title" format
nlm notebook list --full # All columns
配置文件(多账户)
nlm login --profile work # Login to profile
nlm notebook list --profile work # Use profile
nlm auth list # List all profiles
nlm auth delete work --confirm # Delete profile
配置
nlm config show # Show current configuration
nlm config get <key> # Get specific setting
nlm config set <key> <value> # Update setting
AI文档
为AI助手生成全面文档:
nlm --ai
输出超过400行内容,涵盖所有命令、认证流程、错误处理、任务序列和自动化技巧。
参考
文章底部电脑广告
手机广告位-内容正文底部
上一篇:Twitter Operations
下一篇:Email Send


微信扫一扫,打赏作者吧~