Skip to content
minorbugPublic

About

Native Anthropic API chat client for classic Mac OS 9. AppleScript tool-calling. Built with Retro68.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Clawssic

A native Anthropic API chat client for classic Mac OS 9 (PowerPC).

Clawssic runs as a Platinum-era Mac app and talks to the Anthropic API over TLS 1.3 via Certainly. It supports tool-calling, including a run_applescript tool that gives the model enough leverage to drive the Finder and most scriptable classic-Mac apps.

What's in this repo

  • src/ — the Clawssic chat client (Retro68 / GCC 12, C99) plus the sources for the scriptrunner helper app that Clawssic finds by creator code CwSR (the "Classic Control Agent") for Apple Event dispatch. See classic-control for the host-side MCP bridge that talks to the same helper.
  • data/prompts/ — per-app system prompts (Finder, AppleWorks, FileMaker, CodeWarrior)
  • data/System Prompt — base system prompt wired into Clawssic at runtime
  • prompts/ — prompts for host-side Claude Code usage
  • docs/ — design specs and implementation plans

Requirements

  • Retro68 toolchain on PATH (GCC 12 PowerPC cross-compiler)
  • Certainly cloned somewhere CMake can find it (sibling directory works)
  • CMake 3.12+
  • A Mac OS 9 VM (SheepShaver or QEMU) or a real PowerMac
  • CodeWarrior Pro 7 on OS 9 to build the scriptrunner helper (a few calls into the OS 9 toolbox aren't reachable from Retro68-built code)

Building the chat client

mkdir -p build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=$RETRO68/cmake/retroppc.toolchain.cmake ..
cmake --build . --target Clawssic_APPL

The build produces build/Clawssic.bin and build/Clawssic.dsk.

Building the scriptrunner helper ('CwSR')

The scriptrunner helper is a small CodeWarrior-compiled app that lives alongside Clawssic on OS 9. Clawssic finds it by creator code CwSR and sends misc/dosc Apple Events to execute AppleScript against whatever app the model is targeting.

Sources in this repo:

  • src/script_runner.c — main helper app
  • src/sr_file_tools.c, src/sr_screenshot.c — file I/O and screen-capture tools
  • src/tcp_server.c, src/json_lite.c — TCP listener and JSON protocol used by the host-side classic-control MCP bridge

In CodeWarrior on OS 9:

  1. Create a new Classic Toolbox project
  2. Add the five source files above
  3. Set output file creator to CwSR, type to APPL
  4. Build

The same helper serves both Clawssic (via Apple Events) and classic-control (via TCP).

Deploying to the VM

Retro68's .dsk has no partition map, so Mac OS 9 won't mount it directly. To deploy:

  1. Quit the VM
  2. Convert qcow2 to raw: qemu-img convert -O raw vm.qcow2 vm.raw
  3. Mount on macOS: hdiutil attach -imagekey diskimage-class=CRawDiskImage vm.raw
  4. Copy build/Clawssic.bin + data/ contents to the mounted disk's Clawssic/ folder
  5. hdiutil detach, convert back to qcow2, relaunch
  6. In OS 9, decode Clawssic.bin via StuffIt Expander

Configuration

On first launch, Clawssic reads Clawssic Prefs (a plain text file next to the app) for configuration:

api_key=sk-ant-YOUR-KEY-HERE
model=claude-sonnet-4-6
max_tokens=32000
system_prompt_file=Clawssic:Prompts:Finder.txt

The prefs file stays on the VM — Clawssic never phones home for credentials.

Related repositories

  • certainly — the TLS 1.2/1.3 library Clawssic uses for HTTPS
  • classic-control — MCP server that lets Claude Code on a modern Mac drive the same scriptrunner helper

Status

Personal side project. It runs. Not production-grade; see Certainly's security notes before pointing this at anything that matters.

License

MIT — see LICENSE.

About

Native Anthropic API chat client for classic Mac OS 9. AppleScript tool-calling. Built with Retro68.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages