BonitoBook

Create interactive Julia notebooks with live code execution, AI assistance, and beautiful exports.

Features

📝

Live Code Editing

Edit Julia, Python, and Markdown cells with syntax highlighting and auto-completion and rich display

🔧

Composable Ecosystem

Add and share custom widgets using the Bonito framework, or reconfigure the book to be a dashboard or a completely different layout

📁

File Editor integration

Being build on Monaco editor, BonitoBook comes with an almost vscode like file editor to jump into any Julia code for editing.

AI Integration

Built-in AI assistant powered by Claude for code help and explanations

🎨

Customizable Styling

Theme your notebooks with custom CSS using live style editing

📤

Many Import/Export Formats

Export to HTML, Quarto, Markdown, IPynb, or PDF for sharing and publishing

Getting Started

BonitoBook

BonitoBook is a Julia-native interactive notebook system built on Bonito.jl that seamlessly combines multi-language execution, AI integration, and modern web-based editing in one powerful platform.

Getting started

This starts a server that hosts the notebook under the route "/notebook-name" and automatically opens it in your browser. You can also display the notebook directly in other environments like VSCode's plot pane:

Both methods run in the same Julia process as the parent, allowing you to edit and re-evaluate any file seamlessly.

Motivation

As the author of Makie.jl, I've faced challenges integrating its advanced features—like offline export, widgets, and interactions—across different notebook platforms in a stable and efficient way.

Over the years, as Bonito.jl (the Julia framework for creating HTML/JavaScript in Julia) has matured, I decided to build a completely Julia-native notebook system with a sharp focus on plotting and dashboards.

Bonito.jl brings significant advantages: all widgets are reusable, and notebooks can be easily rearranged into different formats, making the transition from notebook to polished dashboard effortless.

Runs everywhere

Thanks to Bonito.jl's universal design, BonitoBook can be viewed across multiple platforms:

  • VSCode Plot Pane

  • Browser

  • Electron applications

  • Static Site (e.g. this site via Bonito.jl, or Documenter).

  • Server deployments

  • HTML displays (Pluto, Jupyter, etc...)

  • JuliaHub

  • Google Colab

Interactive Plotting Showcase

BonitoBook provides seamless integration with Makie.jl, supporting all WGLMakie features including interactive widgets, observables, and JavaScript integration. Here's a live example of an interactive 3D galaxy visualization, with the animation done in Javascript so it stays interactive without running Julia. The other plots shown in this notebook are not interactive in that way, and can only be interacted with when actually running the notebook with Julia.

Notebook format

The format is a pretty simple markdown with more config options and data stored in a separate folder. This keeps the notebook format fully compatible with markdown and makes it easy to edit it with other editors.

The a hidden folder structure looks like this:

                                              mybook.md                # Main content file
.mybook-bbook/           # Hidden folder structure
├── styles/
│   └── style.jl         # Custom styling
├── ai/
│   ├── config.toml      # AI configuration
│   └── system-prompt.md # Custom AI prompt
└── .versions/           # Automatic backups
    └── mybook-*.md      # Timestamped backups
└── data/             # Write out to `./data` to get included into the zip
    └── data.csv      # Any data needed for the notebook
                                            

Jupyter notebooks (.ipynb) are automatically converted to markdown files with the same name before setting up the notebook and creating the fodler structure.

Project compatibility

The parent folder of a notebook can contain additional files like a Julia project. This allows that multiple notebooks can share the same environment, which makes it perfect for integrating with your existing VSCode Julia projects and running a notebook alongside a VSCode setup:

                                              MyJuliaProject/
├── dev/                # Any Julia package checked out for development
├── Project.toml        # Julia dependencies
├── Manifest.toml       # Dependency lock file
├── mybook.md           # Book file
├──── .mybook-bbook/    # Hidden book structure
├── another-book.md     # Another book using the same project
├──── .another-bbook/
                                            

The zip export feature packages everything into a reproducible, shareable archive including the project environment and all associated data, which can be directly loaded by using book("path/to/zipfile").

Julia native

All components written in Julia

BonitoBook is built entirely in Julia using Bonito.jl, providing native performance and seamless integration with the Julia ecosystem.

Supports Julia commands

Ecosystem of Components vs Notebook

With Bonito it's easy to create and share components. All BonitoBook components should be usable outside the notebook, and we hope to have a vibrant ecosystem of user created widgets.

Main.var"##BonitoBook#230".MyCheckbox(Observable(true))

This is why we can e.g. use the editor widget in the notebook itself:

Simple to create new book types with different layouts

Full composability with existing Bonito apps

Any package defining Bonito Apps are working inside BonitoBook. This includes custom widgets, or whole applications.

BonitoBook.Components

BonitoBook includes its own component library—essentially the standard Bonito components with enhanced styling that integrates seamlessly with the notebook interface.

Button

Slider

Range: 1-100, Value: 50

Checkbox

Enabled

Dropdown

Number Input

@manipulate

BonitoBook revives the beloved @manipulate macro from Interact.jl with modern enhancements:

cmap
func
plot_type
size
show_legend

LaTeX support

Excellent LaTeX support powered by MathTeX.

$$$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$$ $$\mathbf{A} = \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix}$$$

Python integration

Python support is powered by PythonCall and CondaPkg, enabling Julia-like dependency management. Cells share the same process and variables, creating seamless cross-language interaction.

Package management

Shared namespace

The shared namespace enables seamless cross-language workflows:

Python: None

Rich MIME support

MIME support enables matplotlib plots to display automatically, perfect for mixed-language visualizations:

Features collapsible sidebars for tools, file browser, chat, and custom widgets with configurable positioning and behavior.

@edit and Revise.jl support

Use @bedit in the notebook to open and edit files. With Revise.jl loaded, changes are automatically detected and re-evaluated.

Style customization

Customize your book's appearance by editing .name-bbook/styles/style.jl (accessible via the paint can icon):

Export/import options

Import formats

  • Jupyter notebooks (.ipynb)

  • Markdown files (.md)

Export formats

  • export to standalone HTML file

  • Markdown export

  • Quarto export

  • IPynb

  • PDF