Skip to content

Latest commit

 

History

History
99 lines (64 loc) · 2.64 KB

File metadata and controls

99 lines (64 loc) · 2.64 KB
title Scratchwork
description Share your agent artifacts
keywords
MDX
static site
React
Bun
markdown
author Scratchwork
lang en

Scratchwork

Scratchwork is a tool for sharing static websites with your colleagues.

It's designed for sharing agent artifacts like HTML and markdown files, but it's also useful for writing, product specs, mocks, and demos.

Publish your work publicly to share it with the world, or privately to share it with friends and teammates.

Quick start

Just ask your agent:

Create a simple "hello world" website and publish it to scratchwork.dev. Give everyone with an email @example.com permission to read it.

Slow start

Install the Scratchwork CLI with

curl -fsSL https://scratchwork.dev/install.sh | bash

Ask your agent to create an html or markdown file, or use a Scratchwork example project:

scratchwork example

Preview your work locally:

scratchwork dev

Publish it privately

scratchwork publish --server scratchwork.dev --private

Give your all of your teammates read access:

scratchwork share @example.com --role read

Working with Markdown and React

HTML is great for reading, but it's a terrible medium for writing. Scratchwork renders Markdown with an embedded default renderer. It's not magic; you can see (and edit) it with scratchwork template.

Your markdown files can reference React components defined in ./components/, which is useful for interactive demos like this:

...or building custom formatting components like this highlighter.

Publishing on scratchwork.dev

For now, you can publish projects (<5mb) on scratchwork.dev for free. However, published projects are deleted after 48 hours.

If you'd like to be able to pay for a hosted option, upvote this Github issue (TODO: create an issue)

Hosting your own server

Scratchwork is open source and can be hosted anywhere. To configure your own server, use:

# Configure for Cloudflare (a worker using R2 and D1)
npm create scratchwork-server-cloudflare

swap cloudflare for your favorite serverless platform: aws, vercel, railway, or smolmachines.

Run your server locally with

node local.ts

and deploy it with

node deploy.ts