Get help from the marimo community

Updated 2 months ago

How do I refresh marimo notebook when modified externally?

At a glance

The community member is using Marimo notebooks and has a paid subscription to an AI provider that has its own extension for IDEs like VS Code. They would like to use the AI provider's extension with Marimo, but the VS Code extension is not available yet. The community member's solution is to use the main browser interface and occasionally interact with the source file directly from VS Code without the Marimo extension.

However, the community member is facing an issue where changes made to the source file are not reflected in Marimo until the kernel is restarted. They are looking for a way to tell Marimo that the file has been modified, such as sending an HTTP request from VS Code or pressing a hotkey within Marimo to reread the file contents without restarting the kernel.

In the comments, another community member suggests that if the code is put into a separate Python file (module), it is automatically tracked, and any code modifications to that file are updated automatically. However, the main notebook file is still not being updated.

There is no explicitly marked answer in the post or comments.

Useful resources
Hello people, I learned about Marimo just 1h ago, haven't really read docs yet, so pardon my ignorance

My usecase is the following:

I have paid subscription to AI provider which has its own extension for VS Code/Rider, other IDEs (in my case it's Cody but it doesn't matter).

I would like to use it with Marimo notebooks.

I see that VS code extension is not there yet so my next idea is to use main browser interface and occasionally interact with source file directly from VS Code without the marimo extension. So to edit python file directly (using AI or manually, doesn't matter)

This doesn't work for me right now cause whenever I make changes to source file - marimo doesn't see it until I restart kernel

is there a way to tell it that file is modified somehow? maybe send some HTTP request from vs code.. or something.. or press some hotkey inside marimo to reread the file contents (but don't restart the kernel)
m
2 comments
I see it's already discussed here, so I guess wip

https://github.com/marimo-team/marimo/issues/1511
and I found solution which works for me good enough

so if I put my code into separate python file (module) - it's actually being tracked - so any code modifications of that file are updated automatically

so only main notebook file is not being updated
Add a reply
Sign up and join the conversation on Discord