notebooklm-skill

repository·main·Indexed 18 days ago

https://github.com/claude-world/notebooklm-skill

A source-grounded automation tool for Google NotebookLM featuring a CLI, MCP server, and Claude Code Skill. It provides interfaces for humans and AI agents to create notebooks, perform research, and generate artifacts. Key capabilities include the research-to-article and research-to-social pipelines, trend-to-content automation via trend-pulse, and the generation of slides, podcasts, and video assets from notebook content.

Tokens
20.3K
Snippets
63
Records
83
Agent score
61%

What's inside notebooklm-skill

  1. Best practices for research-to-article workflows

    main

    When using the research-to-article pipeline and manual augmentation, follow these guidelines:

    • Use Notebook IDs: Always use the specific --notebook ID for automation to avoid ambiguity caused by duplicate titles.
    • Source Diversity: Mix official documentation with independent studies. Avoid treating multiple restatements of the same source as distinct pieces of evidence.
    • Preserve Citations: Ensure that references from the JSON output are saved alongside the article claims.
    • Handle Failures: Do not ignore source import failures. Address any errors in source_summary.failed before using the generated draft.
  2. Install notebooklm-skill

    main

    You can install notebooklm-skill using several methods depending on your environment requirements.

    From a source checkout

    Clone the repository and run the provided installer. This uses an isolated environment at ${XDG_DATA_HOME:-~/.local/share}/notebooklm-skill/venv to avoid system Python conflicts. Commands are linked to ${XDG_BIN_HOME:-~/.local/bin}.

    Environment Variables:

    • NOTEBOOKLM_INSTALL_ROOT: Override the installation directory.
    • XDG_BIN_HOME: Override the directory where commands are linked.
    • NOTEBOOKLM_PYTHON: Specify a custom Python executable.
    • NOTEBOOKLM_INSTALL_EDITABLE=1: Perform an editable install for development.
    • NOTEBOOKLM_SKIP_BROWSER=1: Skip Chromium installation (requires manual playwright install chromium later).
    • NOTEBOOKLM_SKIP_SKILL=1: Skip installing the Claude Code Skill.
    • NOTEBOOKLM_SKIP_AUTH_CHECK=1: Skip authentication checks during install.

    From PyPI

    Install via pip into a virtual environment and manually install the required Chromium browser.

    Using uvx

    Run commands in an ephemeral environment without a persistent installation.

    # Source checkout
    git clone https://github.com/claude-world/notebooklm-skill.git
    cd notebooklm-skill
    ./install.sh
    
    # PyPI
    python3 -m venv .venv
    source .venv/bin/activate
    python -m pip install notebooklm-skill
    python -m playwright install chromium
    
    # uvx
    uvx --from notebooklm-skill notebooklm-skill --help
  3. Authenticate with NotebookLM Research

    main

    Before running workflows, ensure you are authenticated. You can use the profile-aware helper for persistent sessions or a zero-install method for one-off logins.

    Persistent Authentication

    Use notebooklm-auth to manage sessions. You can specify a specific browser (e.g., Chrome) if you prefer it over the bundled Chromium.

    Zero-Install Login

    If you do not want a persistent installation, use uvx to run the login command directly.

    Profiles

    Support for multiple profiles is available via the --profile NAME flag or the NOTEBOOKLM_PROFILE environment variable. Sessions are stored in ~/.notebooklm/profiles/<profile>/storage_state.json (do not access this file directly).

    # Standard setup and verification
    notebooklm-auth setup
    notebooklm-auth verify
    
    # Use local Chrome instead of bundled Chromium
    notebooklm-auth setup --browser chrome --fresh
    
    # Zero-install login
    uvx --from notebooklm-py notebooklm login
  4. Install notebooklm-skill via Isolated Source Install

    main

    To perform an isolated source installation, clone the repository and run the provided installer. This creates a dedicated virtual environment, installs Chromium, links five commands into ~/.local/bin, and installs the Claude Code Skill using the standard directory layout. Ensure ~/.local/bin is in your PATH after installation.

    git clone https://github.com/claude-world/notebooklm-skill.git
    cd notebooklm-skill
    ./install.sh
    
    notebooklm-auth setup
    notebooklm-skill list
  5. Generate and Download NotebookLM Artifacts

    main

    Generate various artifact types from your notebook content.

    Supported Types

    audio, video, cinematic, slides, report, study-guide, quiz, flashcards, mind-map, infographic, data-table.

    Generation Workflow

    For long-running media jobs, use --no-wait to get a task ID. You can then list artifacts to find the specific ARTIFACT_ID and download it later.

    Output Formats

    • Quizzes/Flashcards: Supports json, markdown, or html.
    • Slides: Supports pdf or pptx.

    Note: Existing files will be rejected unless you use the --force flag.

    # Generate slides with specific formatting
    notebooklm-skill generate \
      --notebook "AI safety evidence" \
      --type slides --lang zh-TW \
      --slide-format presenter-slides \
      --output ./output/deck.pptx --output-format pptx
    
    # Detached media generation and download
    notebooklm-skill generate --notebook NOTEBOOK_ID --type audio --no-wait
    notebooklm-skill list-artifacts --notebook NOTEBOOK_ID --type audio
    notebooklm-skill download --notebook NOTEBOOK_ID --type audio \
      --artifact-id ARTIFACT_ID --output ./output/podcast.m4a
  6. Manage Notebooks and Sources with Core CLI

    main

    The notebooklm-skill CLI allows you to create notebooks from mixed sources (URLs, files, and text), inspect them, and ask questions.

    Creating a Notebook

    You can combine multiple source types in a single command. Use --strict to ensure source integrity.

    Adding Sources

    To add a single source to an existing notebook, use the specific flags for --url, --file, or --text.

    Inspecting and Querying

    Use list to see notebooks, list-sources to see what is inside a notebook, and ask to perform grounded queries.

    # Create a notebook from mixed sources
    notebooklm-skill create \
      --title "AI safety evidence" \
      --sources https://example.com/article https://youtu.be/example \
      --files ./paper.pdf \
      --text-sources "A user-supplied observation" \
      --strict
    
    # Add a single source
    notebooklm-skill add-source --notebook "AI safety evidence" --url https://example.com/new
    
    # Query the notebook
    notebooklm-skill ask --notebook "AI safety evidence" --query "What findings conflict?"
  7. Perform Web Research with NotebookLM

    main

    Run web research to find new information and optionally import it into your notebook.

    • Use --mode deep for thorough research.
    • Use --max-sources to limit the number of web sources found.
    • Use --no-wait to receive a task ID immediately without waiting for completion.
    • Use --no-import-results if you want to perform the research without adding the findings as sources to the notebook.
    notebooklm-skill research \
      --notebook "AI safety evidence" \
      --query "Recent empirical evaluations" \
      --mode deep --max-sources 10
  8. Verify pipeline success and handle partial failures

    main

    The trend-to-content pipeline processes multiple trends. A failure in a single topic does not stop the entire process, so you must check the output JSON for partial success. Do not assume the pipeline succeeded just because the output file exists; check the partial signal and the status of individual results.

    # Check overall status and counts
    jq '{status, processed: .trends_processed, failed: .trends_failed}' trends-result.json
    
    # Inspect individual topic results
    jq '.results[] | {topic, status, research_error, source_summary: .initial_source_summary}' \
      trends-result.json
  9. Configure authentication and profiles

    main

    Use notebooklm-auth to manage authentication profiles. You can specify a profile using the --profile NAME flag before any subcommand or by setting the NOTEBOOKLM_PROFILE environment variable.

    To use your local Google Chrome instead of the bundled Chromium during setup, use the --browser chrome flag.

    Commands:

    • notebooklm-auth setup: Initialize authentication.
    • notebooklm-auth --profile NAME verify: Verify a specific profile.
    • notebooklm-auth setup --browser chrome --fresh: Re-setup using local Chrome.
    notebooklm-auth setup --browser chrome --fresh
  10. Authenticate and manage NotebookLM profiles

    main

    NotebookLM uses browser-based authentication instead of API keys. The authentication state (session cookies) is stored in a browser state file and should be treated as sensitive data (like a password).

    Profile Management

    You can use named profiles to separate different Google accounts. Profiles are typically stored in ~/.notebooklm/profiles/<profile>/storage_state.json.

    Authentication Tasks

    • Setup/Verify: Run setup to start the login flow and verify to check the current session.
    • Using Chrome: If the bundled Chromium fails, you can use your system's Google Chrome.
    • Clearing Session: Use clear to log out of a specific profile.

    Note: Never commit or share the storage_state.json files.

    # Basic setup and verification
    notebooklm-auth setup
    notebooklm-auth verify
    
    # Using system Chrome instead of bundled Chromium
    notebooklm-auth setup --browser chrome --fresh
    
    # Managing named profiles (e.g., 'work')
    notebooklm-auth --profile work setup
    notebooklm-auth --profile work verify
    notebooklm-skill --profile work list
    
    # Logging out of a specific profile
    notebooklm-auth --profile work clear --yes
    
    # Using an environment variable to select a profile
    export NOTEBOOKLM_PROFILE=work
  11. Install notebooklm-skill via PyPI or uvx

    main

    You can install the package via PyPI into a persistent virtual environment or run it without a persistent install using uvx.

    Persistent Virtual Environment:

    python3 -m venv .venv
    source .venv/bin/activate
    python -m pip install notebooklm-skill
    python -m playwright install chromium
    notebooklm-auth setup

    Run without persistent install (using uvx):

    uvx --from notebooklm-skill notebooklm-auth setup
    uvx --from notebooklm-skill notebooklm-skill list

    Direct upstream login:

    uvx --from notebooklm-py notebooklm login
    uvx --from notebooklm-skill notebooklm-auth setup