logo
logo

Sitecore Content Hub CLI changelog

This section documents all notable changes to the Command-line Interface (CLI).

[1.1.0]

Added

  • New serialization command group that allows developers to create, modify, and share resources:
    • initialize commands - make sure that the JSON schemas for the supported resource types are created.
    • pull commands - pull resources from Content Hub and persist them in the working directory.
    • validate commands - validate local resources.
    • compare commands - compare local resources.
    • push commands - push resources from working directory to the Content Hub instance.
    • package create command - creates a serialization package on the working directory.
    • package install command - installs a serialization package on the Content Hub instance.
Warning

JSON properties that contain references to IDs (like page component IDs) are not supported.

  • New entity print template command group that facilitates creating and editing entity print templates:

    • initialize command - initializes the working directory with a base template and files needed to support IntelliSense and JSON schema in Visual Studio Code.
    • pull command - pulls an entity print template from the Content Hub instance into the working directory.
    • validate command - validates an entity print template in the working directory.
    • push command - pushes a print template from the working directory to the Content Hub instance.
    • generate command - generates the specified entity print template against the specified entity and shows the final PDF.
  • New script debug command - facilitates debugging scripts from the working directory.

  • New script push command - facilitates pushing scripts to the Content Hub instance.

  • New script test command - facilitates executing unit tests for scripts.

Changed

  • Updated the CLI from .NET Core 3.1 to .NET 6 and therefore the .NET 6 SDK is now required for certain operations that previously required the .NET Core 3.1 SDK.

Breaking changes

  • Command handlers registration:

    ...
    // registers a command handler with options and arguments nested in a separate class.
    services.AddCommandHandler<MyCommandHandler, MyCommandParameters>();
    
    // registers a command handler.
    services.AddCommandHandler<MyCommandHandler>();
    ...
  • IConsoleWrapper.CursorLeft has been marked as obsolete and will be removed in a future release.

  • IConsoleWrapper.CursorVisible has been marked as obsolete and will be removed in a future release.
  • IConsoleWrapper.GetActualOutputMode has been removed without replacement.
  • IOutputRenderer.RenderTable(GridView header, GridView body) has been replaced with the more generic IOutputRenderer.RenderView(IRenderable view).
  • IOutputRenderer.RenderView(View view, bool useScrollingRegion = true) has been replaced with the more generic IOutputRenderer.RenderView(IRenderable view).

See Create a command for more information.

[1.0.0]

Added

  • New scripting command group that facilitates editing, compilation, publishing, and execution of scripts:

    • initialize command - initializes the script working folder with the files needed to support IntelliSense in Visual Studio Code.
    • pull command - pulls the specified scripts from Content Hub and stores them in the script working folder.
    • watch command - watches the script working folder for changes and pushes those changes to the Content Hub instance.
    • enable command - enables a script in the selected Content Hub instance.
    • disable command - disables a script in the selected Content Hub instance.
    • execute command - executes the specified script in the Content Hub instance.
  • New content command group that allows users to perform operations like data import:

    • import command - imports data into the selected Content Hub instance.
  • Endpoint refresh command - refreshes the connection to the active or specified endpoint.

Changed

Fixed

[0.9.0-preview]

Initial release of the Content Hub CLI. The CLI works on Content Hub 3.3.0 or later:

  • Monitor jobs, order, and queues.
  • Ability to import/export packages (requires Content Hub 4.0 or later).

Can we improve this article ? Provide feedback