autopreso 0.1.1
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/LICENSE +21 -0
- package/README.md +147 -0
- package/package.json +59 -0
- package/public/app.js +1232 -0
- package/public/index.html +28 -0
- package/public/starter-elements.js +37 -0
- package/public/style.css +535 -0
- package/public/transcript-panel.js +10 -0
- package/src/agent-provider.js +106 -0
- package/src/cli-options.js +29 -0
- package/src/cli.js +96 -0
- package/src/codex-auth.js +135 -0
- package/src/moonshine-transcription.js +146 -0
- package/src/openai-transcription.js +186 -0
- package/src/server.js +996 -0
- package/src/settings-store.js +137 -0
- package/src/simulator-agent-provider.js +24 -0
- package/src/simulator-options.js +76 -0
- package/src/transcript-chunker.js +22 -0
- package/src/transcript-turn-queue.js +78 -0
- package/src/whiteboard-elements.js +74 -0
- package/src/whiteboard-session.js +235 -0
- package/src/whiteboard-tools.js +48 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AutoPreso contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
<h1 align="center">autopreso</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://github.com/kunchenguid/autopreso/actions/workflows/ci.yml"><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/kunchenguid/autopreso/ci.yml?style=flat-square&label=ci" /></a>
|
|
5
|
+
<a href="https://github.com/kunchenguid/autopreso/actions/workflows/release-please.yml"><img alt="Release" src="https://img.shields.io/github/actions/workflow/status/kunchenguid/autopreso/release-please.yml?style=flat-square&label=release" /></a>
|
|
6
|
+
<a href="https://www.npmjs.com/package/autopreso"><img alt="npm" src="https://img.shields.io/npm/v/autopreso?style=flat-square" /></a>
|
|
7
|
+
<a href="https://img.shields.io/badge/platform-macOS-blue?style=flat-square"><img alt="Platform" src="https://img.shields.io/badge/platform-macOS-blue?style=flat-square" /></a>
|
|
8
|
+
<a href="https://x.com/kunchenguid"><img alt="X" src="https://img.shields.io/badge/X-@kunchenguid-black?style=flat-square" /></a>
|
|
9
|
+
<a href="https://discord.gg/Wsy2NpnZDu"><img alt="Discord" src="https://img.shields.io/discord/1439901831038763092?style=flat-square&label=discord" /></a>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<h3 align="center">Let the whiteboard whiteboard itself.</h3>
|
|
13
|
+
|
|
14
|
+
> [!WARNING]
|
|
15
|
+
> autopreso is in **alpha** and under active development. Expect rough edges, breaking changes, and the occasional weird drawing. Bug reports welcome.
|
|
16
|
+
|
|
17
|
+
You wanted to give the talk, not build the deck.
|
|
18
|
+
|
|
19
|
+
autopreso runs a local web app with a live Excalidraw canvas and a listening agent.
|
|
20
|
+
You speak; transcripts stream to a model; the model draws, labels, and rearranges the whiteboard in real time.
|
|
21
|
+
Stage a few seed elements, hit start, and present.
|
|
22
|
+
|
|
23
|
+
- **Hands free** - your speech drives an agent that edits an Excalidraw scene as you talk, no clicking required.
|
|
24
|
+
- **Bring your own model** - use your OpenAI API key or Codex subscription. Auto Preso itself is completely free and open source.
|
|
25
|
+
- **Can run locally** - use Moonshine for transcription and Ollama for the agent and you get a fully local setup.
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
$ npx autopreso # boots the server, opens the browser
|
|
31
|
+
autopreso listening at http://127.0.0.1:3210
|
|
32
|
+
whiteboard agent: openai gpt-5.5
|
|
33
|
+
settings file: /Users/you/.config/autopreso/settings.json
|
|
34
|
+
|
|
35
|
+
# In the browser:
|
|
36
|
+
# 1. Drop reference materials onto the staging canvas (title, agenda, etc).
|
|
37
|
+
# 2. Pick your microphone, pick a transcription model and an agent model.
|
|
38
|
+
# 3. Click "Start preso" and start talking.
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Install
|
|
42
|
+
|
|
43
|
+
**npm (recommended)**
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
npm install -g autopreso
|
|
47
|
+
autopreso
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**npx (no install)**
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
npx autopreso
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**From source**
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
git clone https://github.com/kunchenguid/autopreso.git
|
|
60
|
+
cd autopreso
|
|
61
|
+
npm install
|
|
62
|
+
npm start
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## How It Works
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
┌──────────┐ audio ┌──────────────┐ text ┌──────────────┐
|
|
69
|
+
│ mic │──────────► │ STT │────────► │ whiteboard │
|
|
70
|
+
│ (browser)│ 24kHz │ Moonshine / │ chunks │ agent │
|
|
71
|
+
└──────────┘ │ OpenAI WS │ │ (OpenAI / │
|
|
72
|
+
└──────────────┘ │ Codex / │
|
|
73
|
+
│ Ollama) │
|
|
74
|
+
└──────┬───────┘
|
|
75
|
+
│ tool calls
|
|
76
|
+
▼
|
|
77
|
+
┌────────────────┐
|
|
78
|
+
│ Excalidraw │
|
|
79
|
+
│ scene (live) │
|
|
80
|
+
└────────────────┘
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
- **Two modes** - "staging" lets you sketch seed content client-side; "live" hands the canvas over to the agent and starts streaming transcripts.
|
|
84
|
+
- **Local server, local network only** - the Express + WebSocket server binds to 127.0.0.1; nothing is exposed beyond your machine.
|
|
85
|
+
- **Persistent settings** - models, API keys, and STT engine choices live in `~/.config/autopreso/settings.json` and survive restarts.
|
|
86
|
+
- **Warmup loop** - after you hit start the agent primes itself against your staging content so the first sentence you say doesn't get a cold model.
|
|
87
|
+
|
|
88
|
+
## CLI Reference
|
|
89
|
+
|
|
90
|
+
| Command | Description |
|
|
91
|
+
| -------------- | -------------------------------------------- |
|
|
92
|
+
| `autopreso` | Start the local server and open the browser. |
|
|
93
|
+
| `autopreso -h` | Show help. |
|
|
94
|
+
|
|
95
|
+
### Flags
|
|
96
|
+
|
|
97
|
+
| Flag | Description |
|
|
98
|
+
| ------------ | --------------------------------------------- |
|
|
99
|
+
| `--no-open` | Start the server without opening the browser. |
|
|
100
|
+
| `-h, --help` | Show help. |
|
|
101
|
+
|
|
102
|
+
## Configuration
|
|
103
|
+
|
|
104
|
+
Settings persist at `~/.config/autopreso/settings.json` and are managed from the in-app status panel.
|
|
105
|
+
|
|
106
|
+
### Defaults on first run
|
|
107
|
+
|
|
108
|
+
When no settings file exists, autopreso picks providers based on what it finds in your environment:
|
|
109
|
+
|
|
110
|
+
| You have... | Agent provider | Transcription |
|
|
111
|
+
| ------------------------------------------ | ------------------------------ | -------------------------- |
|
|
112
|
+
| Nothing | OpenAI `gpt-5.5` (needs a key) | Moonshine `medium` (macOS) |
|
|
113
|
+
| `OPENAI_API_KEY` in env | OpenAI `gpt-5.5` | OpenAI Realtime |
|
|
114
|
+
| Codex CLI signed in (`~/.codex/auth.json`) | Codex `gpt-5.5` | Moonshine `medium` |
|
|
115
|
+
| Codex CLI signed in + `OPENAI_API_KEY` | Codex `gpt-5.5` | OpenAI Realtime |
|
|
116
|
+
| `OLLAMA_MODEL` set | Ollama (your model) | Moonshine `medium` |
|
|
117
|
+
|
|
118
|
+
Auto-detection precedence: **Codex CLI auth wins over `OLLAMA_MODEL` wins over `OPENAI_API_KEY`** for the agent. Transcription flips to OpenAI Realtime any time an OpenAI key is present, otherwise Moonshine. After first run, this auto-detection no longer applies - change providers from the in-app status panel.
|
|
119
|
+
|
|
120
|
+
### Environment variables
|
|
121
|
+
|
|
122
|
+
These only seed `settings.json` on first run. Once the file exists, they're ignored - edit the file or use the in-app panel.
|
|
123
|
+
|
|
124
|
+
| Variable | Purpose |
|
|
125
|
+
| ---------------- | ----------------------------------------------------- |
|
|
126
|
+
| `PORT` | Port to listen on. Default: `3210`. |
|
|
127
|
+
| `OPENAI_API_KEY` | Seeds the OpenAI key for both agent and Realtime STT. |
|
|
128
|
+
| `OPENAI_MODEL` | Seeds the OpenAI agent model. |
|
|
129
|
+
| `CODEX_MODEL` | Seeds the Codex model. |
|
|
130
|
+
| `OLLAMA_MODEL` | Seeds the Ollama model. |
|
|
131
|
+
|
|
132
|
+
Local Moonshine transcription ships as an optional native sidecar for `darwin-arm64` and `darwin-x64`. On other platforms, choose OpenAI Realtime in the STT panel.
|
|
133
|
+
|
|
134
|
+
## Credits
|
|
135
|
+
|
|
136
|
+
- [Excalidraw](https://github.com/excalidraw/excalidraw) - the whiteboard canvas, scene model, and rendering.
|
|
137
|
+
- [Moonshine](https://github.com/usefulsensors/moonshine) by Useful Sensors - the local speech-to-text model that makes the offline path possible.
|
|
138
|
+
- [Vercel AI SDK](https://github.com/vercel/ai) - tool-calling agent loop and provider abstraction.
|
|
139
|
+
|
|
140
|
+
## Development
|
|
141
|
+
|
|
142
|
+
```sh
|
|
143
|
+
npm install # install deps
|
|
144
|
+
npm run dev # run the CLI from source
|
|
145
|
+
npm test # node --test
|
|
146
|
+
npm run build:moonshine-sidecars # build the Python sidecar binaries
|
|
147
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "autopreso",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Realtime speech to presentation. Let the whiteboard whiteboard itself.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Kun Chen <kun@kunchenguid.com>",
|
|
7
|
+
"homepage": "https://github.com/kunchenguid/autopreso#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/kunchenguid/autopreso.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/kunchenguid/autopreso/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"excalidraw",
|
|
17
|
+
"whiteboard",
|
|
18
|
+
"presentation",
|
|
19
|
+
"voice",
|
|
20
|
+
"speech-to-text",
|
|
21
|
+
"ai-agent",
|
|
22
|
+
"moonshine",
|
|
23
|
+
"openai",
|
|
24
|
+
"transcription",
|
|
25
|
+
"cli"
|
|
26
|
+
],
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=24"
|
|
29
|
+
},
|
|
30
|
+
"type": "module",
|
|
31
|
+
"bin": {
|
|
32
|
+
"autopreso": "src/cli.js"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"LICENSE",
|
|
36
|
+
"public/",
|
|
37
|
+
"src/"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build:moonshine-sidecars": "node ./scripts/build-moonshine-sidecars.js",
|
|
41
|
+
"dev": "node ./src/cli.js",
|
|
42
|
+
"prepare:release-packages": "node ./scripts/prepare-release-packages.js",
|
|
43
|
+
"test": "node --test",
|
|
44
|
+
"start": "node ./src/cli.js"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@ai-sdk/openai": "^3.0.63",
|
|
48
|
+
"ai": "^6.0.176",
|
|
49
|
+
"express": "^5.2.1",
|
|
50
|
+
"open": "^11.0.0",
|
|
51
|
+
"ws": "^8.20.0",
|
|
52
|
+
"zod": "^4.4.3"
|
|
53
|
+
},
|
|
54
|
+
"optionalDependencies": {
|
|
55
|
+
"@autopreso/moonshine-darwin-arm64": "0.1.1",
|
|
56
|
+
"@autopreso/moonshine-darwin-x64": "0.1.1"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {}
|
|
59
|
+
}
|