Metadata-Version: 2.4
Name: plainbook
Version: 0.0.14
Summary: Plain Language Notebooks
Author-email: Luca de Alfaro <dealfaro@acm.org>
License-Expression: BSD-3-Clause
Project-URL: Homepage, https://github.com/lucadealfaro/plainbook
Project-URL: Issues, https://github.com/lucadealfaro/plainbook/issues
Keywords: notebook,jupyter,natural language,data science
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: bottle
Requires-Dist: cherrypy
Requires-Dist: google-genai
Requires-Dist: ipykernel
Requires-Dist: jupyter_client
Requires-Dist: nbclient
Requires-Dist: nbformat
Requires-Dist: pyyaml
Dynamic: license-file

# Plainbook: Natural Language Notebooks. 

Authors: 

Luca de Alfaro, dealfaro@acm.org

## Overview

Plain Language Notebooks (Plainbook) allow you to create notebooks where the cells are written in natural language. 
The natural language is automatically converted to code via AI, and executed.  The results of the execution are then displayed below the natural language cell. 

**In Plainbooks, natural language is the programming language.**
The goal of Plainbooks is to allow users to create and share notebooks in natural language, without having to write code, or understand the code that is shared with them. 
Actions to be performed are described in natural language, and the natural languate is retained, so users can edit it, improve it, and share it. 
We are building methods for verifying that the code implementation is faithful to the natural language description, so that users can trust the notebooks they receive from others.

Plain Language Notebooks have two type of cells: 

* **Action cells**, where the user describes in natural language the action to be performed (e.g., "Load the dataset from file data.csv and display the first 10 rows").  The system converts the description to code, executes it, and displays the results below the cell.

* **Comment cells**, where the user can add comments, section headers, and so forth, using markdown syntax. 

Differently from other notebook systems, Plainbooks are executed from start to end: random cell execution order, as in Jupyter notebooks, is not allowed.  This ensures that the results are obtained in the same order in which a human reader would read the notebook.

This project is in an early stage of development.

## Running Plainbook

```bash

plainbook path/to/notebook.nlb
``` 

(where `.nlb` is a Natural Language Notebook file; you can use other extensions if you wish). 
The file is created if it does not exist.
For a list of command-lien options, do: 

```bash
plainbook --help
```

If you want to be able to generate or check code from explanations, you need to add a Gemini API key in the settings (click on the gear icon in the top-right corner of the web interface).

## Development

Run with: 

```bash
python -m plainbook.main --debug
```

Running with the VSCode launch.json does not work, due to a VScode bug/quirk. 
See DEVELOP.md for development instructions, and see TODO.md for planned features.

