Skip to main content

Generate metadata

The wmill generate-metadata command generates metadata (locks, schemas) for all scripts, flows and apps. It replaces the previous separate commands (wmill script generate-metadata, wmill flow generate-locks, wmill app generate-locks).

Usage

wmill generate-metadata [folder] [options]

Options

OptionDescription
--yesSkip confirmation prompt
--dry-runShow what would be updated without making changes
--lock-onlyRegenerate only lock files
--schema-onlyRegenerate only script schemas (skips flows and apps)
--skip-scriptsSkip processing scripts
--skip-flowsSkip processing flows
--skip-appsSkip processing apps
--strict-folder-boundariesOnly update items inside the specified folder (requires folder argument)
-i, --includes <patterns>Comma-separated patterns to specify which files to include
-e, --excludes <patterns>Comma-separated patterns to specify which files to exclude

The rehash subcommand (see Rehash below) rewrites lockfile hashes from on-disk content without any backend round-trip.

Arguments

ArgumentDescription
folderOptional folder path to filter metadata generation

Examples

Generate metadata for entire workspace

wmill generate-metadata

Preview changes without applying

wmill generate-metadata --dry-run

Auto-confirm all updates

wmill generate-metadata --yes

Generate only for a specific folder

wmill generate-metadata f/my_folder

Strict folder boundaries

wmill generate-metadata f/my_folder --strict-folder-boundaries

Only update lockfiles

wmill generate-metadata --lock-only

Only update schemas

wmill generate-metadata --schema-only

Include specific patterns

wmill generate-metadata -i "f/production/*,f/shared/*"

Exclude specific patterns

wmill generate-metadata -e "f/test/*,f/drafts/*"

Rehash

wmill generate-metadata rehash [folder] rewrites wmill-lock.yaml hashes directly from on-disk content. It does not contact the backend, does not regenerate scripts/flows/apps, and does not rewrite YAML files — it only recomputes the staleness hashes.

Use it when:

  • wmill generate-metadata flags items as stale that you didn't change. Common causes: an older CLI wrote the lockfile with a different YAML library or unsorted hash keys, leaving entries that no longer match what the current CLI computes. rehash rebuilds those entries from disk so they line up again.
  • Your wmill-lock.yaml has duplicate ./-prefixed entries (e.g. ./f/foo+__script_hash next to f/foo+__script_hash). These come from past wmill generate-metadata ./folder invocations on older CLIs. rehash deduplicates them by writing canonical (non-prefixed) keys.
  • You bootstrapped a long-lived wmill sync-managed repo and want to fill in lockfile entries for items that pre-date the lockfile, without redeploying everything.

Options

OptionDescription
--skip-scriptsSkip processing scripts
--skip-flowsSkip processing flows
--skip-appsSkip processing apps
-i, --includes <patterns>Comma-separated patterns to specify which files to include
-e, --excludes <patterns>Comma-separated patterns to specify which files to exclude

Examples

# Rebuild every lockfile entry from disk
wmill generate-metadata rehash

# Scope to a single folder
wmill generate-metadata rehash f/billing

# Rehash scripts only
wmill generate-metadata rehash --skip-flows --skip-apps

rehash is non-destructive: it never touches your scripts, flows, apps, or YAML files. It only writes to wmill-lock.yaml.

Trust, don't verify

rehash accepts the on-disk content as canonical without checking it against the backend. Don't use it as a substitute for a regular wmill generate-metadata run when you actually want to validate that locks/schemas are up to date. Use it only when you've already confirmed the disk content is what you want and just need the lockfile to stop reporting it as stale.

wmill sync pull runs an automatic, lighter version of this for items that exist on disk but have no lockfile entry — so for typical pull-then-push workflows you don't need to invoke rehash manually. The auto-fill is skipped under --json and --dry-run so non-interactive scripts and previews don't mutate wmill-lock.yaml.

Migration from legacy commands

The following commands are now deprecated:

Deprecated commandReplacement
wmill script generate-metadatawmill generate-metadata --skip-flows --skip-apps
wmill flow generate-lockswmill generate-metadata --skip-scripts --skip-apps
wmill app generate-lockswmill generate-metadata --skip-scripts --skip-flows

The legacy commands will show deprecation warnings but continue to work.

For centralized dependency management, see workspace dependencies.