Skip to content
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
644f081
init
IndAlok Mar 1, 2026
6a5a672
init
IndAlok Mar 1, 2026
9eb6fd9
protobuf
IndAlok Mar 5, 2026
e77edfb
pbf
IndAlok Mar 5, 2026
c1950c0
local build
IndAlok Mar 5, 2026
0da2bd1
remove protobuf-c from ci (deprc.)
IndAlok Mar 5, 2026
3d9e413
rz-notebook sources
IndAlok Mar 5, 2026
74a4af6
oops, i forgot MAX_PATH for linux ci
IndAlok Mar 5, 2026
4b59c56
add cutter plugin and checksums to releases
IndAlok Mar 5, 2026
9036e33
dependency of plugin resolved
IndAlok Mar 5, 2026
81c24e4
mismatch in cutter plugin
IndAlok Mar 5, 2026
7cb2a74
fix for different rizin builds being used in cutter and rizin instanc…
IndAlok Mar 6, 2026
a9a648d
Add native Cutter notebook client workflow
IndAlok Mar 6, 2026
0fa8d5f
Add binary attachment flow for notebook pages
IndAlok Mar 6, 2026
7b6d4cc
Fix cross-platform release metadata workflow
IndAlok Mar 6, 2026
5df5d9f
Harden release workflow portability
IndAlok Mar 6, 2026
cbc0c01
rearchitect: per-page .rznb files, no auto-spawn, active page session…
IndAlok Mar 9, 2026
a7b971f
fix: resolve Cutter stack overflow, catalog race condition, and core-…
IndAlok Mar 9, 2026
4054798
fix: import schema migration and protobuf decode fallbacks
IndAlok Mar 9, 2026
726e8cb
minor import fix
IndAlok Mar 9, 2026
1369e58
binaries to be auto-fetched from notebook in rizin instance
IndAlok Mar 9, 2026
620637d
fix: avoid release asset duplicate upload from glob overlap
IndAlok Mar 9, 2026
09f2165
fix: Cutter plugin auto-detect binary and fix command execution
IndAlok Mar 9, 2026
6e38673
Keep command line open till the user cancels it
IndAlok Mar 11, 2026
279ba52
keybindings (go server and cutter)
IndAlok Mar 11, 2026
cd6b2f9
formatting
IndAlok Mar 11, 2026
44e5aa8
Autocomplete (Go server, WIP for Cutter)
IndAlok Mar 11, 2026
355caa4
revert the js css injection to use css directly inside template, adde…
IndAlok Mar 12, 2026
7aa1d50
formatting
IndAlok Mar 12, 2026
f87b0dd
notebook search initial impl.
IndAlok Mar 15, 2026
bbb60b2
doc: just updated to incl. doc about search
IndAlok Mar 15, 2026
144fc75
replacing risky html appending calls with safer ones as suggeted
IndAlok Mar 15, 2026
b9cad9b
just used safer DOM-building instead of HTML injection in left out in…
IndAlok Mar 18, 2026
71f3d69
refrain from injecting html
IndAlok Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
503 changes: 369 additions & 134 deletions .github/workflows/build.yml

Large diffs are not rendered by default.

39 changes: 0 additions & 39 deletions .github/workflows/ci.yaml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
pull_request:
branches: [main]
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: "1.24.x"
cache: true

- run: go mod download
- run: go vet ./...
- run: go build -o rizin-notebook -ldflags "-X main.NBVERSION=$(git rev-parse --short HEAD)"
48 changes: 46 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,47 @@
rz-notebook
rizin-notebook
.test-data
rizin-notebook.exe
rizin-notebook.exe~
build-local/
build-local-*/
*.test
*.out
coverage.out
.test-data
.rizin-notebook/
**/build/
**/build-*/
**/cmake-build-*/
**/CMakeFiles/
**/CMakeCache.txt
**/cmake_install.cmake
**/compile_commands.json
**/Makefile
**/*.sln
**/*.vcxproj
**/*.vcxproj.filters
**/*.vcxproj.user
**/*.dir/
**/*.tlog
*.obj
*.o
*.a
*.lib
*.dll
*.dylib
*.so
*.exp
*.pdb
.env
.env.*
.vscode/
.vs/
cutter-notebook-plugin/build/
cutter-notebook-plugin/cmake-build-*/
cutter-notebook-plugin/.qt/
cutter-notebook-plugin/*.zip
rizin-notebook-plugin/build/
rizin-notebook-plugin/cmake-build-*/
.DS_Store
Thumbs.db
embedded-rizin-check.txt
embedded-rizin-plugins.txt
Binary file removed .rizin-notebook.png
Binary file not shown.
151 changes: 141 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,150 @@
# Rizin Notebook
# Rizin Notebook

A notebook to write notes while using `rizin`.
A notebook for binary analysis with rizin. Keep notes, commands, and scripts organized per binary.

If you want to compare it with something similar, you can call it as the rizin equivalent of [jupyter notebook](https://jupyter.org/)
Requires rizin 0.7.0 or later.

## Requirements
## What it does

Requires at least rizin version `0.2.0`
Each notebook **page** is tied to one binary. It stores the binary itself, its SHA-256 hash,
and a list of **cells**:

## Screenshot
- **command cells** - a rizin command and its output
- **script cells** - a JavaScript snippet run on the server against a rizin pipe
- **markdown cells** - freeform notes

![rizin-notebook](https://raw.githubusercontent.com/rizinorg/rizin-notebook/master/.rizin-notebook.png)
Pages are stored as individual `.rznb` files (SQLite databases) in `~/.rizin-notebook/`.
They can be exported and imported as single self-contained files.

## Building
## Components

- **Go server** (`rizin-notebook`) - the main application. Serves a web UI, exposes a
protobuf + JSON REST API, stores everything in per-page `.rznb` SQLite files.
- **rizin-notebook-plugin** - a rizin core plugin (C). Adds `NB` commands to rizin so you
can interact with the notebook from the rizin shell.
- **cutter-notebook-plugin** - a Cutter plugin (C++/Qt6). Adds a Plugins -> Notebook dock
and menu to Cutter.

The plugins are optional. The Go server works standalone with just a browser.

## Compatibility note

The Go server is platform-independent. The plugins depend on the Rizin version they are
built against.

If standalone rizin and Cutter ship different Rizin versions on your machine, build
`rz_notebook` once for each. Both builds can talk to the same server and share the same
`.rznb` data.

Simple rule:

- one server
- one `rz_notebook` build per Rizin version in use
- one Cutter plugin if you want the Cutter dock

## Screenshots

Project screenshots are organized under `docs/images/`.

### Web UI

<figure>
<img src="docs/images/web-homepage.png" alt="Rizin Notebook" width="100%" />
<figcaption><em>Figure 1. Homepage view (with cell & scope based search, supporting multiple modes.)</em></figcaption>
</figure>

<figure>
<img src="docs/images/web-settings.png" alt="Rizin Notebook settings page" width="100%" />
<figcaption><em>Figure 2. Settings page for environment configuration, keyboard shortcuts, and server-side behavior.</em></figcaption>
</figure>

<figure>
<img src="docs/images/web-autocomplete.png" alt="Autocomplete suggestions for Rizin commands in the notebook web UI" width="100%" />
<figcaption><em>Figure 3. Command autocomplete in the web console, helping discover and complete Rizin commands quickly.</em></figcaption>
</figure>

<figure>
<img src="docs/images/web-command-help.png" alt="Command search and help modal in the notebook web UI" width="100%" />
<figcaption><em>Figure 4. Built-in command help and search modal for exploring command descriptions and arguments.</em></figcaption>
</figure>

### Plugin Integration

<figure>
<img src="docs/images/rizin-plugin.png" alt="Rizin core plugin integration for Rizin Notebook" width="100%" />
<figcaption><em>Figure 5. Rizin core plugin integration, enabling notebook interaction directly from the Rizin shell.</em></figcaption>
</figure>

<figure>
<img src="docs/images/cutter-plugin-1.png" alt="Cutter plugin integration screenshot 1" width="100%" />
<figcaption><em>Figure 6. Cutter plugin integration view showing the notebook experience inside the Cutter interface.</em></figcaption>
</figure>

<figure>
<img src="docs/images/cutter-plugin-2.png" alt="Cutter plugin integration screenshot 2" width="100%" />
<figcaption><em>Figure 7. Additional Cutter plugin workflow view demonstrating possible notebook usage(s).</em></figcaption>
</figure>

## Building the server

```bash
go build -o rizin-notebook .
```

Embed the version string during release builds:

```bash
go build -ldflags "-X main.NBVERSION=$(git rev-parse --short HEAD)" -o rizin-notebook .
```

## Running

```bash
go build -ldflags "-X main.NBVERSION=$(git rev-list -1 HEAD)"
```
./rizin-notebook
```

Opens at `http://127.0.0.1:8000/` by default.

Flags:

```
-bind 127.0.0.1:8000 address and port to listen on
-root / URL path prefix
-notebook /path/to/data data directory (default: ~/.rizin-notebook)
-debug-assets /path load templates from disk instead of embedded
-debug enable HTTP request logs
```

Set `RIZIN_PATH` to override the rizin binary path used for pipe execution.

## Building the rizin plugin

See [rizin-notebook-plugin/README.md](rizin-notebook-plugin/README.md).

## Building the Cutter plugin

See [cutter-notebook-plugin/README.md](cutter-notebook-plugin/README.md).

If Cutter ships its own embedded Rizin, the `rz_notebook` plugin loaded by Cutter must be
built against that same bundled Rizin version.

## Data storage

Each page is a `.rznb` file in the data directory. It is a SQLite database containing:

- page metadata (title, original filename, binary storage key, SHA-256 hash)
- cells (type, content, output, timestamps)
- the binary blob itself
- per-page config (key/value)

The server maintains a `catalog.db` index for fast listing across all pages.

On first run the server automatically migrates any pages from an older monolithic
`notebook.db` format into the per-page `.rznb` layout.

## API

All `NB` plugin commands use the protobuf API (`Content-Type: application/x-protobuf`).
The schema is in `proto/notebook.proto`.

A parallel JSON API at `/api/v1/json/...` is used by the Cutter plugin and the browser UI.
Loading