{"id":22883208,"url":"https://github.com/tmc/nlm","last_synced_at":"2025-05-07T18:30:08.698Z","repository":{"id":266467307,"uuid":"890193891","full_name":"tmc/nlm","owner":"tmc","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-19T21:24:40.000Z","size":71,"stargazers_count":24,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-19T22:37:03.975Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/tmc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-11-18T06:39:17.000Z","updated_at":"2024-12-19T21:24:45.000Z","dependencies_parsed_at":"2024-12-04T12:35:28.387Z","dependency_job_id":"566b5487-c677-4f34-aac7-9405c0a5f9d2","html_url":"https://github.com/tmc/nlm","commit_stats":null,"previous_names":["tmc/nlm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmc%2Fnlm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmc%2Fnlm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmc%2Fnlm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmc%2Fnlm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmc","download_url":"https://codeload.github.com/tmc/nlm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252933779,"owners_count":21827582,"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","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":[],"created_at":"2024-12-13T18:33:10.607Z","updated_at":"2025-05-07T18:30:08.666Z","avatar_url":"https://github.com/tmc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nlm - NotebookLM CLI Tool 📚\n\n`nlm` is a command-line interface for Google's NotebookLM, allowing you to manage notebooks, sources, and audio overviews from your terminal.\n\n🔊 Listen to an Audio Overview of this tool here: [https://notebooklm.google.com/notebook/437c839c-5a24-455b-b8da-d35ba8931811/audio](https://notebooklm.google.com/notebook/437c839c-5a24-455b-b8da-d35ba8931811/audio).\n\n## Installation 🚀\n\n```bash\ngo install github.com/tmc/nlm/cmd/nlm@latest\n```\n\n### Usage \n\n```shell\nUsage: nlm \u003ccommand\u003e [arguments]\n\nNotebook Commands:\n  list, ls          List all notebooks\n  create \u003ctitle\u003e    Create a new notebook\n  rm \u003cid\u003e           Delete a notebook\n  analytics \u003cid\u003e    Show notebook analytics\n\nSource Commands:\n  sources \u003cid\u003e      List sources in notebook\n  add \u003cid\u003e \u003cinput\u003e  Add source to notebook\n  rm-source \u003cid\u003e \u003csource-id\u003e  Remove source\n  rename-source \u003csource-id\u003e \u003cnew-name\u003e  Rename source\n  refresh-source \u003csource-id\u003e  Refresh source content\n  check-source \u003csource-id\u003e  Check source freshness\n\nNote Commands:\n  notes \u003cid\u003e        List notes in notebook\n  new-note \u003cid\u003e \u003ctitle\u003e  Create new note\n  edit-note \u003cid\u003e \u003cnote-id\u003e \u003ccontent\u003e  Edit note\n  rm-note \u003cnote-id\u003e  Remove note\n\nAudio Commands:\n  audio-create \u003cid\u003e \u003cinstructions\u003e  Create audio overview\n  audio-get \u003cid\u003e    Get audio overview\n  audio-rm \u003cid\u003e     Delete audio overview\n  audio-share \u003cid\u003e  Share audio overview\n\nGeneration Commands:\n  generate-guide \u003cid\u003e  Generate notebook guide\n  generate-outline \u003cid\u003e  Generate content outline\n  generate-section \u003cid\u003e  Generate new section\n\nOther Commands:\n  auth              Setup authentication\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e📦 Installing Go (if needed)\u003c/summary\u003e\n\n### Option 1: Using Package Managers\n\n**macOS (using Homebrew):**\n```bash\nbrew install go\n```\n\n**Linux (Ubuntu/Debian):**\n```bash\nsudo apt update\nsudo apt install golang\n```\n\n**Linux (Fedora):**\n```bash\nsudo dnf install golang\n```\n\n### Option 2: Direct Download\n\n1. Visit the [Go Downloads page](https://go.dev/dl/)\n2. Download the appropriate version for your OS\n3. Follow the installation instructions:\n\n**macOS:**\n- Download the .pkg file\n- Double-click to install\n- Follow the installer prompts\n\n**Linux:**\n```bash\n# Example for Linux AMD64 (adjust version as needed)\nwget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz\nsudo rm -rf /usr/local/go\nsudo tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz\n```\n\n### Post-Installation Setup\n\nAdd Go to your PATH by adding these lines to your `~/.bashrc`, `~/.zshrc`, or equivalent:\n```bash\nexport PATH=$PATH:/usr/local/go/bin\nexport PATH=$PATH:$(go env GOPATH)/bin\n```\n\nVerify installation:\n```bash\ngo version\n```\n\u003c/details\u003e\n\n## Authentication 🔑\n\nFirst, authenticate with your Google account:\n\n```bash\nnlm auth\n```\n\nThis will launch Chrome to authenticate with your Google account. The authentication tokens will be saved in `.env` file.\n\n## Usage 💻\n\n### Notebook Operations\n\n```bash\n# List all notebooks\nnlm list\n\n# Create a new notebook\nnlm create \"My Research Notes\"\n\n# Delete a notebook\nnlm rm \u003cnotebook-id\u003e\n\n# Get notebook analytics\nnlm analytics \u003cnotebook-id\u003e\n```\n\n### Source Management\n\n```bash\n# List sources in a notebook\nnlm sources \u003cnotebook-id\u003e\n\n# Add a source from URL\nnlm add \u003cnotebook-id\u003e https://example.com/article\n\n# Add a source from file\nnlm add \u003cnotebook-id\u003e document.pdf\n\n# Add source from stdin\necho \"Some text\" | nlm add \u003cnotebook-id\u003e -\n\n# Rename a source\nnlm rename-source \u003csource-id\u003e \"New Title\"\n\n# Remove a source\nnlm rm-source \u003cnotebook-id\u003e \u003csource-id\u003e\n```\n\n### Note Operations\n\n```bash\n# List notes in a notebook\nnlm notes \u003cnotebook-id\u003e\n\n# Create a new note\nnlm new-note \u003cnotebook-id\u003e \"Note Title\"\n\n# Edit a note\nnlm edit-note \u003cnotebook-id\u003e \u003cnote-id\u003e \"New content\"\n\n# Remove a note\nnlm rm-note \u003cnote-id\u003e\n```\n\n### Audio Overview\n\n```bash\n# Create an audio overview\nnlm audio-create \u003cnotebook-id\u003e \"speak in a professional tone\"\n\n# Get audio overview status/content\nnlm audio-get \u003cnotebook-id\u003e\n\n# Share audio overview (private)\nnlm audio-share \u003cnotebook-id\u003e\n\n# Share audio overview (public)\nnlm audio-share \u003cnotebook-id\u003e --public\n```\n\n## Examples 📋\n\nCreate a notebook and add some content:\n```bash\n# Create a new notebook\nnotebook_id=$(nlm create \"Research Notes\" | grep -o 'notebook [^ ]*' | cut -d' ' -f2)\n\n# Add some sources\nnlm add $notebook_id https://example.com/research-paper\nnlm add $notebook_id research-data.pdf\n\n# Create an audio overview\nnlm audio-create $notebook_id \"summarize in a professional tone\"\n\n# Check the audio overview\nnlm audio-get $notebook_id\n```\n\n## Advanced Usage 🔧\n\n### Debug Mode\n\nAdd `-debug` flag to see detailed API interactions:\n\n```bash\nnlm -debug list\n```\n\n### Environment Variables\n\n- `NLM_AUTH_TOKEN`: Authentication token (stored in ~/.nlm/env)\n- `NLM_COOKIES`: Authentication cookies (stored in ~/.nlm/env)\n- `NLM_BROWSER_PROFILE`: Chrome profile to use for authentication (default: \"Default\")\n\nThese are typically managed by the `auth` command, but can be manually configured if needed.\n\n## Contributing 🤝\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License 📄\n\nMIT License - see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmc%2Fnlm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmc%2Fnlm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmc%2Fnlm/lists"}