-
-
Notifications
You must be signed in to change notification settings - Fork 0
03 Command Reference
Run commands from any directory inside your project — Flowline walks up to find .flowline. Cancel anytime with Ctrl+C (graceful) or Ctrl+Break (immediate, Windows). If cancelled mid-run, re-running is safe.
Contents
Available on every command:
| Flag | Description |
|---|---|
-h, --help
|
Show help for the command. Works on every subcommand: flowline push --help, flowline deploy --help, etc. |
-v, --verbose
|
Show detailed command output |
-f, --force
|
Allow operations that are blocked by default because they risk unrecoverable data loss: skips the drift check on deploy, the dirty-source check on sync, and allows plugin assembly version downgrades. The blocks exist to protect you — only use --force when you know what you're losing. |
--no-cache |
Re-run all pre-flight checks instead of using cached results. Flowline caches tool version probes, environment info, and solution metadata (TTLs: 7 days / 12 hours / 4 hours) so commands start instantly. Use this when the cache is stale but the TTL hasn't expired yet — e.g. you just created a new solution or switched PAC auth profiles. |
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 — saved to .flowline. Required on first run; omit once set. |
--uat <url> |
UAT environment URL — saved to .flowline when provided. Typically set via flowline provision uat instead. |
--test <url> |
Test environment URL — saved to .flowline when provided. Typically set via flowline provision test instead. |
--dev <url> |
Development environment URL — saved to .flowline when provided. Typically set via flowline provision dev instead. |
--managed |
Also clone the managed solution (saved to .flowline) |
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 — read from .flowline. Only needed to override or in standalone mode. |
--no-delete |
Push without deleting Dataverse assets missing from source |
--no-build |
Skip dotnet build and push the existing Release artifacts |
--no-publish |
Skip publishing web resources after sync |
--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.
--no-publish: Skips the PublishXml step that normally runs after web resources are synced. Useful in CI pipelines that push multiple solutions before publishing once at the end, or that hand publish to another tool. Applies to web resources only — plugin push has no publish step. Default behavior (publish after sync) is unchanged when the flag is omitted.
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 assemblyonlypush 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.comStandalone rules:
-
--pluginFilemust point to an already-built assembly. -
--webresourcespoints at the folder whose files should be synced. - If
.flowlineexists in the current folder, standalone mode stops — project mode and standalone mode cannot be mixed. - The target solution must be unmanaged.
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> |
Dev environment URL — read from .flowline. Only needed to override. |
--managed |
Export and unpack the managed solution in addition to unmanaged |
--bump <component> |
Version component to increment: patch, minor, major, or none to skip bumping (default: patch) |
--no-build |
Skip the dotnet build validation step |
--no-build: Skips the post-sync build that validates the synced source compiles cleanly. Useful when iterating quickly and you know the build is clean, or when running sync in a CI step that handles build separately.
By default, Flowline syncs only the unmanaged solution.
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.
Warning
You need --managed if you intend to deploy to other environments (test, UAT, prod) as a managed solution.
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) |
--skip-solution-check |
Skip the solution checker gate |
--no-backup |
Skip the pre-deploy environment backup |
--no-delete |
Report orphan components without deleting them |
By default, deploy imports the unmanaged solution — pass --managed for the managed package.
It enforces promotion order (DTAP gate), runs the solution checker, takes a pre-deploy backup, and cleans up orphaned components. See 08-Deploy for details on all of that.
Provisions a DEV or TEST environment by copying from production. Use once when setting up a new environment or refreshing an existing one.
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 — read from .flowline. Only needed to override. |
--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 |
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 — read from .flowline. Only needed to override or in standalone mode. |
-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. |
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/ModelsShows environment info, Flowline version, .NET SDK, PAC CLI, and Git versions, plus authentication status.
flowline statusThe output looks like this:
╭─╴╷ ╭─╮╷ ╷╷ ╷╭╮╷╭─╴
├╴ │ │ ││╷││ ││╰┤├╴
╵ ╰─╴╰─╯╰┴╯╰─╴╵╵ ╵╰─╴
Flowline CLI v0.7.1.0 (NT 10.0.26200.0, CLR:10.0.9, 64-bit)
.NET SDK version: 10.0.301
Power Platform CLI version: 2.8.1+ga4eb71c (.NET 10.0.9)
Git version: 2.54.0.windows.1
Configuration
Dev: https://automatevalue-dev.crm4.dynamics.com/
✓ remy@automatevalue.com
Test: https://automatevalue-test.crm4.dynamics.com/
✗ Not authenticated
UAT: Not configured
Prod: https://automatevalue.crm4.dynamics.com/
✓ remy@automatevalue.com
──────────────────────────────────────────────────────────────────
Solution Dev Repo Test Prod
──────────────────────────────────────────────────────────────────
Cr07982 1.0.36 ──▶ 1.0.37 ⚠ ● ┈┈▶ ✗ auth ┈┈▶ 1.0.36 ↑
──────────────────────────────────────────────────────────────────
— not deployed ✗ auth failed ↑ behind ⚠ ahead ● uncommitted
Warning: an environment is ahead of an earlier stage — check the grid above.
The grid shows each solution's version across your pipeline, left to right in promotion order (Dev → Repo → Test → UAT → Prod). The arrows show how each stage compares to the one before it: green means caught up, cyan ↑ means behind (normal — just not promoted yet), red ⚠ means ahead (unexpected — usually something deployed out of band). A — means not deployed there yet, ✗ means the environment is configured but not authenticated, and ● flags uncommitted changes in that solution's repo folder. Environments without a configured URL are skipped entirely.
The line below the grid sums it up: a warning if something's out of order, a nudge to promote if environments are just behind, or All environments in sync. when everything matches.
Compares committed source against a live environment and reports components that are present there but not declared in source. Read-only — never deletes or modifies anything.
flowline drift prod
flowline drift dev
flowline drift test --solution ContosoCustomizations| Argument / Option | Description |
|---|---|
<target> |
Environment to compare against: prod, uat, test, dev, or a URL |
[solution] |
Solution to check (optional in project mode) |
Run it against prod/test as a standalone drift check, or against dev before sync/deploy as a preview of what the next run would flag. It reuses the same comparison deploy's orphan cleanup runs internally, just pointed at whichever environment you name and always in report-only mode.
Exits 0 when nothing is found, non-zero when drift is found or the check itself fails (e.g. connection or config errors) — same exit-code family deploy uses.
Known limitation: drift only detects components present in the target but not declared in your committed source (created directly there, or added since your last sync). It does not detect the opposite — something your source declares that was deleted directly in the target.