windmill-labs/windmill · warning

This command is deprecated. Use "wmill generate-metadata" in

Error message

This command is deprecated. Use "wmill generate-metadata" instead.

What it means

The legacy per-script lock/schema generation command (generate-flow-lock style script locking) has been superseded by the unified `wmill generate-metadata` command. The old handler immediately warns about the deprecation and notes it only works for workspace scripts, not flows or apps.

Source

Thrown at cli/src/commands/script/script.ts:1702

      flag: 'wx', encoding: 'utf-8',
    }
  );
}

export type GlobalDeps = Map<
  WorkspaceDependenciesLanguage,
  Record<string, string>
>;

export async function generateMetadata(
  opts: GlobalOptions & {
    lockOnly?: boolean;
    schemaOnly?: boolean;
    yes?: boolean;
  } & SyncOptions,
  scriptPath: string | undefined
) {
  log.warn(
    colors.yellow('This command is deprecated. Use "wmill generate-metadata" instead.')
  );
  log.info(
    "This command only works for workspace scripts. For flows or apps, run `wmill generate-metadata` from the affected folder."
  );
  if (scriptPath == "") {
    scriptPath = undefined;
  }
  if (scriptPath && !validatePath(scriptPath)) {
    return;
  }

  const workspace = await resolveWorkspace(opts);
  await requireLogin(opts);
  opts = await mergeConfigWithConfigFile(opts);
  const codebases = await listSyncCodebases(opts);

  const rawWorkspaceDependencies = await getRawWorkspaceDependencies(true);

View on GitHub (pinned to e474e8803c)

Solutions

  1. Replace the invocation with `wmill generate-metadata`
  2. For flows or apps, run `wmill generate-metadata` from the affected folder rather than per-script
  3. Update CI and internal docs to reference generate-metadata

Example fix

// before
wmill script generate-lock f/scripts/foo.ts
// after
wmill generate-metadata
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: Invoking the deprecated generate-script-metadata/lock command (e.g. `wmill script generate-lock` / legacy generate command) directly, or via an old script/CI step that has not been migrated.

Common situations: CI pipelines or docs from older wmill versions; muscle memory from previous workflows; scripts written before generate-metadata existed.

Related errors


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/c741634e9164a487. Report an issue: GitHub.