plainbook

Plainbook: Natural Language Notebooks

A Plainbook is a computational notebook, written in natural language rather than code.

Normally you would generate a notebook with AI and then keep the code, discarding the natural language that produced it. Plainbook keeps the language instead: the code is generated and executed automatically, and can be validated and tested through natural language and data inspection — no coding knowledge required. This lets you share your data analysis and science with a much wider audience, including people who don’t know how to code.

Plainbooks resemble Jupyter notebooks, in that they combine instructions and results in a single shareable document. They differ in these ways:

Linear semantics and dependency tracking are inspired by Marimo. The ability to test cells hinges on natural language and on the special snapshot-kernel underlying Plainbook.

The goal of the project is to replicate in natural language what made Jupyter so successful: sharing code and results together, so that any recipient can validate and modify what they receive. Recipients can check that the generated code implements the natural-language tasks, and can edit the Plainbook, regenerate the code, and rerun it — just as in Jupyter or Marimo.

You can read more about the design phylosophy of Plainbook, and its code testing approach, in the paper Plainbook: Data Science, in Plain Language.

Try Plainbook Now

Quick Start Videos:

Run on GitHub Codespaces (no installation needed):

  1. Click CodeCodespaces in the GitHub interface
  2. Wait ~3 minutes for the environment to set up
  3. Click Open in Browser for port 8080
  4. A trial Claude API key is provided; you can add your own in Settings

Example Notebooks:

Installation and use

You can install Plainbook with pip:

pip install plainbook

To open a plainbook (which will be created if it does not exist):

plainbook notebook.plnb

You can use any file name you like, with any extension you like.

AI API Keys. You need a Gemini or Claude API key to use Plainbook. Click on the Settings button (the gear on the top right) to see instructions on how to set them. Both providers offer free trial credits, and usage costs are typically low for regular notebook work.

Key Features

Resources

Plainbook Structure

Plainbooks consist of three types of cells:

Differently from standard Jupyter notebooks, Plainbooks cells are guaranteed to be executed in order, from first to last, matching the order in which humans read the cells. Plainbooks relies on a checkpointing kernel to remember the execution state after each cell, so that it can re-run a cell without having to start from the beginning.

AI Providers Plainbook is designed to work with multiple AI providers, and users can choose which provider to use for code generation and checking. The system is designed to allow users to easily switch between providers, so that users can cross-check that the implementation obtained from one provider is considered valid by another provider. This avoids over-reliance on a single class of AI models. Currently, Plainbook supports Gemini and Claude models. You will need an API key for at least one such provider to use Plainbook.

Papers

Contributors

To contribute to Plainbook, please see the DEVELOP.md file.