My command to import all data excluding rules (as I want to do these last) sq sync in backup -t schemas workflows app content
CLI Response. Unrecognized command or argument 'workflows'
Help text provided by CLI showing workflows as an option. .\sq.exe sync in --help Imports the app from a folder Usage: sq.exe sync in [options] [arguments] Arguments: folder <TEXT> The target folder to synchronize. Options: -t | --targets (Multiple) <TEXT> The targets to sync, e.g. schemas, workflows, app, rules. --nodelete Use this flag to prevent deletions.
Could you please improve this documentation.
Example usage with multiple targets (should they be comma separated? multiple -t ? etc)
List all available targets for the command ideally in a table with description pointing to section of CMS
Unclear which one of the listed targets imports content
As I mentioned: The documentation will be improved, but the CLI exposes all commands. for example
.\sq.exe
Required command was not provided
Usage: dotnet sq.dll [command]
Commands:
apps Manages apps.
assets Manages assets.
backup Manage backups.
config Manage configurations.
content Manage contents.
info Shows information about the CLI.
log Analyze request log.
openlib Openlibrary example.
schemas Manage schemas.
sync Synchronizes apps.
twitter Manage twitter.
Use "dotnet sq.dll [command] --help" for more information about a command.
Then you can dig in
.\sq.exe sync
Required command was not provided
Synchronizes apps.
Usage: dotnet sq.dll sync [command]
Commands:
describe Describe the synced folder.
in Imports the app from a folder.
new Creates a new folder with sample files how to create an app from json files.
out Exports the app to a folder.
targets List all targets.
Use "dotnet sq.dll sync [command] --help" for more information about a command.
And get the targets
.\sq.exe sync targets
(I just added the description, so the output will look differently)
-------------------------------------------------------------------------------------------------------------------------------
| Name | Description |
-------------------------------------------------------------------------------------------------------------------------------
| assetfolders | Synchronizes all asset folders, even if they do not contain assets. |
-------------------------------------------------------------------------------------------------------------------------------
| assets | Synchronizes all assets and creates asset folders if they do not exist yet. |
-------------------------------------------------------------------------------------------------------------------------------
| schemas | Synchronizes all schemas, but not the content. |
-------------------------------------------------------------------------------------------------------------------------------
| app | Synchronize all app settings: clients, contributors, roles, languages and asset scripts. But not: workflows. |
-------------------------------------------------------------------------------------------------------------------------------
| contents | Synchronizes all content items across all schemas. |
-------------------------------------------------------------------------------------------------------------------------------
| rules | Synchronizes all rules, but not rule events. |
-------------------------------------------------------------------------------------------------------------------------------
| workflows | Synchronizes all workflows from the app settings. |
-------------------------------------------------------------------------------------------------------------------------------
Count: 7
Or you use --help for a single command:
.\sq.exe sync in --help
Imports the app from a folder.
Usage: dotnet sq.dll sync in [options] <folder>
Arguments:
folder <TEXT>
The target folder to synchronize.
Options:
--app <TEXT>
The name of the app. If not provided then app configured in currentApp gets created.
-t | --targets (Multiple) <TEXT>
The targets to sync, e.g. 'contents' or 'schemas'. Use 'sync targets' to view all targets.
--language (Multiple) <TEXT>
The content language to synchronize.
--content-action <CONTENTACTION>
Defines how to handle content.
Allowed values: Upsert, UpsertPatch, Create, Update, Patch
--delete
Use this flag to also delete entities.
--patch-content
Make content updates as patch.
--recreate
Use this flag to also recreate entities.
--skip-assets
Use this flag to sync asset folders but not assets.
--update-current-client
Also update the client that is used during the sync process.
--emulate
Use this flag to not make any updates and to emulate the changes.
out of curiosity when would you want to sync folders but not assets? Especially since the assets command syncs folders.
Thanks for the update. Hoping in a years time when i have to use it again the documentation is in sync with the CLI. I don’t have the CLI setup on my machine so I end up making changes in our pipeline and having to wait for the result.
Can i sneak in a feature request that the CLI doesn’t require a config to run? I would much rather set environment variables for ClientID and ClientSecret and have it run from that. We run it in CI to sync our schemas etc so we end up having to setup a new config every time we use the CLI in the pipeline