# boopiter


<div class="boopcell boop-raw">

</div>

<div class="boopcell boop-note">

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

</div>

<div class="boopcell boop-note">

> boop-iter notebook LLM workflow. cells are boops, iter-atively keeping
> the human in the loop

</div>

<div class="boopcell boop-note">

This is a semi-vibe-coded clone of, and homage to, the amazing
[solveit](https://solve.it.com/) system. `boopiter` is intended
primarily for education purposes: learning the basic operations so that
I can easily work with local execution and develop my own extensions and
features as my research work expands.

</div>

<div class="boopcell boop-note">

## What’s inside

</div>

<div class="boopcell boop-note">

boopiter is organized as a handful of small nbdev modules, each in its
own notebook:

<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr>
<th>module</th>
<th>what it does</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="core.html">core</a></td>
<td>server startup – launch/relaunch the app on a port, precompile
Tailwind</td>
</tr>
<tr>
<td><a href="notebook.html">notebook</a></td>
<td>the in-memory notebook data model: a typed <a
href="https://drscotthawley.github.io/boopiter/notebook.html#cell"><code>Cell</code></a>,
the <a
href="https://drscotthawley.github.io/boopiter/notebook.html#notebook"><code>Notebook</code></a>,
and the running <code>nb</code></td>
</tr>
<tr>
<td><a href="kernel.html">kernel</a></td>
<td>the code-execution engine – run a cell’s source and stream its
output</td>
</tr>
<tr>
<td><a href="serialize.html">serialize</a></td>
<td>the <code>.ipynb</code> file boundary – save the live notebook and
load one back</td>
</tr>
<tr>
<td><a href="llms.html">llms</a></td>
<td>talking to a local LLM via Ollama: tool selection, model listing,
streaming replies</td>
</tr>
<tr>
<td><a href="cells.html">cells</a></td>
<td>rendering + HTTP routes + app orchestration – the FastHTML UI that
ties it together</td>
</tr>
<tr>
<td><a href="plugins.html">plugins</a></td>
<td>the top-bar plugin protocol, plus a system-monitor plugin</td>
</tr>
</tbody>
</table>

</div>

<div class="boopcell boop-note">

## Installation

</div>

<div class="boopcell boop-note">

boopiter isn’t on PyPI or conda; install it from GitHub:

``` sh
pip install git+https://github.com/drscotthawley/boopiter.git
```

To hack on it, clone and install in editable mode – it’s an nbdev
project, so the notebooks under `nbs/` are the source and the
`boopiter/` package is generated from them:

``` sh
git clone https://github.com/drscotthawley/boopiter.git
cd boopiter
pip install -e .
```

</div>

<div class="boopcell boop-note">

## How to use

### Local LLM (Ollama)

Prompt cells are answered by a local model via
[Ollama](https://ollama.com/download).

1.  Install Ollama: https://ollama.com/download (it installs and runs as
    a background service).

2.  Pull a model – `qwen2.5-coder` is recommended and, if present, is
    boopiter’s default:

    ``` bash
    ollama pull qwen2.5-coder
    ```

3.  That’s it – when boopiter starts it detects every model
    `ollama list` knows about and populates the model dropdown in the
    top bar, preferring `qwen2.5-coder` if it’s installed.

### Launching boopiter

Launch the server:

``` bash
boopiter [--port 8000]
```

If any other `boopiter` server is running, it will be killed in favor of
the new one.

Point your browser at that URL.

You can also aunch and pre-load a notebook:

    boopiter nbs/00_core.ipynb

</div>

<div class="boopcell boop-note">

## Screenshot

<figure>
<img
src="https://github.com/drscotthawley/boopiter/blob/main/images/screenshot.png?raw=true"
alt="screenshot" />
<figcaption aria-hidden="true">screenshot</figcaption>
</figure>

</div>

<div class="boopcell boop-note">

## Known Issues / Roadmap

Rough priority order, top = most impactful.

- ☒ **Prompt cells are slow and lose focus.** Editing/inserting a prompt
  cell and running it doesn’t scroll it into view – you have to hunt for
  it on screen. This makes prompt cells unpleasant to use in practice.
  Likely fix: whenever a cell’s content changes (esp. after a run),
  scroll the viewport so that cell is visible.
- ☒ General focus/scroll behavior is unreliable across the notebook, not
  just for prompt cells – worth a broader pass once the prompt-cell case
  is fixed.
- ☒ Code cell outputs are text-only (with some color support). A real
  Jupyter notebook can render matplotlib figures, IPython HTML output,
  and interactive widgets like tqdm progress bars. Would need a proper
  output-type dispatch (image/html/etc.) instead of assuming text.

</div>
