Notebook Cell-Level Documentation AI
AI-powered cell-by-cell documentation for Jupyter and Databricks notebooks using GitHub Copilot.
Features
- AI-Generated Explanations - Generate clear explanations for each code cell using GitHub Copilot
- Side-by-Side Editor - View code and explanations together in an intuitive interface
- Enrich Explanation - Provide additional context and let AI regenerate richer explanations
- Business Context - Add business purpose per cell, included in final documentation
- Markdown Preview/Edit - GitHub-style preview/edit toggle for all text fields
- Notebook Overview - Edit or rewrite a high-level summary with AI assistance
- AI-Powered Reformat - Improve grammar and clarity of your notes with one click
- Change Detection - Detect when code has changed since documentation was created
- Comprehensive Documentation - Generate polished markdown with table of contents
- Multi-Format Support - Jupyter (
.ipynb) and Databricks (.py, .sql) notebooks
- Master Documentation - Generate a unified
master_documentation.md from all documented notebooks with a 2-step wizard (select → organize into sections)
- Section Organization - Group notebooks into named sections (e.g., Ingestion, Transformation) with drag-and-drop reordering
- Auto Dependency Detection - Automatically computes "Depends On" relationships by matching source tables to target tables
- Bulk Generation - Multi-select notebooks to generate documentation for all at once
- Customizable Prompts - Configure prompt templates via
.notebook-cell-doc/prompts.yaml
Who Is This For?
- Data Scientists documenting analysis and ML workflows
- Data Engineers documenting ETL pipelines, Spark jobs, and data transformations
- Analytics Engineers documenting SQL-heavy notebooks and data models
- ML Engineers documenting training, evaluation, and inference notebooks
Requirements
- VS Code 1.84+
- GitHub Copilot Chat extension installed and activated
- Valid GitHub Copilot license
Installation
From VSIX (Local)
code --install-extension notebook-cell-doc-ai-0.1.0.vsix
From Marketplace
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Notebook Cell-Level Documentation AI"
- Click Install
Quick Start
- Open any Jupyter notebook (
.ipynb) or Databricks notebook (.py / .sql)
- Right-click and select "Notebook Cell-Level Documentation AI: Generate Documentation - Cell by Cell"
- Wait for AI to generate explanations
- Enrich explanations with additional context or add business context
- Click "Save & Generate Final Documentation"
- Right-click the
documentation/ folder and select "Generate Master Documentation" to create a unified document
Usage
Generate Documentation
Option 1: Context Menu
- Right-click on any notebook file in the Explorer
- Select "Notebook Cell-Level Documentation AI: Generate Documentation - Cell by Cell"
Option 2: Command Palette
- Open Command Palette (Ctrl+Shift+P)
- Type "Notebook Cell-Level Documentation AI: Generate Documentation"
Option 3: Keyboard Shortcut
- Press
Ctrl+Shift+D (Windows/Linux) or Cmd+Shift+D (Mac)
Enrich Explanations
- In the documentation editor, find a cell
- Click "Enrich Explanation"
- Enter additional context in the modal popup
- AI regenerates the explanation incorporating your context
Business Context
Add a Business Context field to any cell describing its purpose (e.g., "Data ingestion from Delta Lake"). This is included in the final documentation.
Notebook Overview
- Markdown cells from the notebook automatically pre-populate the description
- Edit the description and click "Rewrite with AI" to format and improve it
Save Documentation
- Save - Saves the documentation file only
- Save & Generate Final Documentation - Saves and creates comprehensive markdown
Master Documentation
Generate a unified document covering all documented notebooks in a project:
- Right-click the
documentation/ folder in the Explorer
- Select "Generate Master Documentation"
- Step 1 - Select: Choose which notebooks to include
- Step 2 - Organize: Drag notebooks into named sections (e.g., Ingestion, Transformation, Reporting)
- Click "Generate Master Documentation" to produce
master_documentation.md
The generated document includes:
- Notebooks grouped under section headings with purpose, description, source/target tables
- Automatic "Depends On" relationships computed from table references
- A summary table with all notebooks, sections, and dependencies
Output Files
Documentation is saved to a documentation/ folder in your project:
your-project/
├── notebook.ipynb
└── documentation/
├── master_documentation.md # Unified master document (all notebooks)
└── notebook/
├── cell_by_cell.yaml # Detailed cell documentation
└── final_documentation.md # Comprehensive markdown per notebook
Configuration
Extension Settings
| Setting |
Default |
Description |
notebookDoc.batchSize |
15 |
Cells per batch |
notebookDoc.rateLimit |
100 |
Delay between requests (ms) |
notebookDoc.maxRetries |
3 |
Max retries for failed requests |
notebookDoc.outputFolder |
"documentation" |
Output folder name |
notebookDoc.defaultLanguage |
"python" |
Default language |
notebookDoc.logLevel |
"info" |
Log level (debug, info, warn, error) |
Custom Prompts
To customize AI prompt templates for your team:
- Open Command Palette (Ctrl+Shift+P)
- Run "Notebook Cell-Level Documentation AI: Create Prompt Config"
- Edit
.notebook-cell-doc/prompts.yaml in your workspace
Commands
| Command |
Description |
Notebook Cell-Level Documentation AI: Generate Documentation - Cell by Cell |
Generate documentation for a notebook |
Notebook Cell-Level Documentation AI: Open Existing Documentation |
Open existing documentation |
Notebook Cell-Level Documentation AI: Create Prompt Config |
Create or open prompt configuration file |
Notebook Cell-Level Documentation AI: Reset Prompt Config to Defaults |
Overwrite custom prompts with built-in defaults |
Notebook Cell-Level Documentation AI: Generate Master Documentation |
Generate unified master document from all documented notebooks |
Keyboard Shortcuts
| Shortcut |
Command |
Ctrl+Shift+D / Cmd+Shift+D |
Generate Documentation |
Privacy
- Does not collect user data
- Does not transmit notebooks to external servers (except GitHub Copilot)
- Uses GitHub Copilot's existing authentication
- Stores documentation locally in your workspace
Troubleshooting
"GitHub Copilot license is required"
- Ensure GitHub Copilot Chat extension is installed
- Verify you have an active Copilot subscription
- Sign in to GitHub in VS Code
"No Copilot models available"
- Sign out and sign back into GitHub
- Check your Copilot subscription status
- Restart VS Code
Documentation not saving
- Check file permissions in the workspace
- Verify disk space availability
- Ensure output folder is not read-only
License
MIT License - See LICENSE for details.
For issues or feedback, email sraghu1993@gmail.com.