@lasso-ai/cli 1.0.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.
Files changed (47) hide show
  1. package/ARCHITECTURE.md +342 -0
  2. package/CHANGELOG.md +102 -0
  3. package/CODE_OF_CONDUCT.md +129 -0
  4. package/CONTRIBUTING.md +122 -0
  5. package/LICENSE +7 -0
  6. package/README.md +548 -0
  7. package/SECURITY.md +65 -0
  8. package/SUPPORT.md +31 -0
  9. package/dist/cli/agent.d.ts +61 -0
  10. package/dist/cli/agent.js +418 -0
  11. package/dist/cli/auth.d.ts +38 -0
  12. package/dist/cli/auth.js +162 -0
  13. package/dist/cli/bridge.d.ts +160 -0
  14. package/dist/cli/bridge.js +450 -0
  15. package/dist/cli/host/certificates.d.ts +12 -0
  16. package/dist/cli/host/certificates.js +52 -0
  17. package/dist/cli/host/client.d.ts +49 -0
  18. package/dist/cli/host/client.js +141 -0
  19. package/dist/cli/host/daemon.d.ts +50 -0
  20. package/dist/cli/host/daemon.js +368 -0
  21. package/dist/cli/host/dns.d.ts +80 -0
  22. package/dist/cli/host/dns.js +255 -0
  23. package/dist/cli/host/install.d.ts +32 -0
  24. package/dist/cli/host/install.js +177 -0
  25. package/dist/cli/host/next-host-entry.d.ts +1 -0
  26. package/dist/cli/host/next-host-entry.js +82 -0
  27. package/dist/cli/host/paths.d.ts +15 -0
  28. package/dist/cli/host/paths.js +55 -0
  29. package/dist/cli/host/registry.d.ts +31 -0
  30. package/dist/cli/host/registry.js +103 -0
  31. package/dist/cli/host/runtime.d.ts +23 -0
  32. package/dist/cli/host/runtime.js +134 -0
  33. package/dist/cli/host/vite-host-entry.d.ts +1 -0
  34. package/dist/cli/host/vite-host-entry.js +59 -0
  35. package/dist/cli/index.d.ts +2 -0
  36. package/dist/cli/index.js +322 -0
  37. package/dist/cli/project.d.ts +56 -0
  38. package/dist/cli/project.js +298 -0
  39. package/dist/cli/server/next.d.ts +6 -0
  40. package/dist/cli/server/next.js +76 -0
  41. package/dist/cli/server/vite.d.ts +1 -0
  42. package/dist/cli/server/vite.js +51 -0
  43. package/dist/cli/utils/framework.d.ts +2 -0
  44. package/dist/cli/utils/framework.js +26 -0
  45. package/dist/overlay.js +20365 -0
  46. package/docs/PUBLISHING.md +63 -0
  47. package/package.json +106 -0
