@flashdsm/genome 0.3.0 → 0.4.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
@@ -32,10 +32,16 @@ In your app's folder, in a terminal or in your AI editor's chat:
32
32
  npx @flashdsm/genome@latest connect
33
33
  ```
34
34
 
35
- `connect` scans the folder (stylesheets, CSS inside JS/TS, Tailwind config, theme modules, tokens files; nothing else is read) and opens Flash in your browser, showing what it found and a short code that matches the one in your terminal. Click **Connect** there: Flash creates the system in your account, and the command links the repo (`genome.config.json`), writes the system into it (`pull --confirm`) and stores a token bound to that system under `~/.config/flash-dsm/`. Inside Claude Code it also adds Genome as the project's MCP server; elsewhere it prints the line to add. `--name` overrides the name, which otherwise comes from `package.json`; `--no-open` prints the link instead of opening it.
35
+ `connect` scans the folder (stylesheets, CSS inside JS/TS, Tailwind config, theme modules, tokens files; nothing else is read) and opens Flash in your browser, showing what it found and a short code that matches the one in your terminal. Click **Connect** there: Flash creates the system in your account, and the command links the repo (`genome.config.json`), writes the system into it (`pull --confirm`), writes the files an agent reads (AGENTS.md, the skill, the Cursor rule) and stores a token bound to that system under `~/.config/flash-dsm/`. Inside Claude Code it also adds Genome as the project's MCP server; elsewhere it prints the line to add. `--name` overrides the name, which otherwise comes from `package.json`; `--no-open` prints the link instead of opening it.
36
+
37
+ Run `connect` again in a folder that is already connected and it updates that system instead of making another: no scan, no Connect click; it pulls, refreshes the agent files and the live preview. `connect --new` makes a new system anyway. If the linked system is gone or this machine can't open it, connect says why and connects the folder as a new system.
38
+
39
+ Your app keeps running on its own CSS: `tokens.css` is Flash's copy, and nothing imports it until you say so. `connect` ends with one question for you (or your agent to ask you): use Flash's colours, so a change in Flash shows up in the app? The steps it prints keep every variable name and leave the screen the same in light and dark. AGENTS.md carries the same steps, plus how changes move: while `genome watch` runs in the background, both ways happen by themselves. Change a token in Flash and Genome rewrites `tokens.css` within seconds, no Publish; save the app's CSS and Flash takes the change. Genome never writes over a hand edit to `tokens.css` that Flash doesn't hold. Without it, `pull --confirm` and `push --confirm` do the same once.
36
40
 
37
41
  When your app's dev server is running, `connect` also leaves a live preview in the background (localhost:4747): Flash's editor shows your real app and recolours it as you edit tokens, through its CSS variables. Nothing is written to your code. `npx @flashdsm/genome@latest preview` starts it again; `preview --stop` ends it.
38
42
 
43
+ `connect` also leaves Genome watching the folder. Change a colour, a theme or a type size in your app's own stylesheets and, a couple of seconds after you save, Flash takes it and the editor says what changed, with Undo. Only what you changed comes in: a token edited in Flash since keeps Flash's value (the notice says so), nothing in Flash is deleted, and a comment or whitespace save does nothing. Genome's own files (`tokens.css`, `design-tokens.json`, `genome/`) are never read back. It rescans once an hour as a backup, and keeps running after the terminal closes; the watcher and the live preview are one background process. `npx @flashdsm/genome@latest watch` starts it again, `watch --stop` ends both, and `watch --once` sends one scan in the foreground and says what Flash did with it. The log is `~/.config/flash-dsm/genome-watch.log`.
44
+
39
45
  The link works once and expires after 15 minutes. `init --code` does the same with a setup code instead of the browser.
40
46
 
41
47
  ## Quick start
@@ -304,7 +310,8 @@ otherwise only added).
304
310
  }
305
311
  ```
306
312
 
307
- `state` is one of `in-step`, `flash-ahead` (Flash published since the pull),
313
+ `state` is one of `in-step`, `flash-ahead` (Flash changed since the pull: its
314
+ revision moved, published or not),
308
315
  `repo-dirty` (a pulled file changed or is missing), `both`, `never-pulled`.
309
316
  `flashAhead` and `dirty` are the booleans behind it; `changedTokens` lists
310
317
  the token values the repo changed (`code: "repo-edit"`, what `push` would
package/dist/index.d.ts CHANGED
@@ -83,16 +83,22 @@ declare function parseCliArgs(argv: string[]): {
83
83
  name?: string;
84
84
  /** connect: print the link instead of opening the browser. */
85
85
  noOpen: boolean;
86
+ /** connect: a new system even when this folder is already connected. */
87
+ fresh: boolean;
86
88
  /** preview: run the proxy in this process (what the background child runs). */
87
89
  serve: boolean;
88
- /** preview: stop the background proxy. */
90
+ /** preview / watch: stop the background process. */
89
91
  stop: boolean;
92
+ /** watch: one scan, sent in the foreground, then exit. */
93
+ once: boolean;
90
94
  /** preview --serve: the app's dev server, the system, Flash's origin. */
91
95
  devUrl?: string;
92
96
  system?: number;
93
97
  origin?: string;
94
98
  /** pull / push: write, rather than print the plan. */
95
99
  confirm: boolean;
100
+ /** pull: write even when it renames variables the app reads. */
101
+ acceptRename: boolean;
96
102
  /** pull / push / drift: one JSON object on stdout. */
97
103
  json: boolean;
98
104
  };