Convert any code repository into a single markdown file for NotebookLM
Project description
repo2notebook
Convert any code repository into a single markdown file for NotebookLM and other LLM tools.
Problem: NotebookLM doesn't accept .tsx, .py, .cs, or most code files. You have to manually copy-paste everything.
Solution: One command, one file. Upload and start chatting with your codebase.
Installation
pip install repo2notebook
Usage
# Run in your project directory
cd your-project
repo2notebook
# Or specify a path
repo2notebook /path/to/your/repo
Output: _repo2notebook/notebook.md — ready to upload to NotebookLM.
Alternative: Run Without Installing
curl -O https://raw.githubusercontent.com/Appaholics/repo2notebook/main/repo2notebook.py
python repo2notebook.py
Features
- Zero dependencies — Only Python standard library
- Single file — Just
repo2notebook.py, nothing else - All languages — TypeScript, Python, Rust, Go, Kotlin, Swift, C#, and 50+ more
- Smart filtering — Automatically excludes
node_modules, lock files, build outputs - Respects .gitignore — Your ignore rules are honored
- Safe — Never modifies or deletes your original files
- Auto-updates .gitignore — Adds output folder to prevent committing
What Gets Excluded
The tool automatically skips files that would add noise without value:
| Category | Examples |
|---|---|
| Dependencies | node_modules/, vendor/, venv/, Pods/ |
| Lock files | package-lock.json, yarn.lock, Cargo.lock, poetry.lock |
| Build output | dist/, build/, .next/, target/, bin/, obj/ |
| IDE config | .idea/, .vscode/, .vs/ |
| OS files | .DS_Store, Thumbs.db |
| Secrets | .env (but .env.example is included) |
Plus everything in your .gitignore.
Output Format
Clean markdown with proper syntax highlighting:
# Repository: my-project
Generated: 2025-01-15 14:30
Total files: 42
---
## File: src/components/Button.tsx
```typescript
import React from 'react';
export const Button = ({ label }) => {
return <button>{label}</button>;
};
```
---
## File: src/utils/api.py
```python
def fetch_data(url: str) -> dict:
...
```
Requirements
- Python 3.9+
That's it. No pip install, no virtual environments.
License
Contributing
Issues and PRs welcome. Keep it simple.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file repo2notebook-1.0.0.tar.gz.
File metadata
- Download URL: repo2notebook-1.0.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
deb8db3480d1757d9c985f61726b2391faa870f549df30109b7fa405b1db4f4d
|
|
| MD5 |
4a9d44ac765e98ae901a3d5cce3d809b
|
|
| BLAKE2b-256 |
0862a0abb7dde00a4577fd839230bae0ebe5d0b5d47b855344abfb81dc4f9f5d
|
File details
Details for the file repo2notebook-1.0.0-py3-none-any.whl.
File metadata
- Download URL: repo2notebook-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e61eb91e43b3c42b839b88eaf6f7a3171e9b2c189b990e9160da720fdd44364b
|
|
| MD5 |
ea49b4da463ec19f3a9429ffd5e0c826
|
|
| BLAKE2b-256 |
6091d73bc06c9e8931257b43d300642a90c7f9895771464be4f40c544011175e
|