Skip to main content

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

MIT

Contributing

Issues and PRs welcome. Keep it simple.

Metadata

Release files for repo2notebook 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for repo2notebook 1.0.0
File Size Uploaded
repo2notebook-1.0.0.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for repo2notebook 1.0.0
File Interpreter ABI Platform
repo2notebook-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.3 kB

Release files / repo2notebook-1.0.0.tar.gz

Download URL repo2notebook-1.0.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
deb8db3480d1757d9c985f61726b2391faa870f549df30109b7fa405b1db4f4d
BLAKE2b-256 checksum
How to use checksums
0862a0abb7dde00a4577fd839230bae0ebe5d0b5d47b855344abfb81dc4f9f5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / repo2notebook-1.0.0-py3-none-any.whl

Download URL repo2notebook-1.0.0-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e61eb91e43b3c42b839b88eaf6f7a3171e9b2c189b990e9160da720fdd44364b
BLAKE2b-256 checksum
How to use checksums
6091d73bc06c9e8931257b43d300642a90c7f9895771464be4f40c544011175e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page