Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Mantis NotebooksNew to Visual Studio Code? Get it now.
Mantis Notebooks

Mantis Notebooks

mantisai

|
7 installs
| (0) | Free
Connects a Mantis notebook session with VSCode
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Mantis Notebooks

Mantis Notebooks is a Visual Studio Code extension that integrates with Mantis notebook sessions, allowing users to interact with notebooks directly within VS Code. It supports Python, Markdown, and UI/TSX cells, providing a seamless experience for data analysis and development.

Features

  • Load notebooks from active Mantis sessions.
  • Execute Python and UI/TSX cells.
  • Insert new UI/TSX cells into notebooks.
  • Restart the kernel and interrupt cell execution.
  • Synchronize notebook changes with the Mantis backend.

Installation

  1. Clone this repository:

    git clone <repository-url>
    cd MantisVSCExtension/mantis-notebooks
    
  2. Install dependencies using Yarn:

    yarn install
    
  3. Compile the extension:

    yarn run compile
    
  4. Open the project in Visual Studio Code and press F5 to launch the extension in a new Extension Development Host window.

Usage

Loading a Notebook from a Session

  1. Use the Mantis UI to generate a session link.
  2. Open the link in your browser, which will trigger the mantisai.loadFromSession command in VS Code.
  3. The notebook will be loaded into VS Code, and the kernel will be connected.

Adding a UI/TSX Cell

  1. Open a Mantis notebook in VS Code.
  2. Use the command palette (Ctrl+Shift+P or Cmd+Shift+P on macOS) and run Mantis: Add UI/TSX Cell.
  3. A new UI/TSX cell will be inserted into the notebook.

Restarting the Kernel

  1. Use the command palette and run Mantis: Restart Kernel.
  2. The kernel will restart, and the notebook UI will be temporarily locked.

Interrupting Cell Execution

  1. Use the command palette and run Mantis: Interrupt Cell.
  2. The currently executing cell will be interrupted.

Configuration

Set the backend URL for the Mantis API in your VS Code settings:

"mantisai.backendUrl": "http://localhost:8000/api/jupyter"

Development

Scripts

  • yarn run compile: Compile the TypeScript code.
  • yarn run watch: Watch for changes and recompile automatically.
  • yarn run lint: Run ESLint to check for code issues.
  • yarn run test: Run tests using the VS Code test framework.

Debugging

  1. Open the project in VS Code.
  2. Press F5 to start debugging in an Extension Development Host window.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft