hypeframe 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,297 +1,351 @@
1
- # hypeframe
2
-
3
- Mesin di perangkat untuk **HypeFrame Web**. Klip dari kode, render video, dan (segera) asisten AI berjalan di
4
- komputer kamu sendiri. Web HypeFrame hanya menjadi tampilannya.
1
+ <p align="center">
2
+ <b>◆ hypeframe</b><br>
3
+ The local engine for <a href="https://hype-frame.com">HypeFrame Web</a>.<br>
4
+ Code clips, video renders and (soon) AI assistants run on your own machine. The web is just the screen.
5
+ </p>
6
+
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/hypeframe"><img alt="npm" src="https://img.shields.io/npm/v/hypeframe?color=3DD6C3&label=npm"></a>
9
+ <a href="LICENSE"><img alt="MIT" src="https://img.shields.io/badge/license-MIT-3DD6C3"></a>
10
+ <a href="README.id.md"><img alt="Bahasa Indonesia" src="https://img.shields.io/badge/baca-Bahasa%20Indonesia-B49CFF"></a>
11
+ </p>
5
12
 
6
13
  ```bash
7
- npx hypeframe
14
+ curl -fsSL https://hype-frame.com/install | bash
8
15
  ```
9
16
 
10
- > **Status: pratinjau.** HypeFrame Web sedang dibuka bertahap. Protokol dan perintah di bawah bisa berubah sebelum
11
- > versi 1.0.
17
+ > **Preview.** HypeFrame Web is opening in stages. The protocol and commands may still change before 1.0.
12
18
 
13
- ## Daftar isi
19
+ ## Contents
14
20
 
15
- - [Cara kerja](#cara-kerja)
16
- - [Kebutuhan](#kebutuhan)
17
- - [Mulai cepat](#mulai-cepat)
18
- - [Pilihan perintah](#pilihan-perintah)
19
- - [Mengelola perangkat](#mengelola-perangkat)
20
- - [Render](#render)
21
- - [Keamanan dan privasi](#keamanan-dan-privasi)
22
- - [Folder data](#folder-data)
23
- - [Memecahkan masalah](#memecahkan-masalah)
24
- - [Untuk pengembang](#untuk-pengembang)
25
- - [Lisensi](#lisensi)
21
+ - [How it works](#how-it-works)
22
+ - [Install](#install)
23
+ - [Quick start](#quick-start)
24
+ - [Commands](#commands)
25
+ - [Rendering](#rendering)
26
+ - [Security and privacy](#security-and-privacy)
27
+ - [Data folder](#data-folder)
28
+ - [Troubleshooting](#troubleshooting)
29
+ - [Development](#development)
30
+ - [License](#license)
26
31
 
27
- ## Cara kerja
32
+ ## How it works
28
33
 
29
34
  ```
30
- Browser kamu (HP / PC) Server HypeFrame Perangkat kamu
35
+ Your browser (phone / PC) HypeFrame servers Your machine
31
36
  ┌──────────────────────────┐ ┌──────────────────────────┐ ┌──────────────────────────────┐
32
- │ HypeFrame Web │◄───►│ Gateway │◄────│ hypeframe (mesin lokal) │
33
- │ editor, pratinjau, │ WS │ akun, daftar perangkat, │ WS │ (menghubungi gateway lebih │
34
- │ project tersimpan di │ │ meneruskan pesan kendali │ │ dulu, tanpa membuka port) │
35
- │ browser │ └──────────────────────────┘ │ Chrome tanpa layar + ffmpeg │
36
- │ │◄────────── http://127.0.0.1 ─────────│ layanan render lokal │
37
- └──────────────────────────┘ berkas project dan hasil render └──────────────────────────────┘
38
- langsung, tidak lewat server
37
+ │ HypeFrame Web │◄───►│ Gateway │◄────│ hypeframe (local engine) │
38
+ │ editor, preview, │ WS │ accounts, device list, │ WS │ (connects out to the gateway,│
39
+ │ projects saved in the │ │ relays control messages │ │ never opens a port) │
40
+ │ browser │ └──────────────────────────┘ │ headless Chrome + ffmpeg │
41
+ │ │◄────────── http://127.0.0.1 ─────────│ local render service │
42
+ └──────────────────────────┘ project files and finished video └──────────────────────────────┘
43
+ go direct, never through a server
39
44
  ```
40
45
 
41
- - **Sambungan.** Mesin membuka sambungan keluar ke gateway HypeFrame. Kamu tidak perlu membuka port atau mengatur
42
- router.
43
- - **Pesan lewat gateway.** Yang lewat gateway hanya pesan kendali yang kecil, misalnya "status" dan "minta kunci
44
- render".
45
- - **Berkas tidak lewat server.** Project dan hasil render dikirim langsung antara browser dan mesin lewat
46
- `127.0.0.1`, di perangkat yang sama.
47
- - **Mesin motion yang sama.** Render memakai mesin motion yang sama dengan aplikasi HypeFrame di HP dan render
48
- server, jadi hasilnya sama.
49
-
50
- ## Kebutuhan
46
+ - **Connection.** The engine opens an outgoing connection to the HypeFrame gateway. No port forwarding, no router setup.
47
+ - **Only small messages pass the gateway**, such as "status" and "give me a render key".
48
+ - **Files never touch a server.** Projects and results move between the browser and the engine over `127.0.0.1` on
49
+ the same machine.
50
+ - **Same motion engine everywhere.** Renders use the same motion engine as the HypeFrame phone app and the render
51
+ server, so the output matches.
51
52
 
52
- | | |
53
- |---|---|
54
- | Node.js | 20.3 atau lebih baru ([unduh](https://nodejs.org/id/download)) |
55
- | Sistem | Windows 10/11, macOS, Linux (x64 atau arm64) |
56
- | Android | Lewat Termux (`pkg install nodejs`). Asisten bisa jalan; render hanya bila Chromium tersedia. Untuk Android, aplikasi HypeFrame (APK) tetap cara termudah. |
57
- | iPhone / iPad | Tidak bisa menjalankan mesin. Pakai HypeFrame Web dengan render "Di browser ini". |
58
- | Chrome | Memakai Chrome atau Edge yang sudah terpasang. Kalau tidak ada, Chrome for Testing diunduh sekali (± 150 MB). |
59
- | RAM | Disarankan 8 GB atau lebih untuk video 1080p. 4 GB cukup untuk video kecil. |
53
+ ## Install
60
54
 
61
- ## Mulai cepat
55
+ **macOS and Linux**
62
56
 
63
- 1. Buka HypeFrame Web lalu masuk dengan akun Google.
64
- 2. Di komputer yang akan dipakai, buka Terminal (Windows: PowerShell) dan jalankan:
57
+ ```bash
58
+ curl -fsSL https://hype-frame.com/install | bash
59
+ ```
65
60
 
66
- ```bash
67
- npx hypeframe
68
- ```
61
+ **Windows** (PowerShell)
69
62
 
70
- 3. Mesin menampilkan kode dan tautan, lalu mencoba membuka browser:
63
+ ```powershell
64
+ irm https://hype-frame.com/install.ps1 | iex
65
+ ```
71
66
 
72
- ```
73
- HypeFrame mesin 0.1.0 (windows, LAPTOP-RAFI)
74
- Buka https://hype-frame.com/sambung?kode=KJ4M-7QXP lalu tekan Sambungkan. Kode: KJ4M-7QXP
75
- ```
67
+ The installer downloads a single `hypeframe` program from
68
+ [GitHub Releases](https://github.com/sairidev/hypeframe/releases), checks it against `SHA256SUMS`, puts it in
69
+ `~/.hypeframe/bin` and adds that folder to your `PATH`. **No Node.js needed.** Open a new terminal afterwards and type
70
+ `hypeframe`. To pick a version: `HYPEFRAME_VERSION=0.3.0` (bash: `curl … | HYPEFRAME_VERSION=0.3.0 bash`). To update
71
+ later: `hypeframe update`.
76
72
 
77
- 4. Di halaman itu, periksa nama perangkatnya, lalu tekan **Sambungkan**.
78
- 5. Terminal menampilkan:
73
+ **With Node.js** (20.3 or newer), the npm package works the same:
79
74
 
80
- ```
81
- Tersambung ke akun r***@gmail.com
82
- Mesin siap. Biarkan jendela ini terbuka selama memakai HypeFrame Web.
83
- Render siap (Chrome 131.0.6778.86).
84
- ```
75
+ ```bash
76
+ npx hypeframe # run once, nothing installed
77
+ npm i -g hypeframe # keep it installed
78
+ ```
85
79
 
86
- Biarkan jendela itu terbuka. Di HypeFrame Web, pojok layar menampilkan **"Mesin: LAPTOP-RAFI · tersambung"**.
80
+ | | |
81
+ |---|---|
82
+ | System | Windows 10/11 (x64; ARM64 through emulation), macOS (Apple Silicon or Intel), Linux x64 or arm64 (glibc or musl/Alpine) |
83
+ | Android | Through Termux with Node.js (`pkg install nodejs`, then `npx hypeframe`); the installer switches to npm there. Rendering needs Chromium; the HypeFrame app (APK) is the easier route. |
84
+ | iPhone / iPad | Cannot run the engine. Use HypeFrame Web with "In this browser" rendering. |
85
+ | Chrome | Uses the installed Chrome or Edge. Without one, Chrome for Testing is downloaded once (about 150 MB). |
86
+ | ffmpeg | Comes with the npm package. The standalone program downloads the same build once (about 28 MB) and checks its sha256. |
87
+ | RAM | 8 GB or more for 1080p video. 4 GB is enough for small videos. |
88
+ | Disk | About 120 MB for the program, plus Chrome and ffmpeg when they are downloaded. |
87
89
 
88
- Lain kali cukup jalankan `npx hypeframe` lagi. Perangkat yang sudah tersambung tidak perlu kode baru.
90
+ ## Quick start
89
91
 
90
- ## Pilihan perintah
92
+ 1. Open [HypeFrame Web](https://hype-frame.com) and sign in with Google.
93
+ 2. On the machine that will do the work, [install](#install) hypeframe, open a new terminal and run `hypeframe`.
91
94
 
92
95
  ```
93
- npx hypeframe [--nama NAMA] [--gpu] [--tanpa-browser] [--gateway URL] [--web URL]
94
- npx hypeframe logout
96
+ ◆ hypeframe v0.3.0
97
+ local engine for HypeFrame Web
98
+
99
+ Account ▲ not connected
100
+ Engine stopped
101
+ Device LAPTOP-RAFI (windows)
102
+ Render Chrome · GPU off
103
+ 24 hours -
104
+ Version 0.3.0 · Bun 1.4.4 (standalone)
105
+
106
+ ◆ What would you like to do?
107
+ │ ● Start the engine (connects your account first)
108
+ │ ○ Open HypeFrame Web
109
+ │ ○ Render speed test
110
+ │ ○ Render history
111
+ │ ○ ✦ AI assistant on this machine (coming soon)
112
+ │ ○ Start automatically
113
+ │ ○ Settings
114
+ │ ○ Check this machine
115
+ │ ○ Free up space
116
+ │ ○ Create a problem report
117
+ │ ○ Update hypeframe
118
+ │ ○ Connect to an account
119
+ │ ○ Exit
120
+ └
95
121
  ```
96
122
 
97
- | Pilihan | Arti |
98
- |---|---|
99
- | `--nama NAMA` | Nama perangkat yang tampil di web (bawaan: nama komputer, paling panjang 40 huruf). Bisa diganti juga dari web. |
100
- | `--gpu` | Render memakai GPU perangkat: lebih cepat untuk efek WebGL berat. Tanpa pilihan ini, render memakai SwiftShader seperti server render, supaya hasilnya sama persis. |
101
- | `--tanpa-browser` | Tidak membuka browser saat menyambungkan. Tautannya tetap dicetak. Berguna untuk server tanpa layar. |
102
- | `--gateway URL` | Alamat gateway (bawaan `https://api.sairipedia.com`). |
103
- | `--web URL` | Alamat HypeFrame Web (bawaan `https://hype-frame.com`). Halaman render diambil dari sini, dan hanya alamat ini yang boleh memakai layanan render lokal. |
104
- | `logout` (atau `keluar`) | Menghapus token perangkat dari komputer ini. Untuk memutus dari sisi akun, pakai **Putuskan** di web. |
105
-
106
- Variabel lingkungan:
123
+ 3. Pick **Start the engine**. It prints a code and a link and opens your browser:
107
124
 
108
- | Variabel | Arti |
109
- |---|---|
110
- | `HYPEFRAME_GATEWAY_URL` | Sama dengan `--gateway`. |
111
- | `HYPEFRAME_WEB_URL` | Sama dengan `--web`. |
112
- | `HYPEFRAME_DIR` | Folder data (bawaan `~/.hypeframe`). |
113
- | `HYPEFRAME_CHROME` | Jalur Chrome tertentu, menggantikan pencarian otomatis. |
125
+ ```
126
+ 16:03:20 ● Open https://hype-frame.com/sambung?kode=KJ4M-7QXP and press Connect. Code: KJ4M-7QXP
127
+ ```
114
128
 
115
- Satu folder data hanya bisa dipakai satu mesin sekaligus. Menjalankan dua kali menghasilkan pesan "Mesin sudah
116
- berjalan di terminal lain."
129
+ 4. Check the device name on that page and press **Connect**.
117
130
 
118
- ## Mengelola perangkat
131
+ ```
132
+ 16:03:31 ✔ Connected to account r***@gmail.com
133
+ 16:03:32 ✔ Engine ready. Keep this window open while you use HypeFrame Web.
134
+ 16:03:32 ↳ Press Ctrl+C to stop.
135
+ 16:03:36 ✔ Render ready (Chrome 131.0.6778.86).
136
+ ```
119
137
 
120
- Halaman **Setelan → Perangkat saya** di HypeFrame Web menampilkan untuk setiap perangkat:
138
+ Keep the window open. HypeFrame Web shows **"Engine: LAPTOP-RAFI · connected"** in the corner. Next time just run
139
+ `hypeframe` again; a connected device does not need a new code.
121
140
 
122
- - nama;
123
- - sistem operasi;
124
- - status (tersambung / terputus);
125
- - versi mesin;
126
- - kesiapan render.
141
+ The terminal speaks Indonesian when your system does and English otherwise. Pin it with
142
+ `hypeframe config --language id|en|auto` or `HYPEFRAME_LANG`.
127
143
 
128
- Aksi yang tersedia:
144
+ ## Commands
129
145
 
130
- - **Ganti nama.**
131
- - **Jadikan utama.** Mesin ini yang dipakai bila ada beberapa yang tersambung.
132
- - **Putuskan.** Token perangkat dicabut, dan mesin di komputer itu langsung berhenti dengan pesan "Perangkat ini sudah
133
- diputus dari akun".
146
+ `hypeframe` with no command opens the menu in a terminal. Outside a terminal (services, autostart, CI) it starts the
147
+ engine directly. Every menu item is also a command:
134
148
 
135
- Batasan:
149
+ | Command | What it does |
150
+ |---|---|
151
+ | `hypeframe start` | Start the engine; connects the account first when needed |
152
+ | `hypeframe login` | Connect this device to a HypeFrame account |
153
+ | `hypeframe logout` | Remove the device token from this machine (`keluar` also works). To revoke it from the account side, use **Disconnect** on the web |
154
+ | `hypeframe status` | Account, engine, render, version |
155
+ | `hypeframe open` | Open HypeFrame Web in the browser |
156
+ | `hypeframe doctor` | Check Node, disk space, ffmpeg, Chrome and its encoders, gateway and web |
157
+ | `hypeframe bench` | Measure H.264 encoding at 720p and 1080p in the render Chrome; estimates a 60-second video |
158
+ | `hypeframe history` | Renders from the last 24 hours, with file paths |
159
+ | `hypeframe autostart on\|off` | Start the engine when you sign in (Startup folder / LaunchAgent / systemd user unit) |
160
+ | `hypeframe config` | Device name, GPU, language; interactive in a terminal |
161
+ | `hypeframe clean` | Remove the downloaded Chrome, cached render pages, old logs and failed renders. Finished videos stay |
162
+ | `hypeframe report` | Write a problem report (versions, settings, recent log) with tokens masked |
163
+ | `hypeframe update` | Update to the latest version (runs the installer again, or `npm i -g hypeframe@latest` for an npm install) |
164
+
165
+ | Option | Meaning |
166
+ |---|---|
167
+ | `--gpu` / `--no-gpu` | Render with the device GPU: faster for heavy WebGL. Without it, renders use SwiftShader like the render server, so output matches exactly |
168
+ | `--name <name>` | Device name shown on the web (default: computer name, up to 40 characters) |
169
+ | `--no-browser` | Do not open a browser while connecting; the link is still printed. For headless servers |
170
+ | `--language id\|en\|auto` | Terminal language (with `config`) |
171
+ | `--gateway <url>` | Gateway address (default `https://api.sairipedia.com`) |
172
+ | `--web <url>` | HypeFrame Web address (default `https://hype-frame.com`). The render page comes from here, and only this origin may use the local render service |
136
173
 
137
- - Satu akun bisa punya paling banyak **5 perangkat**.
138
- - Mesin yang versinya terlalu lama ditandai **Perlu diperbarui**. Perbarui dengan:
174
+ The 0.1.0 spellings `--nama` and `--tanpa-browser` still work.
139
175
 
140
- ```bash
141
- npx hypeframe@latest
142
- ```
176
+ | Environment variable | Meaning |
177
+ |---|---|
178
+ | `HYPEFRAME_GATEWAY_URL`, `HYPEFRAME_WEB_URL` | Same as `--gateway`, `--web` |
179
+ | `HYPEFRAME_DIR` | Data folder (default `~/.hypeframe`) |
180
+ | `HYPEFRAME_CHROME` | A specific Chrome binary instead of the automatic search |
181
+ | `HYPEFRAME_LANG` | `id` or `en` |
182
+ | `NO_COLOR`, `FORCE_COLOR` | Turn terminal colors off or on |
143
183
 
144
- ## Render
184
+ One data folder runs one engine at a time. A second copy stops with "The engine is already running in another
185
+ terminal."
145
186
 
146
- **Yang dirender di mesin**
147
- - Simpan video, bila "Di mesin" dipilih.
148
- - Klip dari kode, dengan urutan: mesin dulu, lalu render server untuk paket Max, lalu browser.
187
+ ### Managing devices
149
188
 
150
- **Jalannya satu render**
151
- 1. Web meminta kunci render ke mesin lewat gateway, lalu mengirim project langsung ke `http://127.0.0.1:<port>` mesin.
152
- Project dikirim per potongan 8 MB, masing-masing dengan sidik sha256.
153
- 2. Mesin membuka Chrome tanpa layar dengan profil baru, lalu memuat halaman render HypeFrame. Halaman render diambil
154
- dari HypeFrame Web, disimpan per versi, dan berkas yang jarang dipakai seperti huruf dan efek diambil saat
155
- dibutuhkan.
156
- 3. Hasil MP4 (H.264) diunduh kembali ke browser. Klip transparan menjadi WebM.
189
+ **Settings → My devices** on HypeFrame Web lists each device with its name, system, status, engine version and render
190
+ readiness. You can **rename** it, **make it primary** (used when several are connected) or **disconnect** it (the token
191
+ is revoked and the engine on that machine stops at once). An account can have up to **5 devices**. Engines that are too
192
+ old are marked **Needs update**: run `hypeframe update` or `npx hypeframe@latest`.
157
193
 
158
- **Batasan**
159
- - Satu render dalam satu waktu; render lain menunggu di antrean.
160
- - Satu render paling lama 30 menit.
161
- - Hasil disimpan 24 jam di folder mesin.
162
- - **Klip transparan** butuh Chrome yang bisa membuat VP9 dengan alpha. Chrome tanpa layar di Windows tidak bisa,
163
- jadi mesin menolaknya dengan cepat dan web membuatnya di tempat lain. Terminal memberi tahu hal ini saat mesin
164
- menyala.
194
+ ## Rendering
165
195
 
166
- ## Keamanan dan privasi
196
+ **What runs on the engine:** saving videos when "On my engine" is selected, and code clips (engine first, then the
197
+ render server on the Max plan, then the browser).
167
198
 
168
- **Pesan yang diterima mesin**
169
- - Mesin hanya menerima jenis pesan yang diizinkan (`status`, `kunci`). Gateway dan mesin sama-sama menolak jenis lain,
170
- jadi server tidak bisa menyuruh mesin menjalankan perintah sembarangan.
171
- - Terminal jarak jauh tidak ada.
199
+ **One render, step by step**
172
200
 
173
- **Layanan render lokal**
174
- - Hanya mendengarkan di `127.0.0.1`.
175
- - CORS hanya untuk alamat HypeFrame Web, dengan izin "akses jaringan lokal" dari Chrome.
176
- - Setiap render butuh tiket yang ditandatangani (HMAC-SHA256) dengan kunci acak yang dibuat setiap mesin menyala.
177
- - Kunci itu hanya diberikan lewat gateway ke tab yang login dengan akun pemilik mesin.
201
+ 1. The web asks the engine for a render key through the gateway, then sends the project straight to
202
+ `http://127.0.0.1:<port>` in 8 MB parts, each with a sha256 digest.
203
+ 2. The engine starts headless Chrome with a fresh profile and loads the HypeFrame render page. The page comes from
204
+ HypeFrame Web and is cached per version; rarely used files such as fonts and effects are fetched on demand.
205
+ 3. The MP4 (H.264) goes back to the browser. Transparent clips become WebM.
178
206
 
179
- **Chrome yang merender**
180
- - Tidak punya akses internet; semua nama host diblokir kecuali `127.0.0.1`.
181
- - Kode di klip tidak bisa mengirim data keluar.
207
+ **Limits:** one render at a time (others queue), 30 minutes per render, results kept 24 hours. **Transparent clips**
208
+ need a Chrome that can encode VP9 with alpha. Headless Chrome on Windows cannot, so the engine refuses those quickly and
209
+ the web makes them elsewhere; the terminal says so when the engine starts.
182
210
 
183
- **Token perangkat**
184
- - Token (`hfm_…`) tersimpan di `~/.hypeframe/akun.json`, hanya bisa dibaca pemilik.
185
- - Token tidak pernah dicetak.
186
- - Gateway hanya menyimpan sidiknya (sha256).
211
+ ## Security and privacy
187
212
 
188
- **Kode pancingan**
189
- - Jangan menyetujui kode yang tidak kamu jalankan sendiri.
190
- - Bila kode diminta dari jaringan yang berbeda dengan browser kamu, halaman persetujuan menampilkan peringatan.
213
+ - **Allowed messages only.** The engine accepts `status` and `kunci` (render key) and nothing else. The gateway filters
214
+ too, but the engine never relies on that, so a server cannot make the engine run arbitrary commands. There is no
215
+ remote terminal.
216
+ - **Local render service** listens on `127.0.0.1` only. CORS is limited to the HypeFrame Web origin, with Chrome's
217
+ local network access permission. Every render needs a ticket signed (HMAC-SHA256) with a random key made each time
218
+ the engine starts; the key is only handed, through the gateway, to tabs signed in as the engine's owner.
219
+ - **The render Chrome has no internet.** Every host name resolves to nothing except `127.0.0.1`, so code inside a clip
220
+ cannot send data out.
221
+ - **Device token** (`hfm_…`) lives in `~/.hypeframe/akun.json`, readable by the owner only. It is never printed, and is
222
+ masked in the log file and problem reports. The gateway stores only its sha256.
223
+ - **Phishing codes.** Never approve a code you did not run yourself. When a code was requested from a different
224
+ network than your browser, the approval page shows a warning.
225
+ - **Sent to the server:** device name, operating system, engine version, render capabilities and the local port.
226
+ Projects and videos are not.
191
227
 
192
- **Apa yang dikirim ke server**
193
- - Nama perangkat, sistem operasi, versi mesin, kemampuan render, dan port lokal.
194
- - Project dan hasil video tidak dikirim ke server.
228
+ Found a vulnerability? See [SECURITY.md](SECURITY.md).
195
229
 
196
- ## Folder data
230
+ ## Data folder
197
231
 
198
232
  ```
199
233
  ~/.hypeframe/
200
- ├── akun.json token perangkat (hanya dibaca pemilik)
201
- ├── mesin.kunci penanda satu mesin per folder
234
+ ├── bin/hypeframe the standalone program (curl installer)
235
+ ├── akun.json device token (owner-readable only)
236
+ ├── settings.json name, GPU, language, addresses
237
+ ├── mesin.kunci one engine per folder
238
+ ├── log/hypeframe.log plain-text log, tokens masked (rotated at 1 MB)
202
239
  ├── cache/
203
- │ ├── chrome/ Chrome for Testing (bila diunduh)
204
- │ └── halaman/<versi>/ halaman render dari HypeFrame Web (2 versi terakhir)
205
- └── kerja/render/ tugas render dan hasilnya (dihapus otomatis)
240
+ │ ├── chrome/ Chrome for Testing (when downloaded)
241
+ │ ├── ffmpeg/ ffmpeg for the standalone program (checked download)
242
+ │ └── halaman/<ver>/ render page from HypeFrame Web (last 2 versions)
243
+ └── kerja/render/ render jobs and results (removed automatically)
206
244
  ```
207
245
 
208
- Untuk menghapus semuanya:
246
+ To remove everything: press **Disconnect** on the web, run `hypeframe autostart off`, delete `~/.hypeframe` and remove
247
+ the `# hypeframe` line the installer added to your shell profile (Windows: the `.hypeframe\bin` entry in the user
248
+ `PATH`). An npm install goes with `npm rm -g hypeframe`.
209
249
 
210
- 1. tekan **Putuskan** di web;
211
- 2. hapus folder `~/.hypeframe`.
250
+ ## Troubleshooting
212
251
 
213
- ## Memecahkan masalah
252
+ Start with `hypeframe doctor`: it checks everything the engine needs and says what blocks rendering.
214
253
 
215
- | Gejala | Penyebab dan cara mengatasi |
254
+ | Symptom | Cause and fix |
216
255
  |---|---|
217
- | `npx` tidak dikenal | Node.js belum terpasang atau terlalu lama. Pasang Node.js 20.3+. |
218
- | "Gateway tidak terjangkau. Mencoba lagi..." | Internet atau server sedang bermasalah. Mesin mencoba lagi sendiri. |
219
- | "Kode sudah kedaluwarsa" | Kode berlaku 10 menit. Jalankan lagi `npx hypeframe`. |
220
- | "Akun ini sudah punya 5 perangkat" | Putuskan satu perangkat di **Perangkat saya**. |
221
- | Penanda di web "terputus" | Jendela mesin tertutup, komputer tidur, atau internet putus. Jalankan lagi; mesin juga menyambung ulang sendiri. |
222
- | "Render di mesin ini belum bisa: …" | Chrome atau halaman render belum siap. Mesin mencoba lagi tiap 10 menit. Periksa internet, atau atur `HYPEFRAME_CHROME`. |
223
- | Web: "mesin tidak bisa dijangkau dari browser ini" | Web dibuka di perangkat lain, atau izin "akses jaringan lokal" ditolak. Buka web di perangkat yang sama dengan mesin dan izinkan aksesnya. Video tetap dibuat di browser. |
224
- | "Klip transparan belum bisa dibuat di mesin ini" | Chrome perangkat ini tidak punya VP9 alpha. Klip transparan dibuat di server atau browser. |
225
- | "Versi mesin ini terlalu lama" | Jalankan `npx hypeframe@latest`. |
226
- | "Mesin ini sudah tersambung dari jendela atau komputer lain" | Token yang sama dipakai di tempat lain. Tutup salah satunya. |
227
- | Render 1080p gagal "Encoding error." | Memori perangkat tidak cukup. Tutup aplikasi lain, atau pilih kualitas **Hemat**. |
228
-
229
- ## Untuk pengembang
256
+ | `hypeframe` not found right after installing | Open a new terminal so it picks up the new `PATH` |
257
+ | `npx` not found | Node.js is missing or too old. Use the curl/PowerShell installer instead, or install Node.js 20.3+ |
258
+ | "Gateway unreachable. Retrying..." | Internet or server trouble. The engine keeps retrying |
259
+ | "The code expired" | Codes last 10 minutes. Run `hypeframe` again |
260
+ | "This account already has 5 devices" | Disconnect one under **My devices** |
261
+ | The web shows "disconnected" | The engine window closed, the computer slept or the internet dropped. Run it again; it also reconnects by itself |
262
+ | "Rendering is not available yet: …" | Chrome or the render page is not ready. The engine retries every 10 minutes. Check the internet or set `HYPEFRAME_CHROME` |
263
+ | Web: "the engine cannot be reached from this browser" | The web is open on another device, or local network access was denied. Open the web on the same machine and allow access. The video is made in the browser meanwhile |
264
+ | "Transparent clips are made elsewhere" | This Chrome has no VP9 alpha. Transparent clips are made on the server or in the browser |
265
+ | "This engine is too old" | `hypeframe update` or `npx hypeframe@latest` |
266
+ | "already connected from another window or computer" | The same token is in use elsewhere. Close one of them |
267
+ | A 1080p render fails with "Encoding error." | Not enough memory. Close other apps, or choose the **Saver** quality |
268
+
269
+ Still stuck? Run `hypeframe report` and send the file to the HypeFrame team.
270
+
271
+ ## Development
272
+
273
+ This repository is a small monorepo in the style of [OpenCode](https://opencode.ai): TypeScript, Bun for
274
+ tooling, an npm package that runs on plain Node.js, and standalone binaries (Bun runtime with the code built in) for
275
+ the curl installer.
230
276
 
231
277
  ```
232
- bin/hypeframe.js CLI: pairing, sambungan, layanan render, persiapan Chrome
233
- src/konfig.js folder data, akun lokal, kunci satu-instans
234
- src/pasang.js pairing kode (seperti `gh auth login`)
235
- src/sambungan.js WebSocket ke gateway, sambung ulang, kode tutup 4011/4012/4002
236
- src/penangan.js daftar jenis pesan yang diizinkan
237
- src/render/layanan.js API render lokal (sama dengan render server HypeFrame)
238
- src/render/kerja.js Chrome tanpa layar + ffmpeg untuk satu tugas
239
- src/render/chrome.js mencari/mengunduh Chrome, memeriksa encoder (H.264, VP9 alpha)
240
- src/render/halaman.js halaman render dari HypeFrame Web, cache per versi
241
- uji/ uji node:test
278
+ packages/
279
+ ├── hypeframe/ the npm package
280
+ │ ├── bin/hypeframe.js entry: checks the Node version, loads dist/index.js
281
+ │ ├── src/
282
+ │ │ ├── index.ts arguments → command or menu
283
+ │ │ ├── cli/ menu.ts, args.ts, commands/*.ts
284
+ │ │ ├── engine/ pairing.ts, connection.ts, handler.ts
285
+ │ │ ├── render/ service.ts, job.ts, chrome.ts, page.ts, ffmpeg.ts
286
+ │ │ ├── config/ paths, account, lock, settings, version
287
+ │ │ ├── ui/ theme (colors), log, banner, locale (id/en)
288
+ │ │ └── util/ open, format, runtime
289
+ │ └── test/ node:test suites (run through tsx)
290
+ └── protocol/ message shapes, close codes, ticket format, error texts shared with the web
291
+ script/build.ts npm bundle, or --compile <targets> for standalone binaries + archives
292
+ script/release.ts typecheck, test, build, npm publish (dry run unless --publish)
293
+ install, install.ps1 the installers served at hype-frame.com/install and /install.ps1
294
+ .github/workflows/ ci.yml (every push), release.yml (tag v*: binaries, GitHub Release, installer test)
242
295
  ```
243
296
 
244
- ### Protokol (versi 1)
297
+ ```bash
298
+ npm install # or: bun install
299
+ npm run dev -- status # run from source (tsx)
300
+ npm run typecheck
301
+ npm test # unit tests + the render service with a fake renderer
302
+ HF_TEST_CHROME=1 npm test # plus a real render in Chrome (needs HF_DIST_RENDER=<dist-render folder>)
303
+ npm run build # Bun bundles src into dist (bun comes as a dev dependency)
304
+ npx bun run script/build.ts --compile host # standalone binary for this machine in dist/standalone/
305
+ ```
245
306
 
246
- **Pesan antara mesin dan gateway** (`wss://<gateway>/mesin/ws`)
307
+ Binary targets: `linux-x64`, `linux-x64-baseline` (CPUs without AVX2), `linux-arm64`, `linux-x64-musl`,
308
+ `linux-arm64-musl`, `darwin-x64`, `darwin-arm64`, `windows-x64`, `windows-x64-baseline`.
247
309
 
248
- | Arah | Pesan |
249
- |---|---|
250
- | mesin → gateway | `{t:'halo', token, protokol:1, versi, os, nama, kemampuan:{render, chrome, transparan}, portLokal}` |
251
- | gateway → mesin | `{t:'ok', id}` atau tutup `4001` (halo tidak valid), `4011` (token dicabut), `4012` (protokol lain), `4002` (digantikan) |
252
- | gateway → mesin | `{t:'perintah', dari, id, jenis, ...}` |
253
- | mesin → gateway | `{t:'balas', ke: dari, id, ok, ...}` (hanya ke tab yang meminta) / `{t:'kabar', jenis, ...}` (ke semua tab akun) |
310
+ See [CONTRIBUTING.md](CONTRIBUTING.md) and [AGENTS.md](AGENTS.md).
254
311
 
255
- - Pesan paling besar 256 KB.
256
- - Mesin mengirim paling banyak 300 pesan per menit.
312
+ ### Protocol (version 1)
257
313
 
258
- **API layanan render lokal** (`http://127.0.0.1:<port>`, `Authorization: Bearer v1.<isi>.<HMAC>`)
314
+ Engine ↔ gateway over `wss://<gateway>/mesin/ws`. Wire names are Indonesian because that is what the deployed gateway
315
+ and web speak; [`packages/protocol`](packages/protocol/src/index.ts) documents them in English.
259
316
 
260
- | Jalur | Fungsi |
317
+ | Direction | Message |
261
318
  |---|---|
262
- | `POST /tugas` | buat tugas |
263
- | `PUT /tugas/:job/potongan/:n` | potongan paket ZIP, header `x-sha256` |
264
- | `POST /tugas/:job/mulai` | `{jumlah, ukuran, sha256}` |
265
- | `GET /tugas/:job` | status |
266
- | `GET /tugas/:job/hasil` | hasil MP4/WebM, mendukung `Range` |
267
- | `DELETE /tugas/:job` | batalkan |
319
+ | engine → gateway | `{t:'halo', token, protokol:1, versi, os, nama, kemampuan:{render, chrome, transparan}, portLokal}` |
320
+ | gateway → engine | `{t:'ok', id}`, or close `4001` (bad hello), `4011` (token revoked), `4012` (other protocol), `4002` (replaced) |
321
+ | gateway → engine | `{t:'perintah', dari, id, jenis, ...}` |
322
+ | engine → gateway | `{t:'balas', ke, id, ok, ...}` to the asking tab, or `{t:'kabar', jenis, ...}` to every tab of the account |
268
323
 
269
- Paket ZIP berisi `klip.json` (`{klip}`) atau `proyek.json` (`{proyek, setelan}`), ditambah `aset/<id>`.
324
+ Messages are at most 256 KB; an engine sends at most 300 messages a minute.
270
325
 
271
- ### Menjalankan uji
326
+ **Local render API** (`http://127.0.0.1:<port>`, `Authorization: Bearer v1.<body>.<HMAC>`)
272
327
 
273
- ```bash
274
- npm install
275
- npm test # unit + layanan render dengan perender tiruan
276
- HF_UJI_CHROME=1 npm test # ditambah render sungguhan dengan Chrome
277
- # butuh halaman render: HF_DIST_RENDER=<folder dist-render>
278
- ```
328
+ | Route | Purpose |
329
+ |---|---|
330
+ | `POST /tugas` | create a job |
331
+ | `PUT /tugas/:job/potongan/:n` | a ZIP package part, header `x-sha256` |
332
+ | `POST /tugas/:job/mulai` | `{jumlah, ukuran, sha256}` |
333
+ | `GET /tugas/:job` | status |
334
+ | `GET /tugas/:job/hasil` | the MP4/WebM, supports `Range` |
335
+ | `DELETE /tugas/:job` | cancel |
279
336
 
280
- ## Lisensi
337
+ A package holds `klip.json` (`{klip}`) or `proyek.json` (`{proyek, setelan}`), plus `aset/<id>`.
281
338
 
282
- [MIT](LICENSE) untuk kode di repo ini.
339
+ ## License
283
340
 
284
- Paket lain yang dipasang npm membawa lisensinya sendiri:
341
+ [MIT](LICENSE) for the code in this repository. Installed dependencies carry their own licenses:
285
342
 
286
- | Paket | Lisensi |
343
+ | Package | License |
287
344
  |---|---|
288
- | `ws` | MIT |
289
- | `yauzl` | MIT |
290
- | `puppeteer-core` | Apache-2.0 |
291
- | `@puppeteer/browsers` | Apache-2.0 |
292
- | `ffmpeg-static` | GPL-3.0-or-later (paket dan biner ffmpeg yang diunduhnya) |
293
-
294
- Chrome for Testing diunduh dari Google dengan ketentuan Google.
345
+ | `ws`, `yauzl`, `picocolors`, `@clack/prompts` | MIT |
346
+ | `puppeteer-core`, `@puppeteer/browsers` | Apache-2.0 |
347
+ | `ffmpeg-static` | GPL-3.0-or-later (the package and the ffmpeg binary it downloads; the standalone program downloads the same ffmpeg build) |
295
348
 
296
- Halaman render HypeFrame (termasuk Remotion dan GSAP di dalamnya) **tidak** ada di paket ini. Halaman itu diambil dari
297
- HypeFrame Web saat dipakai dan mengikuti lisensinya masing-masing.
349
+ The standalone program also contains the [Bun](https://bun.sh) runtime (MIT; it includes JavaScriptCore, LGPL-2.1).
350
+ Chrome for Testing is downloaded from Google under Google's terms. The HypeFrame render page (including Remotion and
351
+ GSAP) is **not** in this package; it is fetched from HypeFrame Web when used and follows its own licenses.