@@ -0,0 +1,122 @@
1
+ # Contributing to Lasso
2
+
3
+ Thanks for wanting to help build Lasso. This project is young, opinionated, and heavily
4
+ shaped by its [architecture decisions](ARCHITECTURE.md) — please read that file before
5
+ making a change, because most "small" fixes touch one of its core invariants.
6
+
7
+ ## Project layout
8
+
9
+ ```
10
+ src/
11
+ cli/
12
+ index.ts # CLI entry (`lasso` / `lasso dev`), framework detection dispatch
13
+ project.ts # project identity: `lasso init` (register project, write `lasso.config.json`), `lasso dev` session resolution
14
+ auth.ts # `lasso auth`: browser-OAuth login, credential store (~/.lasso/credentials.json), status, logout
15
+ bridge.ts # WebSocket bridge the browser overlay connects to
16
+ host/ # Lasso Host: local *.lasso domains + app hosting
17
+ daemon.ts # background host daemon (proxy + /_host API, single-instance, crash guard)
18
+ registry.ts # domain → {projectId, directory} registry (atomic, 0600)
19
+ runtime.ts # auto-start dev servers on traffic, readiness polling
20
+ dns.ts # UDP *.lasso → 127.0.0.1 responder + per-OS resolver config
21
+ client.ts # CLI-side host helpers (health, register, stop/restart)
22
+ install.ts # daemon install/uninstall, LaunchAgent, spawn/status
23
+ server/
24
+ vite.ts # Vite dev server with the source-mapping plugin injected in-memory
25
+ next.ts # Next.js dev server integration (uses React _debugSource)
26
+ utils/
27
+ framework.ts # framework/bundler detection
28
+ overlay/
29
+ index.ts # browser-side overlay: toolbar, selection, prompt, diff/accept UI,
30
+ # and the realtime client (presence/spotlight/lock/comments/voice)
31
+ ```
32
+
33
+ ## Development setup
34
+
35
+ ```bash
36
+ git clone https://github.com/codewithdripzy/lasso.git
37
+ cd lasso
38
+ pnpm install
39
+ ```
40
+
41
+ Fork the repo on GitHub and push to your fork if you are opening a pull request.
42
+
43
+ We use **pnpm**. There is no test suite yet (see [Tests](#tests)).
44
+
45
+ ### Scripts
46
+
47
+ | Command | What it does |
48
+ | ---------------------- | ------------------------------------------------------ |
49
+ | `pnpm dev` | Run the CLI in watch mode (`tsx src/cli/index.ts`) |
50
+ | `pnpm build` | Build both artifacts (CLI + overlay) |
51
+ | `pnpm build:cli` | `tsc -p config/tsconfig.cli.json` → `dist/cli/index.js` |
52
+ | `pnpm build:overlay` | `esbuild src/overlay/index.ts` → `dist/overlay.js` |
53
+ | `pnpm typecheck` | Typecheck CLI and overlay |
54
+ | `pnpm start` | Run the built CLI from `dist/` |
55
+ | `pnpm format` | `prettier --write .` |
56
+ | `pnpm format:check` | Verify formatting |
57
+ | `pnpm test` | No tests are registered yet — leave it passing |
58
+
59
+ Two artifacts ship: `dist/cli/index.js` (the Node CLI, compiled with `tsc`) and
60
+ `dist/overlay.js` (the browser bundle, compiled with `esbuild` into a single file). Keep
61
+ them buildable after your change: `pnpm typecheck && pnpm build`.
62
+
63
+ ## Coding standards
64
+
65
+ - **Formatting**: Prettier. The repo's config is `.prettierrc` (note the deliberately long
66
+ `printWidth: 300` — don't "fix" it). Run `pnpm format` before pushing.
67
+ - **TypeScript strict**. The CLI and overlay are typechecked separately
68
+ (`config/tsconfig.cli.json`, `config/tsconfig.overlay.json`).
69
+ - **No comments unless they earn their place.** Prefer self-documenting code
70
+ (`kebab-case` CSS class names, explicit variable names). Explain *why*, never *what*.
71
+
72
+ ### Architecture invariants (non-negotiable)
73
+
74
+ From [ARCHITECTURE.md](ARCHITECTURE.md):
75
+
76
+ 1. **Lasso edits source code, never the live DOM.** The overlay is capture-only. UI changes
77
+ a user sees post-edit must come from the framework's own HMR, not from the overlay.
78
+ 2. **Agent output is old-string/new-string pairs**, never full-file rewrites.
79
+ 3. **Nothing is written to disk until the user accepts.** Diffs live in memory; undo
80
+ restores a snapshot of the pre-edit content.
81
+ 4. **Config files are never modified.** Plugins are injected in memory via the CLI.
82
+ 5. **Telemetry-free by default.** User source code leaves the machine only when sent to the
83
+ agent the user configured.
84
+ 6. **Realtime identity = element identity.** Cross-user locks/comments/spotlight key off a
85
+ deterministic `elementKey` (source mapping attribute → `id` → an indexed CSS path),
86
+ never the per-click random selection id.
87
+
88
+ ## Making changes
89
+
90
+ 1. Fork the repository and create a branch: `git checkout -b feat/my-change`.
91
+ 2. Make the change with tests or a manual repro described in the PR.
92
+ 3. Run `pnpm format && pnpm typecheck && pnpm build`.
93
+ 4. Push and open a pull request. Reference any issue it closes (e.g. `Closes #123`).
94
+
95
+ ### Commit messages
96
+
97
+ Short, imperative, focused on a single concern:
98
+
99
+ ```
100
+ feat: add Webpack source resolution
101
+ fix: clamp lasso rect to viewport bounds
102
+ refactor: extract agent adapter interface
103
+ docs: explain BYOK model selection
104
+ ```
105
+
106
+ ## Good first contributions
107
+
108
+ - Wire shared states/tests for the overlay bundle (`pnpm test` currently no-ops).
109
+ - Add a `tests/` harness around the `old-string/new-string` diff contract (see §4.3).
110
+ - Document another agent adapter (any CLI coding tool) end-to-end.
111
+ - Open issues for the open questions listed at the bottom of `ARCHITECTURE.md`.
112
+
113
+ ## Reporting bugs
114
+
115
+ Open an issue with: expected vs. actual behavior, the framework + version, Node version,
116
+ and the smallest repro you can manage (ideally a paste of the failing diff, not a screenshot).
117
+ Security issues go to [SECURITY.md](SECURITY.md), not the issue tracker.
118
+
119
+ ## Code of conduct
120
+
121
+ All participants agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md). In short:
122
+ be respectful, assume good intent, and keep the conversation technical.
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2026 Lasso contributors
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,548 @@
1
+ <div align="center">
2
+
3
+ <img src="https://lasso.byorello.space/_next/image?url=%2Ficons%2Flogo.png&w=256&q=75" alt="Lasso" width="96" />
4
+
5
+ # Lasso
6
+
7
+ ### Point at it. Describe it. Ship it.
8
+
9
+ **AI-powered visual code editing for your real source code.**
10
+
11
+ Select any part of your running app, describe what you want changed, and Lasso turns that selection into a real code change — with a diff you approve before anything is written.
12
+
13
+ <br />
14
+
15
+ [![npm version](https://img.shields.io/npm/v/lasso?style=flat-square&color=6366f1)](https://www.npmjs.com/package/lasso)
16
+ [![npm downloads](https://img.shields.io/npm/dm/lasso?style=flat-square&color=6366f1)](https://www.npmjs.com/package/lasso)
17
+ [![GitHub stars](https://img.shields.io/github/stars/codewithdripzy/lasso?style=flat-square&color=6366f1)](https://github.com/codewithdripzy/lasso)
18
+ [![GitHub contributors](https://img.shields.io/github/contributors/codewithdripzy/lasso?style=flat-square&color=6366f1)](https://github.com/codewithdripzy/lasso/graphs/contributors)
19
+ [![license](https://img.shields.io/github/license/codewithdripzy/lasso?style=flat-square&color=6366f1)](LICENSE)
20
+ [![Node.js](https://img.shields.io/node/v/lasso?style=flat-square&color=6366f1)](https://nodejs.org/)
21
+
22
+ <br />
23
+
24
+ **npm downloads** · **GitHub stars** · **contributors** · **open source**
25
+
26
+ <br />
27
+
28
+ [Website](https://lasso.byorello.space) · [Documentation](#documentation) · [Quickstart](#quickstart) · [GitHub](https://github.com/codewithdripzy/lasso)
29
+
30
+ </div>
31
+
32
+ ---
33
+
34
+ ## What is Lasso?
35
+
36
+ Lasso is a **local-first visual coding tool**.
37
+
38
+ Instead of describing your entire problem in a chat window, point directly at the thing you want to change.
39
+
40
+ ```text
41
+ Select a component
42
+ ↓
43
+ Describe the change
44
+ ↓
45
+ AI understands the source
46
+ ↓
47
+ Preview the diff
48
+ ↓
49
+ Accept
50
+ ↓
51
+ Your source code changes
52
+ ```
53
+
54
+ **Lasso edits your actual source files — not the live DOM.**
55
+
56
+ That means your changes survive refreshes, work with your framework's own rendering system, and remain ordinary code that you can review, commit, or undo.
57
+
58
+ ---
59
+
60
+ ## Why Lasso?
61
+
62
+ Traditional visual editing tools manipulate the rendered page.
63
+
64
+ Lasso works differently.
65
+
66
+ | | Lasso |
67
+ |---|---|
68
+ | 🎯 **Point at the UI** | Select exactly what you want to change |
69
+ | 🧠 **AI understands context** | The selected component is resolved back to your source |
70
+ | 📝 **Real code changes** | Lasso modifies your actual source files |
71
+ | 👀 **Preview first** | Every change comes back as a diff |
72
+ | 🔒 **You stay in control** | Nothing is written until you explicitly accept |
73
+ | ↩️ **Undo changes** | Revert an accepted change from a local snapshot |
74
+ | 💻 **Local-first** | The bridge, source resolution, and editing pipeline run locally |
75
+ | 🔌 **Bring your own agent** | Use Lasso's built-in agent, Claude Code, or your own adapter |
76
+
77
+ ---
78
+
79
+ ## Features
80
+
81
+ ### Visual selection
82
+
83
+ Turn on Lasso Mode and interact with your application normally.
84
+
85
+ - Click any component
86
+ - Lasso-drag across multiple elements
87
+ - Hover to see what will be selected
88
+ - Select empty space to insert new UI
89
+
90
+ ### Source-aware editing
91
+
92
+ Lasso doesn't stop at the DOM.
93
+
94
+ Selections are resolved back to the component and source code that produced them.
95
+
96
+ **Vite**
97
+
98
+ Uses an injected build plugin to resolve source files and JSX/component locations.
99
+
100
+ **Next.js**
101
+
102
+ Uses React's source metadata as a fallback without requiring changes to your project configuration.
103
+
104
+ ### AI-powered changes
105
+
106
+ Give Lasso a natural-language instruction:
107
+
108
+ > "Make this header sticky and add a subtle blur."
109
+
110
+ or:
111
+
112
+ > "Turn this into a two-column pricing section."
113
+
114
+ or:
115
+
116
+ > "Add a loading state below this button."
117
+
118
+ Lasso assembles the relevant source context and sends it to your configured coding agent.
119
+
120
+ ### Diff-first workflow
121
+
122
+ Lasso never silently rewrites your project.
123
+
124
+ ```text
125
+ AI proposal
126
+ ↓
127
+ Review diff
128
+ ↓
129
+ Accept ────────→ Write to source
130
+ │
131
+ └──────────→ Reject
132
+ ```
133
+
134
+ Accepted changes are written to the filesystem and your framework's normal development workflow takes over.
135
+
136
+ ### Bring your own agent
137
+
138
+ Lasso's editing pipeline is agent-agnostic.
139
+
140
+ Use:
141
+
142
+ - `builtin`
143
+ - `claude-code`
144
+ - `custom`
145
+
146
+ Your selection and project context stay inside the Lasso pipeline while the actual coding agent can be swapped independently.
147
+
148
+ When installed, Lasso automatically detects the `claude` and `codex` commands
149
+ on your PATH and adds **Claude Code · Local** and **Codex · Local** to the
150
+ prompt model menu. Local agents run in read-only/planning mode and return a
151
+ reviewable proposal; Lasso remains the only process that writes accepted
152
+ changes to your source files.
153
+
154
+ ### Team collaboration (realtime)
155
+
156
+ Lasso can be live — teammates watch your selection, lock components so nobody
157
+ edits the same element at once, leave review comments, and talk over the app.
158
+
159
+ - **Presence & Live Cursors**: see team members online in the toolbar, with live
160
+ cursor tracking across the viewport showing user names and color badges. Click
161
+ an avatar to **spotlight** the element that teammate is looking at.
162
+ - **Lock mode**: taking an AI suggestion locks the selected element for the
163
+ duration of the edit. Teammates see a "Locked by …" badge and are prevented
164
+ from conflicting edits until release or expiry.
165
+ - **Voice Mode & Speech-to-Text**: speak prompt instructions directly using the
166
+ mic tool. Features an automated STT pooling backend that transcribes via
167
+ Gradium first, falling back to Deepgram if credits or connections fail.
168
+ - **Comments & Dictation**: thread comments anchored to the element you selected
169
+ (or the whole session), with attachments, GIFs, replies, and voice dictation.
170
+ - **Voice chat**: P2P WebRTC mesh — no media goes through a server.
171
+ - **Clipboard**: store and reuse code snippets, design references, and prompt
172
+ templates in private or shared workspaces.
173
+
174
+ To share a live session with your team, sign in once with `lasso auth login`
175
+ (easy browser OAuth — no manual keys), then run `lasso init`: it registers
176
+ your app with your Lasso workspace and writes `lasso.config.json` containing the
177
+ stable project id — commit that file so teammates joining the repo share the
178
+ same session. The API key itself is never stored in config.
179
+
180
+ The credential from `lasso auth login` is kept in `~/.lasso/credentials.json`
181
+ (chmod 600) and is used automatically by `init` and `dev`. To override it, or to
182
+ use a dashboard-created key instead, set `LASSO_API_KEY` — the environment
183
+ always wins over the stored credential.
184
+
185
+ Point the overlay at a different realtime server with any of
186
+ `LASSO_REALTIME_URL`, `REALTIME_URL`, or `NEXT_PUBLIC_REALTIME_URL`
187
+ (default: `http://localhost:3007`).
188
+
189
+ ---
190
+
191
+ ## Local domains with Lasso Host
192
+
193
+ `lasso init` also gives every project a stable local URL. It writes
194
+ `{ "id": "proj_…", "domain": "app.lasso" }` and registers the domain, so the
195
+ project is served at `http://app.lasso:<port>` or the secure
196
+ `https://app.lasso:6767` by default, without manually starting a dev server:
197
+
198
+ - `lasso daemon` — start/stop/restart/status the background host (reverse
199
+ HTTP/HTTPS **and WebSocket/HMR** proxy to your project's dev server on
200
+ `*.lasso` domains, loopback-only, single instance).
201
+ - `lasso register [domain]` — register the current directory under a `.lasso`
202
+ domain (reuse, generate, or change one); never duplicates.
203
+ - `lasso projects` — list registered domains and running state.
204
+ - `lasso daemon install/uninstall` — attach a macOS LaunchAgent (auto-start on
205
+ login) and configure the system DNS resolver so bare `app.lasso` works.
206
+
207
+ The Host answers `*.lasso → 127.0.0.1` itself (small local DNS responder),
208
+ starts a stopped project's dev server on first traffic (Vite/Next), proxies it,
209
+ and refuses any non-`.lasso` host. The secure URL is
210
+ `https://<project>.lasso:6767`; Lasso generates a certificate in
211
+ `~/.lasso/host` (using `mkcert` when available, otherwise OpenSSL). Registration state lives in
212
+ `~/.lasso/host/registry.json`.
213
+
214
+ ---
215
+
216
+ ## Supported frameworks
217
+
218
+ | Framework | Status |
219
+ |---|---|
220
+ | React + Vite | ✅ Supported |
221
+ | Vue + Vite | ✅ Supported |
222
+ | Svelte + Vite | ✅ Supported |
223
+ | Solid + Vite | ✅ Supported |
224
+ | Next.js | ✅ Supported |
225
+ | Webpack | 🚧 Not yet |
226
+ | Create React App | 🚧 Not yet |
227
+ | Angular | 🚧 Not yet |
228
+
229
+ > Lasso currently targets Vite-based applications and Next.js. Unsupported frameworks are detected explicitly rather than failing silently.
230
+
231
+ ---
232
+
233
+ ## Quickstart
234
+
235
+ ### 1. Install
236
+
237
+ ```bash
238
+ npm install --save-dev lasso
239
+ ```
240
+
241
+ Or:
242
+
243
+ ```bash
244
+ pnpm add -D lasso
245
+ ```
246
+
247
+ ```bash
248
+ yarn add -D lasso
249
+ ```
250
+
251
+ You can also install the CLI globally and use `lasso` directly from any
252
+ project:
253
+
254
+ ```bash
255
+ npm install --global lasso
256
+ # or
257
+ pnpm add --global lasso
258
+ # or
259
+ yarn global add lasso
260
+ ```
261
+
262
+ Use a project-local install when you want each repository to pin its Lasso
263
+ version; use the global install for a convenient machine-wide CLI.
264
+
265
+ ### 2. Start Lasso
266
+
267
+ From your application's root:
268
+
269
+ ```bash
270
+ lasso
271
+ # or, without a global install
272
+ npx lasso
273
+ ```
274
+
275
+ This is equivalent to:
276
+
277
+ ```bash
278
+ lasso dev
279
+ # or, without a global install
280
+ npx lasso dev
281
+ ```
282
+
283
+ Lasso detects your framework, starts the development environment with its integration injected in memory, and connects the browser overlay.
284
+
285
+ To enable team realtime collaboration, first run `lasso init` (once per repo)
286
+ and set `LASSO_API_KEY` — see [Team collaboration](#team-collaboration-realtime) above.
287
+
288
+ Your existing configuration files are **not modified**.
289
+
290
+ ### 3. Select something
291
+
292
+ Enable **Lasso Mode** from the floating toolbar.
293
+
294
+ Click a component or drag around a region of your application.
295
+
296
+ ### 4. Describe the change
297
+
298
+ For example:
299
+
300
+ ```text
301
+ Make this card more compact and add a hover animation.
302
+ ```
303
+
304
+ ### 5. Review the diff
305
+
306
+ Lasso generates a proposed source-code change.
307
+
308
+ Review it.
309
+
310
+ ```text
311
+ Accept → apply the change
312
+ Reject → discard the proposal
313
+ Undo → restore the previous snapshot
314
+ ```
315
+
316
+ That's it.
317
+
318
+ ---
319
+
320
+ ## Agent configuration
321
+
322
+ Create `lasso.config.json` in your project root:
323
+
324
+ ```json
325
+ {
326
+ "agent": "builtin"
327
+ }
328
+ ```
329
+
330
+ ### Built-in agent
331
+
332
+ ```json
333
+ {
334
+ "agent": "builtin"
335
+ }
336
+ ```
337
+
338
+ Uses Lasso's built-in agent through the Anthropic SDK.
339
+
340
+ Requires:
341
+
342
+ ```bash
343
+ export ANTHROPIC_API_KEY=your_key
344
+ ```
345
+
346
+ ### Claude Code
347
+
348
+ ```json
349
+ {
350
+ "agent": "claude-code"
351
+ }
352
+ ```
353
+
354
+ Lasso can delegate the coding task to Claude Code in headless mode while keeping the same selection → context → diff → accept workflow.
355
+
356
+ ### Custom agent
357
+
358
+ ```json
359
+ {
360
+ "agent": "custom"
361
+ }
362
+ ```
363
+
364
+ Build your own adapter for another coding agent.
365
+
366
+ The adapter contract is intentionally simple:
367
+
368
+ ```text
369
+ Lasso context
370
+ ↓
371
+ Your agent
372
+ ↓
373
+ old string → new string
374
+ ↓
375
+ Lasso diff preview
376
+ ```
377
+
378
+ ---
379
+
380
+ ## How it works
381
+
382
+ Lasso has three main pieces.
383
+
384
+ ```text
385
+ ┌──────────────────────┐
386
+ │ Browser │
387
+ │ │
388
+ │ Select UI element │
389
+ │ Capture screenshot │
390
+ │ Presence, locks, │
391
+ │ comments, voice │
392
+ └──────────┬───────────┘
393
+ │
394
+ │ WebSocket
395
+ ▼
396
+ ┌──────────────────────┐ ┌──────────────────────┐
397
+ │ Lasso CLI │ │ Realtime server │
398
+ │ │ │ (collab-server) │
399
+ │ Resolve source │ │ │
400
+ │ Assemble context │ │ presence · locks │
401
+ │ Run coding agent │ ───▶ │ comments · voice │
402
+ │ Generate diff │ │ project registry │
403
+ └──────────┬───────────┘ └──────────────────────┘
404
+ │
405
+ │ accepted diff
406
+ ▼
407
+ ┌──────────────────────┐
408
+ │ Source code │
409
+ │ │
410
+ │ Your actual files │
411
+ │ Your framework │
412
+ └──────────────────────┘
413
+ ```
414
+
415
+ The browser overlay is responsible for **selection, context capture, and the
416
+ realtime client** (presence, locks, comments, voice).
417
+
418
+ The CLI handles **source resolution, agent orchestration, diffs, and filesystem
419
+ changes**; on startup it authenticates the project session (`lasso.config.json`
420
+ + `LASSO_API_KEY`) with the realtime server for realtime collaboration.
421
+
422
+ The framework remains responsible for rendering the result.
423
+
424
+ ---
425
+
426
+ ## Local-first by design
427
+
428
+ Lasso is designed around your local development environment.
429
+
430
+ The browser communicates with a local Lasso CLI through a dedicated WebSocket bridge.
431
+
432
+ The CLI:
433
+
434
+ 1. Detects your framework
435
+ 2. Resolves the selected component
436
+ 3. Reads the relevant source
437
+ 4. Collects imports and surrounding context
438
+ 5. Captures the selected UI
439
+ 6. Sends the assembled context to your configured agent
440
+ 7. Receives a proposed change
441
+ 8. Shows you the diff
442
+ 9. Writes only after you accept
443
+
444
+ The goal is simple:
445
+
446
+ **Your development environment stays yours.**
447
+
448
+ ---
449
+
450
+ ## Project metrics
451
+
452
+ Lasso is open source and distributed through npm.
453
+
454
+ The numbers below are pulled from public package and repository activity where available.
455
+
456
+ | Metric | |
457
+ |---|---:|
458
+ | npm downloads | [![npm downloads](https://img.shields.io/npm/dm/lasso?style=flat-square&color=6366f1)](https://www.npmjs.com/package/lasso) |
459
+ | GitHub stars | [![GitHub stars](https://img.shields.io/github/stars/codewithdripzy/lasso?style=flat-square&color=6366f1)](https://github.com/codewithdripzy/lasso) |
460
+ | Contributors | [![GitHub contributors](https://img.shields.io/github/contributors/codewithdripzy/lasso?style=flat-square&color=6366f1)](https://github.com/codewithdripzy/lasso/graphs/contributors) |
461
+ | Latest release | [![npm version](https://img.shields.io/npm/v/lasso?style=flat-square&color=6366f1)](https://www.npmjs.com/package/lasso) |
462
+ | License | [![license](https://img.shields.io/github/license/codewithdripzy/lasso?style=flat-square&color=6366f1)](LICENSE) |
463
+
464
+ > npm downloads represent package downloads, not unique users or installations.
465
+
466
+ ---
467
+
468
+ ## Status
469
+
470
+ ### `0.1.0`
471
+
472
+ Lasso is early and intentionally opinionated.
473
+
474
+ The core visual editing pipeline is being built around:
475
+
476
+ - Vite integration
477
+ - Next.js integration
478
+ - Visual component selection
479
+ - Source-code resolution
480
+ - Local WebSocket communication
481
+ - AI-generated source changes
482
+ - Diff preview
483
+ - Explicit accept/reject
484
+ - Undo
485
+ - Pluggable coding agents
486
+
487
+ Expect breaking changes before `1.0`.
488
+
489
+ ---
490
+
491
+ ## Documentation
492
+
493
+ | Document | Description |
494
+ |---|---|
495
+ | [Architecture](ARCHITECTURE.md) | System architecture and design decisions |
496
+ | [Contributing](CONTRIBUTING.md) | Development setup and contribution guide |
497
+ | [Support](SUPPORT.md) | Questions, bugs, and community support |
498
+ | [Security](SECURITY.md) | Vulnerability reporting |
499
+ | [Changelog](CHANGELOG.md) | Release history |
500
+ | [Publishing](docs/PUBLISHING.md) | npm publishing guide |
501
+
502
+ More examples and guides are available on the [Lasso website](https://lasso.byorello.space).
503
+
504
+ ---
505
+
506
+ ## Contributing
507
+
508
+ Lasso is open source and contributions are welcome.
509
+
510
+ ```bash
511
+ git clone https://github.com/codewithdripzy/lasso.git
512
+ cd lasso
513
+
514
+ npm install
515
+ npm run build
516
+ ```
517
+
518
+ If you find a bug, have an idea, or want to contribute a framework integration, open an issue or pull request.
519
+
520
+ ---
521
+
522
+ ## Support
523
+
524
+ If Lasso saves you time and you want to support development:
525
+
526
+ <a href="https://www.buymeacoffee.com/thecodeguyy">
527
+ <img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy me a coffee" height="40">
528
+ </a>
529
+
530
+ - **Buy Me a Coffee:** [@thecodeguyy](https://www.buymeacoffee.com/thecodeguyy)
531
+ - **X:** [@fikayomibanks](https://x.com/fikayomibanks)
532
+ - **GitHub:** [@codewithdripzy](https://github.com/codewithdripzy)
533
+
534
+ ---
535
+
536
+ ## License
537
+
538
+ [ISC](LICENSE) © 2026 Lasso contributors.
539
+
540
+ <div align="center">
541
+
542
+ <br />
543
+
544
+ ### Point at it. Describe it. Ship it.
545
+
546
+ Made for developers who want to change their code the way they change their UI.
547
+
548
+ </div>