Skip to content

Repository files navigation

HyperLab: an open-source, AI-native successor to HyperCard

Latest release CI status Licence: MIT Rust 1.88+ Tauri 2 PRs welcome

HyperCard let people who never called themselves programmers build real software: draw a card, put a button on it, write two lines of script, and it runs. HyperLab is what that idea looks like thirty years on, with language models built into the way a stack thinks rather than bolted onto the side of one.

Cards, stacks, fields, buttons, scripts and message passing are all still here, and a stack stays inspectable and editable while it runs β€” the two qualities that made the original worth learning in the first place.

πŸ•―οΈ Bill Atkinson (1951–2025) wrote QuickDraw, MacPaint and HyperCard, and insisted the last of them ship free with every Mac. Millions of people built something with it, and a great many of them never thought of themselves as programmers at all. HyperLab is dedicated to his memory.

The assistant is asked for a button that halves the ingredients; it calls create_button, the button appears, clicking it halves them, and undo puts the card back

πŸ“‘ Contents

✨ Features

  • Behaviour is HyperTalk. put it & return after field "Items", and put ai("Summarize this") into field "Summary" β€” a model is part of the language rather than a panel beside it. Edit a script and it takes effect at once; there is no build step inside a stack.
  • Everything is one kind of change. Typing in a field, dragging a button, a script, and the assistant all reach a stack the same way, so all of it is undoable and none of it is a special case.
  • A stack is a directory. One .json per card and scripts kept as plain .hypertalk files rather than escaped inside JSON, so a stack diffs, merges and greps like source code.
  • A stack is also a graph. Go β–Έ Map reads every go back out without running a line, and names the cards nothing leads to, the cards with no way out, and the links pointing at a card deleted last week.
  • A stack can leave. The cards as a PDF, the map as a PNG, the whole thing as a web page driven by _hyperscript, or as a Decker deck.
  • A stack can be driven from outside. hyperlab-mcp serves one over MCP, read-only until you say otherwise, so any client that speaks the protocol can open it, read it and edit it.
  • Local first. No provider configured is a working HyperLab. When one is, the key goes in your operating system's keychain and the sidebar shows the exact text it sent.

πŸš€ Getting Started

πŸ–₯️ The application β€” a .dmg, an .msi, and a .deb, .rpm or .AppImage, on the releases page. Nothing phones home, and HyperLab works with no AI provider configured.

πŸ“¦ Prebuilt tools β€” detects your OS/architecture automatically and installs both hyperlab-mcp (serves a stack over MCP, so Claude Desktop or any other client can drive it) and hyperlab-graph (draws a stack, or reports what is wrong with it):

# 🐧 Linux / 🍎 macOS (x86_64 or arm64)
curl -fsSL https://raw.githubusercontent.com/JGalego/HyperLab/main/install.sh | sh

# πŸͺŸ Windows (x86_64), in PowerShell
irm https://raw.githubusercontent.com/JGalego/HyperLab/main/install.ps1 | iex

πŸ¦€ From source (needs Rust 1.88):

cargo install --git https://github.com/JGalego/HyperLab hyperlab-mcp
cargo install --git https://github.com/JGalego/HyperLab hyperlab-graph

πŸ”¨ Building the application β€” needs πŸ¦€ Rust 1.88, 🟒 Node 20, and Tauri's system dependencies.

Clone it:

git clone https://github.com/JGalego/hyperlab
cd hyperlab

Check that the core is sound before spending anything on a build β€” this needs no Node and no system libraries:

cargo test

Then start the application. The first build takes a while; after that it reloads as you edit:

cd apps/desktop
npm install
npm run tauri dev

Then open one of the examples.

πŸƒ Examples

Playing Cluedo in HyperLab

Cluedo β€” a drawn mansion with clickable rooms, portraits that are themselves the buttons, and a case you close by deduction.

The map of the Myst stack

Myst β€” an island, four Ages, and one book you should not open. Its shape is the point, which is why DeMystify and mystextract both exist to recover it from the original. Go β–Έ Map finds the trap book without running a line.

Paging through the LLMs for n00bs deck

LLMs for n00bs β€” nine slides on how a language model works, drawn one bit deep. The last one asks a real model, and says so plainly when none is set up.

Address Book β€” a card per person, one shared background.

Recipe Box β€” chunk expressions doing arithmetic on the ingredients.

Todo β€” a list, a dialog, and a loop.

Every one of them is also a PDF in docs/ β€” the same cards, exported by HyperLab itself, if you would rather read them than run them.

cargo run -p hyperlab-persistence --example build_examples
cargo run -p hyperlab-export --example export_examples

πŸ—οΈ Architecture

UI  β†’  Commands  β†’  Runtime  β†’  Model  β†’  Renderer

One rule holds the design up: nothing changes a stack except a command. The interface, a script and an AI assistant all reach a stack through that one path in, so undo, scripting, automation, testing and AI all work the same way β€” a change made by any of them looks like a change made by any other.

crates/
    stack/          the object model      β€” what a stack is
    parser/         lexer, parser, AST    β€” what the author wrote
    runtime/        commands, dispatch,
                    the interpreter       β€” what it means
    persistence/    the .hl bundle        β€” where it is kept
    ai/             provider interfaces   β€” who is asked
    ai-providers/   OpenAI and Anthropic
                    clients               β€” how they are reached
    assistant/      prompts, the tool
                    loop, the transcript  β€” what is actually said
    mcp/            tools, MCP server
                    and client            β€” what may be done
    graph/          the routes between
                    cards                 β€” where it all leads
    export/         a stack as a PDF      β€” how it leaves
    hyperscript/    HyperTalk as
                    _hyperscript          β€” where it goes next
    decker/         a stack as a Decker
                    deck                  β€” where else it goes

apps/desktop/       the Tauri shell and the React renderer
docs/               architecture, roadmap, HyperTalk reference
examples/           six stacks, which are also tests

hyperlab-parser depends on nothing at all, so the language can be tested and reused on its own. The desktop shell contains no logic worth the name.

Read docs/architecture.md for the reasoning, and docs/hypertalk.md for the language.

πŸ€– AI

Three claims, and the code is arranged so each of them holds on its own:

  • No provider is special. A provider implements AiProvider and nothing in HyperLab switches on which one it is. OpenAI, Anthropic, Google, Ollama, OpenRouter and local models are just names in a settings file. The clients live in their own crate, which the rest of HyperLab does not depend on; one of them speaks the OpenAI chat-completions protocol, so pointing a baseUrl at Ollama or a local server is all it takes to run with no network at all. A key goes into the keychain your operating system already runs, or into an environment variable you name; the settings file records which, and never the key.
  • An assistant can do exactly what you can do. It works through MCP tools that wrap runtime commands, so everything it does is undoable and visible. There is no private back door into a stack.
  • Nothing leaves without a reason. HyperLab is local-first, works with no provider configured, and the context builder omits your field contents unless a question actually needs them. The sidebar shows the exact text it sent with every question.

There are three ways in, and they are the same machinery underneath: ai(…) and ask assistant in a script, the sidebar, and MCP β€” hyperlab-mcp --stack Todo.hl hands the same tools to any client that speaks the protocol, read-only until you say otherwise.

🀝 Contributing

Please do β€” see CONTRIBUTING.md and the Code of Conduct. The roadmap lists good places to start.

πŸ“„ Licence

MIT.

HyperLab is an original work inspired by HyperCard. It contains no Apple code and no Apple artwork, and the Neo Classic theme is drawn from scratch in the spirit of the era.

About

🍏 Reimagining the magic of HyperCard for the AI era

Topics

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages