Skip to content

03 Command Reference

RemyDuijkeren edited this page Jun 26, 2026 · 43 revisions

Command Reference

Global flags

Available on every command:

Flag Description
-v, --verbose Show detailed command output
-f, --force Skip confirmation prompts and allow otherwise-blocked dangerous operations
--no-cache Re-run all validation checks instead of using cached results

Validation cache

Before every command, Flowline runs a set of pre-flight checks: tool version probes (dotnet, PAC CLI, git), git repo detection, environment info, and solution metadata. These checks call pac admin list and pac solution list under the hood — each takes several seconds. Flowline caches the results locally so subsequent commands start instantly.

Check Cache TTL
Tool versions (dotnet, PAC CLI, git) 7 days
Git repo 1 day
Environment info 12 hours
Solution metadata (name, version, publisher) 4 hours

Cache file: %LOCALAPPDATA%\Flowline\validation-cache.json (Windows) / ~/.cache/Flowline/validation-cache.json (Linux/Mac).

Use --no-cache when cached data is stale but the TTL hasn't expired yet — for example:

  • You just created a new solution in Dataverse and flowline clone can't find it yet
  • You switched PAC auth profiles or pointed PAC CLI at a different environment
  • A tool was upgraded and Flowline is still reporting the old version

--force details

--force does two things simultaneously:

1. Auto-accepts confirmation prompts. Some operations ask "are you sure?" in interactive mode. --force suppresses those — useful in CI where there is no terminal.

2. Unlocks operations that are blocked by default because they are destructive:

Situation Default behavior With --force
deploy when local changes haven't been synced to Dataverse yet Blocked (exit 15) — deploy would revert unseen changes Proceeds
sync when Package/src/ has uncommitted changes Blocked (exit 12) — sync would overwrite them Proceeds
Plugin assembly version downgrade Blocked — Dataverse requires a delete+recreate for downgrades Proceeds

Warning

--force is intended for CI pipelines and emergency situations. In normal development, the blocks it bypasses exist to protect you from data loss. Never add --force just to make a command stop complaining — fix the root cause first.


clone

Bootstraps an existing Dataverse solution into a new Git repo. Creates .flowline, unpacks the solution XML into src/, scaffolds the Plugins and WebResources projects, writes AGENTS.md, and generates the initial DATAVERSE_CONTEXT.md.

flowline clone ContosoSales --prod https://contoso.crm4.dynamics.com
Argument / Option Description
<solution> Solution to clone
--prod <url> Production environment URL
--uat <url> UAT environment URL
--test <url> Test environment URL
--dev <url> Development environment URL
--managed Also clone the managed solution (saved to .flowline)

push

Builds the solution and syncs plugin assemblies and web resources to DEV. Files under WebResources/dist/ are synced.

flowline push
Argument / Option Description
[solution] Solution to push (optional in project mode)
-s, --scope <scope> Limit scope: all, webresources, plugins, or assemblyonly. Can be specified multiple times.
-p, --pluginFile <path> Prebuilt plugin assembly (.dll) — for standalone use
-w, --webresources <path> Web resource folder — for standalone use
--dev <url> Dev environment URL
--no-delete Push without deleting Dataverse assets missing from source
--no-build Skip dotnet build and push the existing Release artifacts
--dry-run Preview changes without touching Dataverse

--no-build: Skips the build step and pushes the artifacts already on disk — handy when you just built and tested the projects. It is strict and Release-only: it reads the same Release output a normal push produces (Plugins/bin/Release/.../Plugins.dll, WebResources/dist/). If those artifacts are missing, push fails with a clear message instead of pushing stale or partial output — build Release first, or drop --no-build. Honors --scope, so --scope plugins --no-build skips only the plugins build. In standalone mode (--pluginFile/--webresources) it has no effect, since those already skip the build.

Push refuses to run when WebResources/dist/ is missing or empty — with or without --no-build — because an empty folder would delete every web resource in the solution.

Use --scope assemblyonly to update only the assembly bytes without touching step or Custom API registrations — useful in hot iteration loops when registrations haven't changed:

flowline push --scope assemblyonly

Standalone push

push works outside a Flowline project — no .flowline, Git repo, or project structure required:

flowline push ContosoSales --pluginFile ./bin/Release/MyPlugins.dll --dev https://contoso-dev.crm4.dynamics.com
flowline push ContosoSales --webresources ./dist --dev https://contoso-dev.crm4.dynamics.com
flowline push ContosoSales --pluginFile ./bin/Release/MyPlugins.dll --webresources ./dist --dev https://contoso-dev.crm4.dynamics.com

Standalone rules:

  • --pluginFile must point to an already-built assembly.
  • --webresources points at the folder whose files should be synced.
  • If .flowline exists in the current folder, standalone mode stops — project mode and standalone mode cannot be mixed.
  • The target solution must be unmanaged.

sync

Pulls the current solution state from DEV and unpacks it into the repo. Run this after making changes in the maker portal to capture them in source control.

Full guide: 07-Sync

flowline sync
Argument / Option Description
[solution] Solution to sync (optional in project mode)
--dev <url> Development environment URL
--managed Export and unpack the managed solution in addition to unmanaged
--bump <component> Version component to increment: patch, minor, or major (default: patch)

By default, Flowline syncs only the unmanaged solution — the right choice for the DEV inner loop. Pass --managed once to also export the managed package; the flag is saved to .flowline so all subsequent syncs include it automatically. Pass --managed false to revert.

You need --managed if you intend to deploy to other environments (test, UAT, prod) as a managed solution. Managed deployment prevents customizers in target environments from making unsupported changes.


deploy

Packs the solution from the repo and imports it into the target environment.

Full guide: 08-Deploy

flowline deploy test
flowline deploy prod
flowline deploy https://contoso-uat.crm4.dynamics.com
Argument / Option Description
<target> Target environment: prod, uat, test, dev, or a URL
--solution <name> Solution to deploy
--managed Deploy the managed package instead of unmanaged
--skip-dtap-check Skip DTAP promotion checks (existence and version)
--no-delete Report orphan components without deleting them

By default, deploy imports the unmanaged solution. Pass --managed to deploy the managed package — required when the target environment should not allow direct customization. Once set in .flowline via flowline sync --managed, deploy picks it up automatically. Pass --managed false to revert.

Flowline blocks if there are local uncommitted changes (exits 12). If local changes haven't been synced to DEV, deploy exits 15 — run sync first or pass --force to skip the check.

DTAP gate

When your .flowline config defines multiple environment URLs, deploy enforces promotion order before packing:

  • Dev is blocked entirely. Use sync to push changes to a development environment.
  • Existence check. The solution must already exist in the nearest configured predecessor (UAT before Prod, Test before UAT, Dev before Test). If it doesn't, deploy blocks.
  • Version check. The predecessor's installed version must be ≥ the local version. If it isn't, deploy blocks with both version numbers shown.

Use --skip-dtap-check to bypass the existence and version checks (not the Dev block). A dim notice prints when the gate is skipped, identifying which predecessor was bypassed.

Orphan cleanup

Unmanaged solution imports are additive — Dataverse never removes deleted components. deploy automatically cleans up orphans before and after each import.

Pre-import: Before packing, Flowline queries solutioncomponent on the target, diffs against the local Solution.xml <RootComponents>, and removes anything that no longer belongs:

  • AUTO components (plugin assemblies, types, steps, step images, custom APIs, web resources, workflows) are either deleted (if solo) or removed from the solution (if shared with another solution).
  • MANUAL components (tables, columns, forms, views, roles, etc.) are listed in the report but never touched — remove them via the maker portal.

Deletion order: step images → steps → types → assemblies → custom APIs → web resources → workflows (deactivated first).

Post-import: Components blocked by dependencies during pre-import are retried after the import completes. Post-import failures are non-blocking — they appear as warnings and do not affect the deploy result.

--no-delete: Prints the orphan report without executing any deletions or removes. The summary line reads "N would be deleted, N would be removed from solution, N manual. (--no-delete active)".


provision

Provisions a DEV or TEST environment by copying from production. Use once when setting up a new environment.

flowline provision dev --prod https://contoso.crm4.dynamics.com
flowline provision test --prod https://contoso.crm4.dynamics.com
Argument / Option Description
[role] Target role: dev, test, or uat (default: dev)
--prod <url> Production environment URL to copy from
--copy <type> Copy type: minimal (no data) or full (with data)
--suffix <text> Target URL suffix (default: role name)
--allow-overwrite Overwrite an existing target environment

generate

Generates early-bound C# entity types via pac modelbuilder build with opinionated defaults. Output lands in Plugins/Models/ — no separate assembly, no ILMerge. Running generate again fully replaces the folder.

Full guide: 05-Generate-Early-Bound-Types

# First run — namespace derived from Plugins.csproj, saved to .flowline
flowline generate

# Subsequent runs pick up namespace and extra tables from .flowline
flowline generate

# Override namespace
flowline generate --namespace Contoso.Plugins.Models

# Include extra tables not in the solution
flowline generate --extra-tables account,contact
Argument / Option Description
[solution] Solution to generate types for (optional in project mode)
--namespace <ns> Model namespace — saved to .flowline for future runs
--extra-tables <tables> Comma-separated extra tables to include
--dev <url> Dev environment URL
-o, --output <path> Output folder (required outside a Flowline project)
--generator {pac|xrmcontext3|xrmcontext} Generator to use — pac (default) uses pac modelbuilder build; xrmcontext3 uses Delegate.XrmContext v3 F# exe (Windows only, bridge); xrmcontext uses XrmContext v4 dotnet tool (cross-platform). Saved to .flowline.

Standalone generate

Use outside a Flowline project by supplying -o, --dev, and the solution name:

flowline generate ContosoSales --dev https://contoso.crm4.dynamics.com --namespace Contoso.Plugins.Models -o ./src/Models

status

Shows environment info, Flowline version, .NET SDK, PAC CLI, and Git versions, plus authentication status.

flowline status

Clone this wiki locally