id = "pac" name = "Microsoft Power Platform CLI" homepage = "https://learn.microsoft.com/power-platform/developer/cli/introduction" description = "A simple, one-stop developer CLI that empowers developers and ISVs to perform various operations in Microsoft Power Platform." # The Power Platform mark, from Microsoft's own Power Platform hub. icon = "https://learn.microsoft.com/en-us/power-platform/media/hub-page/power-platform.svg" executables = ["pac"] [dotfiles] # pac keeps no user-written configuration. What it puts in its application # directory is the auth profiles below, an MSAL token cache, and # usersettings.json — a generated telemetry uniqueId plus a telemetry on/off # flag, which belongs to the install rather than to the user. paths = [] exclude = [] # The auth profiles created by `pac auth create`, which the docs describe as # "authentication profiles stored on this computer". For a service principal # profile these carry the applicationId, tenant and client secret; for a user # profile, the account and environment they authenticate. # # pac itself is closed source, so the paths come from Microsoft's own VS Code # extension, which watches the files to keep its auth panel in sync — # src/client/lib/AuthPanelView.ts, `GetAuthProfileWatchPattern()`: # win32 -> join(LOCALAPPDATA, "Microsoft", "PowerAppsCli"), "authprofiles*.json" # linux | darwin -> join(HOME, ".local", "share", "Microsoft", "PowerAppsCli"), "authprofiles*.json" # https://github.com/microsoft/powerplatform-vscode/blob/main/src/client/lib/AuthPanelView.ts # # The same directory is confirmed by that repository's # src/client/telemetry/localfileusersettings.ts, whose comment reads # "Application Path and User settings file name should be consistent with CLI". # # The glob is the extension's own: the file has been versioned in place # (authprofiles.json, then authprofiles_v2.json), and naming one spelling would # leave the other syncing in the clear. # # Both paths stay literal. macOS does use the dotted spelling, so [dataHome] # — ~/Library/Application Support there — would be wrong; but [xdgData] is # wrong too, because it means $XDG_DATA_HOME with ~/.local/share only as its # default, and the join above takes HOME without consulting the variable. On a # machine that sets $XDG_DATA_HOME the placeholder would point away from the # profiles and this rule would stop covering them, which for a credential file # is the failure that matters. secret = [ "~/.local/share/Microsoft/PowerAppsCli/authprofiles*.json", "%LOCALAPPDATA%/Microsoft/PowerAppsCli/authprofiles*.json", ] [commands] format = 1 label = "Power Platform solutions" description = "Authenticate and move Dataverse solutions in and out of an environment. Secrets (passwords, client secrets, certificates) are left out; other pac commands are not covered." quality = "ai-draft" base = "fig:pac" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/pac.ts" license = "MIT" [[commands.subcommand]] path = ["auth", "create"] label = "Create auth profile" description = "Sign in interactively or with device code." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/pac.ts" license = "MIT" [[commands.subcommand.field]] id = "name" label = "Profile name" type = "string" option = ["--name", "-n"] sources = ["fig"] [[commands.subcommand.field]] id = "url" label = "Environment URL" type = "string" option = ["--url", "-u"] sources = ["fig"] [[commands.subcommand.field]] id = "environment" label = "Default environment" type = "string" option = ["--environment"] sources = ["fig"] [[commands.subcommand.field]] id = "kind" label = "Kind" type = "string" option = ["--kind", "-k"] sources = ["fig"] [[commands.subcommand.field]] id = "tenant" label = "Tenant ID" type = "string" option = ["--tenant", "-t"] sources = ["fig"] [[commands.subcommand.field]] id = "cloud" label = "Cloud" type = "string" option = ["--cloud"] suggestions = [{ value = "Public", label = "Public" }, { value = "Preprod", label = "Preprod" }, { value = "Test", label = "Test" }, { value = "UsGov", label = "UsGov" }, { value = "UsGovHigh", label = "UsGovHigh" }, { value = "UsGovDod", label = "UsGovDod" }, { value = "China", label = "China" }] sources = ["fig"] [[commands.subcommand.field]] id = "device_code" label = "Device code sign-in" type = "boolean" option = ["--deviceCode"] sources = ["fig"] [[commands.subcommand.task]] id = "create" label = "Sign in" fields = ["name", "url", "cloud", "device_code"] required = ["url"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["name", "url", "environment", "kind"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["tenant", "cloud", "device_code"] [[commands.subcommand]] path = ["solution", "export"] label = "Export a solution" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/pac.ts" license = "MIT" [[commands.subcommand.field]] id = "name" label = "Solution name" type = "string" option = ["--name", "-n"] sources = ["fig"] [[commands.subcommand.field]] id = "path" label = "Output zip path" type = "path" option = ["--path", "-p"] path = { kind = "file", role = "output" } sources = ["fig"] [[commands.subcommand.field]] id = "managed" label = "Managed" type = "boolean" option = ["--managed", "-m"] sources = ["fig"] [[commands.subcommand.field]] id = "async" label = "Asynchronous" type = "boolean" option = ["--async", "-a"] sources = ["fig"] [[commands.subcommand.field]] id = "overwrite" label = "Overwrite existing zip" type = "boolean" option = ["--overwrite"] effect = "overwrite" sources = ["fig"] [[commands.subcommand.task]] id = "export" label = "Export" fields = ["name", "path", "managed", "async", "overwrite"] required = ["name"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["name", "path", "managed", "async", "overwrite"] [[commands.subcommand]] path = ["solution", "import"] label = "Import a solution" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/pac.ts" license = "MIT" [[commands.subcommand.field]] id = "path" label = "Solution zip" type = "path" option = ["--path", "-p"] path = { kind = "file", role = "input" } sources = ["fig"] [[commands.subcommand.field]] id = "activate_plugins" label = "Activate plug-ins" type = "boolean" option = ["--activate-plugins"] sources = ["fig"] [[commands.subcommand.field]] id = "force_overwrite" label = "Force overwrite of unmanaged customizations" type = "boolean" option = ["--force-overwrite", "-f"] effect = "overwrite" sources = ["fig"] [[commands.subcommand.field]] id = "publish_changes" label = "Publish after import" type = "boolean" option = ["--publish-changes"] sources = ["fig"] [[commands.subcommand.field]] id = "async" label = "Asynchronous" type = "boolean" option = ["--async", "-a"] sources = ["fig"] [[commands.subcommand.field]] id = "convert_to_managed" label = "Convert to managed" type = "boolean" option = ["--convert-to-managed"] sources = ["fig"] [[commands.subcommand.task]] id = "import" label = "Import" fields = ["path", "activate_plugins", "publish_changes", "async"] required = ["path"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["path", "activate_plugins", "force_overwrite", "publish_changes", "async"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["convert_to_managed"] [[commands.subcommand]] path = ["solution", "unpack"] label = "Unpack a solution" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/pac.ts" license = "MIT" [[commands.subcommand.field]] id = "zipfile" label = "Solution zip" type = "path" option = ["--zipfile", "-z"] path = { kind = "file", role = "input" } sources = ["fig"] [[commands.subcommand.field]] id = "folder" label = "Target folder" type = "path" option = ["--folder", "-f"] path = { kind = "directory", role = "output" } sources = ["fig"] [[commands.subcommand.field]] id = "packagetype" label = "Package type" type = "string" option = ["--packagetype", "-p"] suggestions = [{ value = "Unmanaged", label = "Unmanaged" }, { value = "Managed", label = "Managed" }, { value = "Both", label = "Both" }] sources = ["fig"] [[commands.subcommand.field]] id = "allow_write" label = "Allow writes" type = "boolean" option = ["--allowWrite"] effect = "overwrite" sources = ["fig"] [[commands.subcommand.field]] id = "allow_delete" label = "Allow deletes" type = "boolean" option = ["--allowDelete"] effect = "delete" sources = ["fig"] [[commands.subcommand.field]] id = "clobber" label = "Overwrite read-only files" type = "boolean" option = ["--clobber", "-c"] effect = "overwrite" sources = ["fig"] [[commands.subcommand.task]] id = "unpack" label = "Unpack" fields = ["zipfile", "folder", "packagetype"] required = ["zipfile", "folder"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["zipfile", "folder", "packagetype", "allow_write", "allow_delete"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["clobber"] [[commands.subcommand]] path = ["solution", "pack"] label = "Pack a solution" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/pac.ts" license = "MIT" [[commands.subcommand.field]] id = "zipfile" label = "Solution zip" type = "path" option = ["--zipfile", "-z"] path = { kind = "file", role = "output" } sources = ["fig"] [[commands.subcommand.field]] id = "folder" label = "Source folder" type = "path" option = ["--folder", "-f"] path = { kind = "directory", role = "input" } sources = ["fig"] [[commands.subcommand.field]] id = "packagetype" label = "Package type" type = "string" option = ["--packagetype", "-p"] suggestions = [{ value = "Unmanaged", label = "Unmanaged" }, { value = "Managed", label = "Managed" }, { value = "Both", label = "Both" }] sources = ["fig"] [[commands.subcommand.field]] id = "clobber" label = "Overwrite read-only files" type = "boolean" option = ["--clobber", "-c"] effect = "overwrite" sources = ["fig"] [[commands.subcommand.task]] id = "pack" label = "Pack" fields = ["zipfile", "folder", "packagetype", "clobber"] required = ["zipfile", "folder"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["zipfile", "folder", "packagetype", "clobber"]