@webflow/webflow-cli 2.3.0-next.0 → 2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # @webflow/webflow-cli
2
2
 
3
+ ## 2.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 18a2d43: Site ID resolution in `webflow cloud` and `webflow auth` now follows flag > `WEBFLOW_SITE_ID` env var > `webflow.json` order. Previously, `webflow.json` `siteId` took priority over the `WEBFLOW_SITE_ID` environment variable. This makes behavior consistent with the resolver used by all new CLI commands and allows CI/CD env vars to override the checked-in manifest as expected.
8
+
9
+ Note: `WEBFLOW_SITE_ID` now also takes precedence over `cloud.workspace_id` in `webflow.json`. A project configured for standalone/workspace deploys that has `WEBFLOW_SITE_ID` set in the environment will route to site-attached instead.
10
+
11
+ `webflow cloud deploy` now also respects `WEBFLOW_APP_ID` as an environment variable override for the app ID, and `WEBFLOW_WORKSPACE_ID` when resolving the workspace for a standalone-first deploy.
12
+
13
+ - 2875d7d: Two behavior changes for CI and agent callers, plus new internal path/archive safety utilities.
14
+
15
+ - **`--json` failures now go to stdout as a JSON document.** Previously a failure printed prose to stderr; it is now a single `{ "error": { "message", "context", "missingFlag" } }` document on stdout, written synchronously so a long message is not truncated when stdout is a pipe. `context` carries the operation the command was performing. The failure is also recorded, with its stack, in the session debug log. **Scripts that grep stderr for the failure message need updating.**
16
+ - **Non-interactive mode is auto-detected in more environments.** In addition to `CI=true` and a missing stdout TTY, `--no-input` is now enabled when stdin has no TTY or when a coding agent's execution environment is detected, so prompts no longer hang agent and CI invocations. A new `--input` flag forces interactive mode, for the case where the detection misreads a human environment.
17
+
18
+ - 2d85a3e: Add the `webflow skills` namespace — install, update, list, and remove Webflow's first-party agent skills into your coding agents' skill directories.
19
+
20
+ - `webflow skills install [names...]` — fetches the skill catalog, writes each skill once into a shared canonical store, and links it into every selected agent's directory. Symlinks by default with an automatic per-target fallback to copying (`--copy` forces copies). Records what it wrote in a lockfile — `webflow-skills-lock.json` for a project, `skills-lock.json` under the CLI config directory for a `--global` install — so `install` with no names restores an existing set reproducibly. `--ref <branch|sha>` pins to a branch or commit.
21
+ - `webflow skills update [names...]` — re-resolves the pinned ref and updates installed skills, reporting each one as unchanged, updated, moved, reinstalled, or blocked. `--check` reports what would change and writes nothing.
22
+ - `webflow skills list` — shows what is installed in both scopes with a per-skill status (`up-to-date`, `modified`, `missing`, `unmanaged`) computed by re-hashing what is on disk against the lockfile. Never touches the network. Supports `--fields`, `--sort-by`, and `--order`.
23
+ - `webflow skills remove [names...]` — unlinks a skill from every agent and deletes its store directory once nothing references it any more.
24
+
25
+ Every command supports `--json`, every write command supports `--dry-run`, and `-a, --agent` selects specific coding agents (repeatable, comma-separated, or `all`). `-g, --global` and `-p, --project` select the scope. A skill directory is only ever replaced without `--force` when the CLI itself wrote it and it has not been edited since — and `remove` applies the same rule to deletion, so a skill directory another tool installed (or one you wrote yourself) is left alone unless you pass `--force`.
26
+
27
+ Because `--global` installs write into agent directories under your home directory, a skill directory is never replaced or deleted unless the CLI itself wrote it and it has not been edited since — anything else needs `--force`. Archives are extracted through hardened path-containment checks, and `--dry-run` prints every path before any write happens.
28
+
29
+ Also fixes a pre-existing issue affecting every command: the "New versions of the following @webflow packages are available" notice was written to stdout even under `--json`, so on any machine with a pending CLI update it appeared ahead of the JSON document and broke `JSON.parse` on the output. The update check is now skipped when `--json` is in effect.
30
+
31
+ ### Patch Changes
32
+
33
+ - 12bcf3b: Deprecate `webflow cloud list` ahead of removal. The command still works but prints a warning — it lists scaffold templates for `init`, not the user's Cloud apps. Help text is tagged `[Deprecated]`; use `cloud`/`apps` `init --framework` / `--help` for templates (and `webflow apps list` for apps on `@next`).
34
+ - 2dbf0ae: Update `tar` to a patched version that prevents decompression denial-of-service attacks.
35
+ - 84dc26e: Fix the message shown when `webflow devlink sync` fails with a 404. It previously told users to apply for DevLink beta access; it now points to `webflow devlink export` and the migration guide.
36
+ - 0f8a85f: Explain how to recover when a deploy cannot create an app. Hitting an app name that is already taken on the site, or a site that has reached its Cloud app limit, previously reported only "An unknown error occurred". Both now say what happened and how to proceed. The usual cause is `app_id` missing from `webflow.json`, for example on a fresh CI checkout.
37
+ - f7efc3d: Pin the transitive `adm-zip` dependency (pulled in via `@module-federation/enhanced` → `dts-plugin`) to `^0.6.0` via an npm override, fixing a high-severity denial-of-service vulnerability (CVE-2026-39244) where a crafted ZIP file could trigger an unbounded ~4GB memory allocation.
38
+ - b4e08db: Internal refactor: added a `resolveOptionalResourceId` helper to collapse repeated try/catch blocks around `resolveResourceId` in the cloud deploy/preflight code paths. No user-facing behavior change.
39
+ - 903c4a4: Bump transitive `undici` dependency (pulled in via `@module-federation/enhanced`) to 7.28.0 to fix a WebSocket client denial-of-service vulnerability (CVE-2026-12151).
40
+ - @webflow/data-types@2.1.0
41
+
3
42
  ## 2.2.0
