File size: 3,255 Bytes
0798d16
8da8a3a
 
 
 
0798d16
8da8a3a
 
 
 
 
 
0798d16
 
 
8da8a3a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
title: html studio
emoji: 
colorFrom: red
colorTo: gray
sdk: static
app_file: index.html
short_description: Describe a site, any model writes it, ship it to harvis.dev
hf_oauth: true
hf_oauth_scopes:
  - inference-api
hf_oauth_expiration_minutes: 480
pinned: false
---

# html studio

Describe a site. Any open-weights model on the Hugging Face Inference Providers
router writes it as one self-contained HTML file. Preview it, edit it, then
deploy it to [harvis.dev](https://harvis.dev) and get an immutable live URL in
about two seconds.

## How it works

There is no server. This is a Static Space — everything runs in your browser,
against two CORS-open APIs.

1. **Pick a model.** The list is fetched live from
   `https://router.huggingface.co/v1/models`, so every open-weights chat model
   the router serves is selectable.
2. **Describe the site.** The model streams back a complete `<!doctype html>`
   document with all CSS and JS inlined. The preview renders as it arrives.
3. **Edit if you want.** The code pane is a live editor — edits re-render and
   are what gets deployed.
4. **Deploy.** The document is posted to `https://harvis.dev/api/upload`.

Deploying again reuses the site's deploy token, so it updates the same URL in
place rather than creating a new site. Press **New site** to start a fresh one.

## Inference credits

Sign in with Hugging Face to generate against your own free monthly inference
credits — the OAuth token is requested with the `inference-api` scope. You can
paste a token from
[huggingface.co/settings/tokens](https://huggingface.co/settings/tokens)
instead. Nothing leaves the browser except the request to the HF router; the
token is kept in `localStorage`.

## Deploy links

Every deploy returns two links.

- **Live URL** — public. Share it.
- **Claim link** — private. Open it and sign in to attach the site to a
  harvis.dev account. It cannot be recovered if lost, and an unclaimed site
  expires 24 hours after its last deploy.

## Branding

The interface uses the harvis.dev design system, vendored here so the Space is
self-contained and works offline:

| Path | What it is |
|---|---|
| `styles.css` | Design-system entry point — the `@import` list |
| `tokens/` | Colour, type, spacing, radius/shadow, motion, base reset, light theme |
| `assets/fonts/` | Nordwand Mono — the `[#]` logomark face |
| `assets/icons/` | Remix Icon v4.9.1 webfont, `-line` style |
| `app.css` | Application layer — every value resolves to a token |

Square corners, 9px crop-mark corner brackets, hard offset shadows with zero
blur, one accent (Flare `#FF4D17`), mono for every machine-generated value, and
no emoji anywhere in the interface. The contrast control in the nav toggles
`data-theme="paper"`, which inverts the whole app to the warm paper canvas with
no light-specific CSS branch.

## Notes

- The preview iframe is sandboxed without `allow-same-origin`, so origin-bound
  APIs (`localStorage`, cookies) throw inside the preview. They work on the
  deployed site.
- harvis.dev limits: 50 MB and 500 files per site, static files only.

## Run it locally

No build step.

```bash
python3 -m http.server 8000
```

OAuth only works when served as a Space; locally, paste a token instead.