Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

690 B
Raw Blame
/* Copyright 2026 Marimo. All rights reserved. */

import { atom } from "jotai";
import { Logger } from "@/utils/Logger";

function getVersionFromMountConfig(): string | null {
  try {
    const mountConfig = window.__MARIMO_MOUNT_CONFIG__ as { version: string };
    return mountConfig.version;
  } catch {
    Logger.warn("Failed to get version from mount config");
    return null;
  }
}

const BUILD_VERSION: string =
  getVersionFromMountConfig() ||
  import.meta.env.VITE_MARIMO_VERSION ||
  "unknown";

export const marimoVersionAtom = atom<string>(BUILD_VERSION);

export const showCodeInRunModeAtom = atom<boolean>(true);

export const serverTokenAtom = atom<string | null>(null);