{"id":32696210,"url":"https://github.com/K-dash/nblm-rs","last_synced_at":"2025-11-01T19:02:09.575Z","repository":{"id":319594389,"uuid":"1079093088","full_name":"K-dash/nblm-rs","owner":"K-dash","description":"An unofficial NotebookLM Enterprise API client built on a Rust core, with interfaces for both the CLI and a Python SDK.","archived":false,"fork":false,"pushed_at":"2025-10-30T00:00:49.000Z","size":278,"stargazers_count":19,"open_issues_count":10,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-30T01:07:02.154Z","etag":null,"topics":["api-client","cli","enterprise","gemini","google-cloud","hacktoberfest","notebooklm","python","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/K-dash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-19T04:37:37.000Z","updated_at":"2025-10-30T00:25:25.000Z","dependencies_parsed_at":"2025-10-19T17:05:43.591Z","dependency_job_id":"40acf1b5-8b8f-4d7f-82b3-0140eaae9d01","html_url":"https://github.com/K-dash/nblm-rs","commit_stats":null,"previous_names":["k-dash/nblm-rs"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/K-dash/nblm-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K-dash%2Fnblm-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K-dash%2Fnblm-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K-dash%2Fnblm-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K-dash%2Fnblm-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/K-dash","download_url":"https://codeload.github.com/K-dash/nblm-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K-dash%2Fnblm-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":282188968,"owners_count":26628981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-01T02:00:06.759Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","cli","enterprise","gemini","google-cloud","hacktoberfest","notebooklm","python","rust"],"created_at":"2025-11-01T19:00:42.549Z","updated_at":"2025-11-01T19:02:09.564Z","avatar_url":"https://github.com/K-dash.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n  \u003cimg width=\"256\" alt=\"logo\" src=\"https://github.com/user-attachments/assets/37f0f882-65ca-436e-8053-3db8c18cac59\" /\u003e\n\n  # _nblm-rs_\n\n  **Unofficial NotebookLM Enterprise API client**\n\n  🦀 **Rust CLI**: Command-line tool for shell scripting and automation \u003cbr/\u003e\n  🐍 **Python SDK**: Python bindings for integration in Python applications\n\n  [![Crates.io](https://img.shields.io/crates/v/nblm-cli.svg)](https://crates.io/crates/nblm-cli)\n  [![Crates.io](https://img.shields.io/crates/d/nblm-cli.svg?color=orange\u0026label=downloads)](https://crates.io/crates/nblm-cli)\n  [![codecov](https://codecov.io/gh/K-dash/nblm-rs/graph/badge.svg?token=OhxeTdnxTw)](https://codecov.io/gh/K-dash/nblm-rs)\n  \u003cbr/\u003e\n  [![PyPI](https://img.shields.io/pypi/v/nblm.svg?color=blue)](https://pypi.org/project/nblm/)\n  [![Python versions](https://img.shields.io/pypi/pyversions/nblm.svg)](https://pypi.org/project/nblm/)\n  [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)\n  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n  [![mypy](https://img.shields.io/badge/mypy-checked-blue.svg)](https://mypy-lang.org/)\n  \n\n\u003c/div\u003e\n\n\u003e [!IMPORTANT]\n\u003e This project targets the **NotebookLM Enterprise API** only. Google hasn’t published an API for the consumer edition or general Google Workspace tenants as of 2025-10-25.\n\n## Motivation\n\nIn September 2025, Google released the [NotebookLM Enterprise API](https://cloud.google.com/gemini/enterprise/notebooklm-enterprise/docs/overview), enabling programmatic access to NotebookLM features for the first time.\n\nWhile you can interact with the API using simple `curl` commands, this approach has several limitations that this project addresses:\n\n### Challenges with Direct API Calls\n\n- **Authentication complexity**\n  - **Problem**: Managing OAuth tokens, handling token refresh, and ensuring secure credential storage\n  - **Solution**: Seamless `gcloud` CLI integration with automatic token caching and refresh\n\n- **Manual request construction**\n  - **Problem**: Writing JSON payloads by hand, managing resource names, and handling API versioning\n  - **Solution**: Type-safe CLI flags and Python SDK with intelligent defaults and validation\n\n- **Error handling**\n  - **Problem**: Cryptic HTTP error codes without context or recovery suggestions\n  - **Solution**: Clear, actionable error messages with automatic retries for transient failures\n\n- **Repeated operations**\n  - **Problem**: Writing boilerplate loops for fetch/add/delete sequences\n  - **Solution**: Higher-level client helpers and CLI flags that wrap single API calls (with retries built in) so scripts stay concise\n\n- **Output parsing**\n  - **Problem**: Manual JSON parsing and extracting specific fields from responses\n  - **Solution**: Structured response objects in the Python SDK and `--json` output in the CLI for easy integration with tools like `jq`\n\n### Project Goals\n\nThis project provides production-ready tools that make the NotebookLM API accessible and reliable:\n\n- **Rust CLI**: Fast, cross-platform binary for shell scripting and automation\n- **Python SDK**: Idiomatic Python bindings for application integration\n- **Type safety**: Compile-time checks prevent common API usage errors\n- **Developer experience**: Intuitive commands and clear documentation\n\n## Installation\n\n### macOS (Homebrew)\n\n```bash\nbrew tap k-dash/nblm https://github.com/K-dash/homebrew-nblm\nbrew install k-dash/nblm/nblm\nnblm --version\n```\n\n### Linux (Prebuilt binaries)\n\nDownload the tarball for your architecture from the [Releases](https://github.com/K-dash/nblm-rs/releases) page, then extract and install it. Example for x86_64:\n\n```bash\nVERSION=x.x.x\nARCH=linux-x86_64   # or linux-aarch64\ncurl -LO https://github.com/K-dash/nblm-rs/releases/download/v${VERSION}/nblm-${ARCH}.tar.gz\ntar -xzf nblm-${ARCH}.tar.gz\nchmod +x nblm\nsudo mv nblm /usr/local/bin/\nnblm --version\n```\n\n\u003e Optional: verify the download with `shasum -a 256 nblm-${ARCH}.tar.gz` and compare with the digest listed on the release page.\n\n### Build from source\n\n```bash\ngit clone https://github.com/K-dash/nblm-rs.git\ncd nblm-rs\ncargo build --release -p nblm-cli\n./target/release/nblm --version\n```\n\nYou can also install the CLI locally with `cargo install --path crates/nblm-cli`.\n\n### Python SDK\n\n```bash\npip install nblm\n# or\nuv add nblm\n```\n\n\u003e Prerequisite: a Google Cloud project with the NotebookLM Enterprise API enabled and either `gcloud auth login` or an OAuth token ready for `NBLM_ACCESS_TOKEN`.\n\nFor detailed setup and troubleshooting, see the documentation in [docs/](docs/).\n\n## Quick Start\n\n### CLI\n\n```bash\n# 1. Authenticate\ngcloud auth login\n\n# 2. Set environment variables\nexport NBLM_PROJECT_NUMBER=\"123456789012\"  # Get from GCP console\nexport NBLM_LOCATION=\"global\"\nexport NBLM_ENDPOINT_LOCATION=\"global\"\n\n# 3. Create a notebook\nnblm notebooks create --title \"My Notebook\"\n\n# 4. Add a source\nnblm sources add \\\n  --notebook-id YOUR_NOTEBOOK_ID \\\n  --web-url \"https://example.com\" \\\n  --web-name \"Example\"\n```\n\n### Python\n\n```python\nfrom nblm import NblmClient, GcloudTokenProvider, WebSource\n\n# Initialize client\nclient = NblmClient(\n    token_provider=GcloudTokenProvider(),\n    project_number=\"123456789012\"\n)\n\n# Create a notebook\nnotebook = client.create_notebook(title=\"My Notebook\")\n\n# Add sources\nresponse = client.add_sources(\n    notebook_id=notebook.notebook_id,\n    web_sources=[WebSource(url=\"https://example.com\", name=\"Example\")]\n)\n```\n\n## Features (Verified as of 2025-10-25)\n\n\u003e [!NOTE]\n\u003e The NotebookLM API is currently in alpha. Some features may not work as documented due to API limitations. See [Known API Issues](#known-api-issues) for details.\n\n### Notebooks\n\n| Feature               | CLI | Python | Status  | Notes                                |\n| --------------------- | --- | ------ | ------- | ------------------------------------ |\n| Create notebook       | ◯   | ◯      | Working |                                      |\n| List recent notebooks | ◯   | ◯      | Working | Pagination not implemented by API    |\n| Delete notebook(s)    | ◯   | ◯      | Working | Sequential deletion (API limitation) |\n\n### Sources\n\n| Feature             | CLI | Python | Status      | Notes                   |\n| ------------------- | --- | ------ | ----------- | ----------------------- |\n| Add web URL         | ◯   | ◯      | Working     |                         |\n| Add text content    | ◯   | ◯      | Working     |                         |\n| Add video (YouTube) | ◯   | ◯      | Working     | Uses `youtubeUrl` field |\n| Add Google Drive    | ◯   | ◯      | Working     | Requires Drive-enabled auth |\n| Upload file         | ◯   | ◯      | Working     |                         |\n| Delete source(s)    | ◯   | ◯      | Working     |                         |\n| Get source by ID    | ◯   | ◯      | Working     |                         |\n\n### Audio Overview\n\n| Feature               | CLI | Python | Status  | Notes                       |\n| --------------------- | --- | ------ | ------- | --------------------------- |\n| Create audio overview | ◯   | ◯      | Working | Config fields not supported |\n| Delete audio overview | ◯   | ◯      | Working |                             |\n\n### Sharing\n\n| Feature        | CLI | Python | Status   | Notes                     |\n| -------------- | --- | ------ | -------- | ------------------------- |\n| Share notebook | ◯   | ✗      | Untested | Requires additional users |\n\n\n## Platform Support\n\n| Platform | CLI | Python SDK |\n|----------|-----|------------|\n| Linux    | [![Linux CLI supported](https://img.shields.io/badge/support-%E2%9C%85-green)](https://shields.io) | [![Linux Python SDK supported](https://img.shields.io/badge/support-%E2%9C%85-green)](https://shields.io) |\n| macOS    | [![macOS CLI supported](https://img.shields.io/badge/support-%E2%9C%85-green)](https://shields.io) | [![macOS Python SDK supported](https://img.shields.io/badge/support-%E2%9C%85-green)](https://shields.io) |\n| Windows  | [![Windows CLI not supported](https://img.shields.io/badge/support-%E2%9D%8C-red)](https://shields.io) | [![Windows Python SDK not supported](https://img.shields.io/badge/support-%E2%9D%8C-red)](https://shields.io) |\n\n\n## Documentation\n\n**Complete guides and API references:**\n\n- [Getting Started](docs/getting-started/installation.md) - Installation, authentication, configuration\n- [CLI Reference](docs/cli/README.md) - All commands, options, and examples\n- [Python SDK Reference](docs/python/README.md) - API reference and usage patterns\n\n## Known API Issues\n\n\u003e [!NOTE]\n\u003e The NotebookLM API is currently in **alpha** and has several known limitations. See [API Limitations](docs/api/limitations.md) for details.\n\n## Related Resources\n\n- [NotebookLM API Documentation](https://cloud.google.com/gemini/enterprise/notebooklm-enterprise/docs/overview) - Official API documentation\n- [NotebookLM API Reference](https://cloud.google.com/gemini/enterprise/notebooklm-enterprise/docs/api-notebooks) - API reference\n\n## Contributing\n\nContributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.\n\n\u003e [!IMPORTANT]\n\u003e All pull requests must pass `cargo make all` (Rust) and `cargo make py-all` (Python) before being merged.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FK-dash%2Fnblm-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FK-dash%2Fnblm-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FK-dash%2Fnblm-rs/lists"}