4
43
 
5
44
  ### Minor Changes
package/README.md CHANGED
@@ -19,6 +19,7 @@ npm install -g @webflow/webflow-cli
19
19
  - [DevLink Export](#devlink-export)
20
20
  - [Designer Extensions](#designer-extensions)
21
21
  - [Apps (Webflow Cloud)](#apps-webflow-cloud)
22
+ - [Skills (agent skills)](#skills-agent-skills)
22
23
  - [Global Options](#global-options)
23
24
 
24
25
  ---
@@ -286,6 +287,124 @@ created/updated/skipped/errors breakdown and exits non-zero if any key fails
286
287
 
287
288
  ---
288
289
 
290
+ ## Skills (agent skills)
291
+
292
+ Install Webflow's first-party agent skills into your coding agents, so an agent
293
+ working in your repo knows how to use Webflow without being told each time.
294
+
295
+ > **These commands write outside the current project.** A `--global` install
296
+ > writes into your coding agents' skill directories under your home directory. Two
297
+ > rules bound that: nothing is replaced or deleted unless the CLI wrote it and it
298
+ > has not been edited since (anything else needs `--force`), and `--dry-run` prints
299
+ > every path before a single byte is written. Run it first if you are unsure.
300
+
301
+ ```shell
302
+ webflow skills install # Restore from a lockfile, or pick interactively
303
+ webflow skills install webflow-cms --dry-run # Preview every path that would be written
304
+ webflow skills install webflow-cms --agent claude-code,cursor
305
+ webflow skills install --all-skills --all-agents --global
306
+ webflow skills list # What is installed, and where
307
+ webflow skills update --check # Report what would change; write nothing
308
+ webflow skills update
309
+ webflow skills remove webflow-cms --dry-run # Preview exactly what is deleted
310
+ ```
311
+
312
+ ### Scope: project or global
313
+
314
+ | Scope | Where skills go | Lockfile |
315
+ | ------------------- | ------------------------------------------- | ---------------------------------------- |
316
+ | Project (default) | Agent directories under the current project | `webflow-skills-lock.json` (commit this) |
317
+ | Global (`--global`) | Agent directories under your home directory | `skills-lock.json` in the CLI config dir |
318
+
319
+ The project lockfile is meant to be committed: a teammate (or CI) runs
320
+ `webflow skills install` with no arguments and gets the same skills at the same
321
+ commit. `list` shows **both** scopes by default so a global install is never
322
+ invisible.
323
+
324
+ Each skill's files are written once into a shared canonical store and linked into
325
+ every selected agent's directory, so installing for twenty agents costs one copy.
326
+ Symlinks are used by default, with an automatic per-target fallback to copying
327
+ when the filesystem or platform refuses them; `--copy` forces copies everywhere.
328
+
329
+ ### Safety
330
+
331
+ `install` and `update` refuse to overwrite a skill directory unless the CLI
332
+ wrote it and it has not been edited since — anything locally modified, or
333
+ anything that exists without a matching lockfile entry, is reported as blocked
334
+ and needs `--force`. `--dry-run` prints the exact absolute paths that would be
335
+ written or deleted and makes no changes, which is the flag to reach for first
336
+ when an agent chose the arguments.
337
+
338
+ ### `skills install` options
339
+
340
+ | Flag | Description |
341
+ | --------------------- | ---------------------------------------------------------------------- |
342
+ | `-a, --agent <ids>` | Target agent; repeatable, comma-separated, or `all` |
343
+ | `--all-agents` | Install for every supported agent |
344
+ | `--all-skills` | Install every skill in the catalog |
345
+ | `-g, --global` | Install into your home directory instead of the current project |
346
+ | `-p, --project` | Install into the current project (the default) |
347
+ | `--copy` | Copy files instead of symlinking from the shared store |
348
+ | `--ref <branch\|sha>` | Pin to a branch or 40-character commit SHA (default: `main`) |
349
+ | `--force` | Replace destinations that were modified locally or installed elsewhere |
350
+ | `-y, --yes` | Skip the confirmation prompt |
351
+ | `--dry-run` | Print every path that would be written; change nothing |
352
+ | `--json` | Output as JSON |
353
+
354
+ ### `skills update` options
355
+
356
+ | Flag | Description |
357
+ | --------------------- | ------------------------------------------------- |
358
+ | `--check` | Report what would change without writing anything |
359
+ | `-g, --global` | Update the home-directory install |
360
+ | `-p, --project` | Update the current project's install |
361
+ | `--ref <branch\|sha>` | Re-pin to a different branch or commit SHA |
362
+ | `--force` | Overwrite skills that were modified locally |
363
+ | `-y, --yes` | Skip the confirmation prompt |
364
+ | `--dry-run` | Preview without writing |
365
+ | `--json` | Output as JSON |
366
+
367
+ ### `skills list` options
368
+
369
+ | Flag | Description |
370
+ | ------------------- | ----------------------------------------------------------------------------- |
371
+ | `-g, --global` | Only the home-directory install |
372
+ | `-p, --project` | Only the current project's install |
373
+ | `-a, --agent <ids>` | Only skills linked into these agents; repeatable and comma-separated |
374
+ | `--fields <fields>` | Comma-separated columns (name, dir, description, status, mode, agents, scope) |
375
+ | `--sort-by <field>` | Sort by name, dir, status, or scope (default: name) |
376
+ | `--order <dir>` | `asc` or `desc` (default: `asc`) |
377
+ | `--json` | Output as JSON |
378
+
379
+ `status` is computed offline by re-hashing what is on disk against what the
380
+ lockfile recorded: `up-to-date`, `modified` (edited since install), `missing`
381
+ (recorded but gone), or `unmanaged` (present with no lockfile entry). Checking
382
+ for _upstream_ changes needs the network and is `skills update --check`'s job.
383
+
384
+ ### `skills remove` options
385
+
386
+ | Flag | Description |
387
+ | ------------------- | ------------------------------------------------------------- |
388
+ | `-a, --agent <ids>` | Only unlink from these agents; repeatable and comma-separated |
389
+ | `--all` | Remove every installed skill for the scope |
390
+ | `-g, --global` | Remove from the home-directory install |
391
+ | `-p, --project` | Remove from the current project's install |
392
+ | `--force` | Also remove skill directories that have no lockfile entry |
393
+ | `-y, --yes` | Skip the confirmation prompt |
394
+ | `--dry-run` | Print exactly what would be deleted; change nothing |
395
+ | `--json` | Output as JSON |
396
+
397
+ Removing a skill from one agent unlinks it there and keeps the shared store as
398
+ long as another agent still references it; the store directory is deleted once
399
+ nothing does.
400
+
401
+ `remove` only deletes what the lockfile records. A skill directory with no
402
+ lockfile entry was not installed by this CLI — it may belong to another tool, or
403
+ be hand-written — so `--all` leaves it alone and names it in a warning, and
404
+ naming it directly is refused. `--force` opts in to removing those too.
405
+
406
+ ---
407
+
289
408
  ## Global Options
290
409
 
291
410
  Available on all commands: