Problem: AI agents run scripts non-interactively, so input() gets EOF.
Solution: Add explicit CLI flags for notebook selection:
- --use-active: Upload to currently active notebook
- --create-new: Create new notebook named after the file
- --notebook-id: Upload to specific notebook (existing)
The AI agent should ask the user BEFORE running the script, then
pass the appropriate flag. Script now exits with clear error
message if no target is specified.
Updated SKILL.md to instruct agents to ask user first.
Co-Authored-By: Claude <noreply@anthropic.com>
- Changed all prints from stderr to stdout for consistent buffering
- Added sys.stdout.flush() before input() to ensure proper ordering
- Fixes issue where input prompt appeared before options were displayed
Co-Authored-By: Claude <noreply@anthropic.com>
When no --notebook-id is specified, prompt user to choose:
- Upload to active notebook (if one exists)
- Create a new notebook
- Select from existing notebooks (if no active)
Adds interactive parameter to disable prompting for programmatic use.
Co-Authored-By: Claude <noreply@anthropic.com>
Replace NotebookLMKitClient with NotebookLMWrapper async API.
All public methods (add_from_file, add_from_zlibrary, add_from_url)
are now async and main() uses asyncio.run().
Co-Authored-By: Claude <noreply@anthropic.com>