Introducing dotCLI: Streamline Development and CI/CD Workflows in dotCMS

20 views
Skip to first unread message

Freddy Montes

unread,
Nov 8, 2024, 2:21:36 PMNov 8
to dotCMS User Group

We’re excited to announce the launch of dotCLI, a command-line tool that brings automation and control to your dotCMS development workflows. Built for developers, dotCLI simplifies deployments, enables efficient management of content assets, and enhances CI/CD integrations, all from your terminal. Here’s what dotCLI brings to the table.

Key Features of dotCLI
  1. Automated Asset Synchronization
    With dotCLI, you can push and pull file assets, content types, languages, and sites (including site variables) between your local workspace and a dotCMS environment. This capability ensures that changes are synchronized and deployments stay streamlined, especially across multiple environments.

  2. Robust CI/CD Integration
    dotCLI integrates seamlessly into CI/CD workflows. It allows for automated deployment tasks via GitHub Actions, where you can sync repositories and dotCMS environments based on commit triggers. For instance, you can automate pushes from a Git repo to a target dotCMS instance, enhancing deployment reliability.

  3. Content Versioning and Workspace Management
    dotCLI separates “Content” from “Code and Configuration,” making it easier to manage and version content changes independent of code updates. Workspaces in dotCLI reflect the structure of your dotCMS instance, with designated directories for content types, assets, languages, and sites. This organization allows you to script updates confidently, knowing your workspace is always in sync with your target environment.

  4. Scriptable CLI for Repeatable Tasks
    For those frequently run tasks, dotCLI enables script automation, saving you time and reducing errors. Write scripts to automate tasks like pulling latest content assets or pushing site variables across multiple environments. This flexibility in scripting boosts consistency and efficiency across development workflows.

  5. Replacing Legacy Tools
    dotCLI replaces both WebDAV and the Bash CLI, offering expanded functionality. Future updates will focus on dotCLI, phasing out WebDAV as new features are released.

Setup and Getting Started

dotCLI is available now and is simple to install:

```npm install -g @dotcms/dotcli```

Once installed, configure your dotCMS instance in dotCLI. Here’s a quick guide:

  1. Run dotcli config to set up your instance.
  2. Use dotcli login -u <username> -p to sign in securely.
  3. Start managing your workspace with commands like dotcli push and dotcli pull.
Current Limitations

dotCLI currently supports file assets but cannot yet push/pull pages, users, or site settings. Additionally, Windows users will need to use Windows Subsystem for Linux (WSL) or Docker, as direct Windows support is not available.

Documentation and Community

Visit our dotCLI documentation for command references and detailed setup instructions. For GitHub Actions examples, check out our GitHub repo.

We look forward to your feedback as you integrate dotCLI into your workflows!

Reply all
Reply to author
Forward
0 new messages