nlm-custom-prompt-viewer
v0.0.4
Published
CLI to recover Studio custom prompts from NotebookLM artifacts
Downloads
547
Maintainers
Readme
nlm-custom-prompt-viewer
Recover and reuse custom prompts used by NotebookLM Studio artifacts from the command line.
[!IMPORTANT] This project depends on
notebooklm-sdk(unofficial reverse-engineered API behavior).
Breakages can happen when NotebookLM internals change.
Features
- Extract custom prompts from Studio artifacts:
slides,video,audio,quiz,flashcards,report,mind_map,infographic,data_table
- Two extraction modes:
- Fast (default): direct metadata extraction (
method: direct,confidence: high) - Infer (
--infer): Q&A fallback when direct extraction is unavailable (method: qa_fallback,confidence: inferred)
- Fast (default): direct metadata extraction (
- Save outputs as
jsonand/ormd - Download artifact outputs with notebook-scoped save paths
- Multilingual CLI messages:
- default
en - switchable to
ja
- default
- Auth lifecycle commands with secure local storage strategy:
- keychain-first (
keytar, when available) - strict file fallback (
~/.notebooklm/session.json,0600check)
- keychain-first (
- Cached update notifications (24h window)
Installation
bun install
bun run buildGlobal usage:
bun add -g nlm-custom-prompt-viewerQuick Start
- Authenticate once:
nlmv auth login- List prompts in a notebook:
nlmv prompt list <notebookId>- Get one artifact prompt and save both formats:
nlmv prompt get <notebookId> <artifactId> --save- Download one artifact or all exportable artifacts:
nlmv prompt download <notebookId> <artifactId>
nlmv prompt download <notebookId> a1,a2
nlmv prompt download-all <notebookId>CLI Overview
Prompt commands
nlmv prompt list <notebookId> [--type <artifactType>] [--json] [--limit <n>] [--infer]
nlmv prompt get <notebookId> <artifactId> [--json] [--save] [--format json|md] [--out <path>]
nlmv prompt download <notebookId> <artifactId|artifactId,artifactId> [--out <path>] [--slide-format pdf|pptx]
nlmv prompt download-all <notebookId> [--out <path>] [--slide-format pdf|pptx]Config commands
nlmv config get [key]
nlmv config set language [en|ja]
nlmv config resetAuth commands
nlmv auth status
nlmv auth login
nlmv auth logoutUpdate commands
nlmv update checkExtraction Modes
| Mode | Flag | method | confidence | Speed |
|----------------|-----------|---------------|-------------|-------|
| Fast (default) | — | direct | high | Fast |
| Infer | --infer | qa_fallback | inferred | Slow |
prompt list defaults to fast mode. Pass --infer to fall back to Notebook Q&A
for artifacts where direct extraction yields no result.
prompt get always attempts direct extraction first, then falls back to Q&A
automatically — --infer is not required for single-artifact retrieval.
Output Behavior
prompt list:- table output by default
- machine-readable with
--json
prompt get --savedefault paths:./outputs/<slug>.json./outputs/<slug>.md<slug>=slugify(artifactTitle)(lowercase + hyphens); falls back toartifactId- Example: "My AI Podcast" →
./outputs/my-ai-podcast.json
prompt download/prompt download-alldefault paths:./outputs/downloads/<notebookId>/<slug>.<ext><slug>=slugify(artifactTitle)(lowercase + hyphens); falls back toartifactIdslidesdefault to.pdf; use--slide-format pptxfor.pptx- Extensions:
video→.mp4audio→.mp3slides→.pdfor.pptxinfographic→.pngreport→.mdquiz/flashcards→.htmldata_table→.csvmind_map→.json
--out <path>behavior:- Directory (no
.json/.mdextension): saves<path>/<slug>.<format>for each format - File (
.jsonor.mdextension) +--format <fmt>: saves directly to<path> - Tilde expansion is supported (
~/docs→$HOME/docs)
- Directory (no
- download
--out <path>behavior:prompt download: file extension included = write directly to that file, otherwise treat as directoryprompt download-all: always treats--outas a directory
--format json|mdlimits output to one format (default: both)- download progress:
- binary artifact downloads use
cli-progress - when
Content-Lengthis available, progress is byte-accurate - when it is missing, the CLI falls back to bytes-received display without fake percentages
- binary artifact downloads use
- Config file:
~/.config/nlm-prompt/config.json(override:$XDG_CONFIG_HOME/nlm-prompt/config.json) - Session file:
~/.notebooklm/session.json
Interactive Mode
Run without arguments to enter the interactive menu:
nlmvArrow-key navigation covers all commands. Required arguments can also be omitted to trigger inline prompts:
nlmv prompt list # prompts for notebook ID interactively
nlmv prompt get # prompts for notebook + artifact selection, then offers save/download
nlmv prompt download # prompts for notebook + artifact multi-selection
nlmv prompt download-all # prompts for notebook selection
nlmv config set # prompts for key and valueLanguage Configuration
Default language is en.
nlmv config set language ja
nlmv config set language enIf you omit the value, interactive selection is shown.
Development
With Bun scripts
bun run typecheck
bun run test
bun run build
bun run ciWith justfile
just install
just typecheck
just test
just build
just ci
just prompt-download <notebookId> <artifactId>
just prompt-download-all <notebookId>
just cli "prompt download <notebookId> <artifactId> --slide-format pptx"Notes
[!TIP] For automation, prefer
--jsonoutput and pipe results into your own tooling.
[!NOTE] If
keytaris unavailable in your runtime, the CLI automatically falls back to secure file-based session storage.
[!NOTE] For tests or debugging, you can force file-only session handling with
NLM_PROMPT_DISABLE_KEYTAR=1. This does not change the meaning ofNLM_PROMPT_SESSION_FILE; it only bypasses keychain lookup.
[!NOTE]
nlm-promptis an alias fornlmv— both point to the same binary.
