docs: comprehensive cleanup for env var documentation

- Fix storage.json -> storage_state.json typo in testing.md
- Add NOTEBOOKLM_HOME, NOTEBOOKLM_AUTH_JSON, NOTEBOOKLM_DEBUG_RPC to .env.example
- Add CI/CD and multiple accounts section to SKILL.md
- Update SECURITY.md with NOTEBOOKLM_HOME note and NOTEBOOKLM_AUTH_JSON for CI/CD

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Teng Lin 2026-01-08 14:29:49 -05:00
parent 54d589a7ae
commit ec15f4926c
4 changed files with 45 additions and 9 deletions

View file

@ -1,7 +1,27 @@
# NotebookLM E2E Test Configuration
# NotebookLM Configuration
# Copy this file to .env and fill in your values
# Required: Your test notebook ID
# =============================================================================
# Configuration Environment Variables
# =============================================================================
# Custom home directory for all config files (optional)
# Default: ~/.notebooklm
# NOTEBOOKLM_HOME=/custom/path
# Inline authentication JSON for CI/CD (optional)
# When set, authentication is read from this variable instead of a file
# Get the value from: cat ~/.notebooklm/storage_state.json
# NOTEBOOKLM_AUTH_JSON='{"cookies":[...]}'
# Enable RPC debug logging (optional)
# NOTEBOOKLM_DEBUG_RPC=1
# =============================================================================
# E2E Testing Configuration
# =============================================================================
# Required for E2E tests: Your test notebook ID
# Create a notebook at https://notebooklm.google.com with:
# - Multiple sources (text, URL, PDF, etc.)
# - Some pre-generated artifacts (audio, quiz, etc.)

View file

@ -21,11 +21,13 @@ This library stores authentication credentials locally. Please understand these
### Storage Locations
Default location is `~/.notebooklm/` (can be changed via `NOTEBOOKLM_HOME` environment variable):
| File | Contents | Permissions |
|------|----------|-------------|
| `~/.notebooklm/storage_state.json` | Google session cookies | `0o600` (owner-only) |
| `~/.notebooklm/browser_profile/` | Chromium profile data | `0o700` (owner-only) |
| `~/.notebooklm/context.json` | Active notebook ID | Default |
| `storage_state.json` | Google session cookies | `0o600` (owner-only) |
| `browser_profile/` | Chromium profile data | `0o700` (owner-only) |
| `context.json` | Active notebook ID | Default |
### Security Best Practices
@ -50,8 +52,9 @@ This library stores authentication credentials locally. Please understand these
5. **CI/CD usage**
- Do not commit credentials to repositories
- Use secure secret management for automation
- Consider using service accounts where possible
- Use `NOTEBOOKLM_AUTH_JSON` environment variable for secure, file-free authentication
- Store the JSON value in GitHub Secrets or similar secure secret management
- The env var approach keeps credentials in memory only, never written to disk
### What This Library Does NOT Do

View file

@ -23,7 +23,7 @@ pip install -e ".[dev]"
notebooklm login
```
This opens a browser, logs into your Google account, and stores cookies in `~/.notebooklm/storage.json`.
This opens a browser, logs into your Google account, and stores cookies in `~/.notebooklm/storage_state.json`.
Verify with:
```bash
@ -238,7 +238,7 @@ From `tests/e2e/conftest.py`:
```python
@pytest.fixture(scope="session")
def auth_cookies() -> dict[str, str]:
"""Load cookies from ~/.notebooklm/storage.json"""
"""Load cookies from ~/.notebooklm/storage_state.json"""
@pytest.fixture(scope="session")
def auth_tokens(auth_cookies) -> AuthTokens:

View file

@ -18,6 +18,19 @@ notebooklm list # Verify authentication works
If commands fail with authentication errors, re-run `notebooklm login`.
### CI/CD and Multiple Accounts
For automated environments or multiple accounts, use environment variables:
| Variable | Purpose |
|----------|---------|
| `NOTEBOOKLM_HOME` | Custom config directory (default: `~/.notebooklm`) |
| `NOTEBOOKLM_AUTH_JSON` | Inline auth JSON - no file writes needed |
**CI/CD setup:** Set `NOTEBOOKLM_AUTH_JSON` from a secret containing your `storage_state.json` contents.
**Multiple accounts:** Use different `NOTEBOOKLM_HOME` directories per account.
## Agent Setup Verification
Before starting workflows, verify the CLI is ready: