Skip to content

Box-run demo

Runtime: python — a stdlib-only Python 3.11 environment inside the box.

A minimal demo, not a real project

This is here to give you the idea in as few steps as possible. The box it runs prints a line and exits: enough to watch the trust chain work end to end, and deliberately not an example of what is worth packing. For boxes that carry something real — a language model, ffmpeg, a dataset — see the other demos.

Try it now

This demo is only about running a box someone else built and signed. Nothing is compiled, nothing is resolved, and no toolchain is installed — which is the point: consuming a box asks far less of a machine than building one.

Open it in GitHub Codespaces for an instant VM with the repository ready and a walkthrough to follow:

Open in GitHub Codespaces

Runs the Linux x86_64 CPU demo using your GitHub Codespaces account.

To go the whole way instead — from an empty project to a box you built yourself — see the end-to-end demo.

Local setup

Building a box needs pixi and conda-pack. But consuming does not:
If you only want to see what a box is, and how to run it, try this public demo.

You can find the demo box GitHub release here.

Downloads

Download the demo for your system:

macOS (Metal)Linux (CPU)Windows (CPU)
macos-aarch64-metallinux-x86_64-cpuwindows-x86_64-cpu

NOTE

The file you download (eg. hello-box-1.0.0-macos-aarch64-metal.zip) is NOT the demo box — it is a container, named so you can tell which machine it is for, holding the box together with two ready-to-run examples.

The demo box is the .zip inside it under box/, next to its .release.json. Do not unzip that one: it's ready to run. Leave both named as they are and side by side, because that is how verify finds the box.

Run the box

Once you have downloaded the demo, follow these steps:

  1. Unpack the demo into a folder of its own:
sh
unzip hello-box-1.0.0-<target>.zip -d scrollcase-demo
cd scrollcase-demo

box/ holds 2 files: the demo box .zip to run, and its matching .release.json. Beside it you already have run-box.ts and run_box.py — nothing to retype.


  1. Download the demo public key, next to the box rather than inside it:
sh
mkdir keys
curl -o keys/example-signing-public.json \
  https://raw.githubusercontent.com/suffro/scrollcase/main/examples/keys/example-signing-public.json

or alternatively here's its GitHub link: example-signing-public.json

Why the key lives outside the box

A signature only proves where something came from if the key does not travel with it. Keeping the key in its own folder — and downloading it from the repository rather than the release — is the habit to carry into a real project, where the key will not be a demo key.


  1. Verify and run the box:

This path needs the CLI, and nothing else — no pixi, no conda-pack, no build:

sh
npm install -g scrollcase
sh
scrollcase verify box/*.release.json --public-key keys/example-signing-public.json
scrollcase run    box/*.release.json --public-key keys/example-signing-public.json

The box/*.release.json above is a real shell glob, not a placeholder — your shell replaces it with the one release document in the folder. PowerShell does not expand globs for a command like this, which is why it needs Get-ChildItem. Either way you can always type the file name you see after unzipping. You never name the box archive: verify finds it beside the release document, under the hash that document commits to.

What just happened

verify checks the signature, the archive's size and hash, the entry names and manifest agreement, and works on any machine. run extracts the box to a temporary directory and executes its entry point with the interpreter inside it — so it needs a machine matching the box's target. The box output makes that outcome explicit instead of presenting its temporary extraction paths as the demo:

text
Hello from inside a Scrollcase box!

  signed -> verified -> relocated -> running

Success: the box's own Python runtime executed this program.
No dependencies were resolved or installed to make this run.

  Runtime  Python 3.11.15
  Host     Linux / x86_64

The final two lines reflect the box you downloaded and the matching machine running it.

The demo key is a demo key

Those boxes are signed with a key that exists only for the example. It signs nothing else and no trust chain depends on it. A signature from it means the example is intact — nothing more.


  1. Check out the results, that's it.

At this point the folder looks like this — the box untouched in its own directory, the key in another, the runnable examples above both:

text
scrollcase-demo/
├── box/                               # from the download, left exactly as it arrived
│   ├── <archive sha256>.zip
│   └── <document sha256>.release.json
├── keys/                              # step 2, from the repository — never from the release
│   └── example-signing-public.json
├── run-box.ts                         # from the download
├── run_box.py                         # from the download
├── package.json                       # from the download
└── README.md                          # from the download

Everything except keys/ came out of the one file you downloaded. The key is the deliberate exception, and the reason is above.