Quickstart Guide
⚠️ Important: Tonk is under heavy development and APIs are changing rapidly. Getting started requires manual setup and isn't for the faint of heart. We're working on making this easier!
Prerequisites
Before you begin, you'll need to set up the development environment:
- Build core-js:
cd packages/core-js
pnpm install
pnpm build
Try the Example
The most complete example is latergram. Here's how to run it:
- Start the relay server (required for sync):
cd packages/relay
pnpm dev
- Bundle the latergram example:
cd examples/latergram
pnpm install
pnpm bundle create # Creates a .tonk file
touch .env #create .env file, see .env.example for required API_KEY, latergram uses anthropic claude
- Load it in host-web:
cd packages/host-web
pnpm dev
# Then upload the .tonk file created in step 2
Note on Templates
The create package has templates, but they're still in flux and may not work reliably. For now, we
recommend starting from the latergram example and modifying it to suit your needs.
Examples in the Repository
Explore these working examples:
- latergram - Advanced application with dynamic components
Next Steps
- Architecture - Deep dive into Tonk's design
- Virtual File System - Learn about the VFS layer
- Bundle Format - Understand bundle packaging