[FEATURE]: Add native Jupyter notebook (.ipynb) support #8105

Open
opened 2026-02-16 18:09:10 -05:00 by yindo · 0 comments
Owner

Originally created by @pnpm-aftab on GitHub (Jan 31, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem

 OpenCode currently cannot work with Jupyter notebooks (`.ipynb` files). This limits OpenCode's usefulness for researchers and data scientists who primarily work with notebooks.

Proposed Solution

Add native support for reading and editing Jupyter notebooks by implementing 5 new tools:

  1. read_notebook - Parse and display notebook structure and content
  2. edit_notebook_cell - Edit specific cells while preserving metadata
  3. add_notebook_cell - Insert new cells at any position
  4. delete_notebook_cell - Remove cells from notebooks
  5. list_notebook_cells - Quick overview of all cells

Implementation Details

  • Full JSON structure validation and preservation
  • Supports code, markdown, and raw cell types
  • Maintains execution counts and outputs
  • Cell metadata and language info preserved
  • Compatible with Jupyter notebook format 4.x+

Benefits

  • Enables OpenCode to assist with data science workflows

  • Supports the growing data science and ML community

  • Maintains compatibility with existing Jupyter ecosystem

  • No external dependencies required

    Alternatives Considered

  • Converting notebooks to Python scripts (loses notebook structure)

  • Using external tools (adds complexity and dependencies)

Additional Context

I have already implemented this feature and tested it comprehensively. The implementation follows OpenCode's coding guidelines and is ready for review.

Test results available at: TESTING_GUIDE.md and JUPYTER_SUPPORT.md

Originally created by @pnpm-aftab on GitHub (Jan 31, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request ### Problem OpenCode currently cannot work with Jupyter notebooks (`.ipynb` files). This limits OpenCode's usefulness for researchers and data scientists who primarily work with notebooks. ### Proposed Solution Add native support for reading and editing Jupyter notebooks by implementing 5 new tools: 1. **`read_notebook`** - Parse and display notebook structure and content 2. **`edit_notebook_cell`** - Edit specific cells while preserving metadata 3. **`add_notebook_cell`** - Insert new cells at any position 4. **`delete_notebook_cell`** - Remove cells from notebooks 5. **`list_notebook_cells`** - Quick overview of all cells ### Implementation Details - Full JSON structure validation and preservation - Supports code, markdown, and raw cell types - Maintains execution counts and outputs - Cell metadata and language info preserved - Compatible with Jupyter notebook format 4.x+ ### Benefits - Enables OpenCode to assist with data science workflows - Supports the growing data science and ML community - Maintains compatibility with existing Jupyter ecosystem - No external dependencies required ### Alternatives Considered - Converting notebooks to Python scripts (loses notebook structure) - Using external tools (adds complexity and dependencies) ### Additional Context I have already implemented this feature and tested it comprehensively. The implementation follows OpenCode's coding guidelines and is ready for review. Test results available at: `TESTING_GUIDE.md` and `JUPYTER_SUPPORT.md`
yindo added the discussion label 2026-02-16 18:09:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8105