Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dotcms/dotcli

Package Overview
Dependencies
Maintainers
1
Versions
223
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotcms/dotcli - npm Package Compare versions

Comparing version 24.3.4-rc1 to 24.3.8-SANPSHOT

bin/dotcms-cli-24.03.08-SANPSHOT-linux-x86_64

8

package.json
{
"name": "@dotcms/dotcli",
"version": "24.03.04-rc1",
"version": "24.03.08-SANPSHOT",
"scripts": {

@@ -9,5 +9,5 @@ "postinstall": "node src/postinstall.js install",

"binaries": {
"dotcms-cli-darwin-arm64": "bin/dotcms-cli-24.03.04-SNAPSHOT-osx-aarch_64",
"dotcms-cli-darwin-x64": "bin/dotcms-cli-24.03.04-SNAPSHOT-osx-x86_64",
"dotcms-cli-linux-x64": "bin/dotcms-cli-24.03.04-SNAPSHOT-linux-x86_64"
"dotcms-cli-darwin-arm64": "bin/dotcms-cli-24.03.08-SANPSHOT-osx-aarch_64",
"dotcms-cli-darwin-x64": "bin/dotcms-cli-24.03.08-SANPSHOT-osx-x86_64",
"dotcms-cli-linux-x64": "bin/dotcms-cli-24.03.08-SANPSHOT-linux-x86_64"
},

@@ -14,0 +14,0 @@ "alias": "dotcli",

@@ -24,3 +24,3 @@ # dotCMS CLI

2. Configure the dotCMS instances you want to connect to using a dot-service.yml file. More details on how to do it [on this section](## CLI Instance Configuration). Make sure you make a site active in the yml file, otherwise you will have to active one using the [`instance` command](## Available Commands)
2. Configure the dotCMS instances you want to connect to using the `config` command. More details on how to do it on the [Configuration](#Configuration) section.

@@ -38,2 +38,3 @@ 3. Log in to the selected instance

|--------------------------------------------|-------------------------------------------------------------------------------------|
| [config](cli/docs/config.adoc) | Sets the initial configuration required by all commands to operate |
| [content-type](cli/docs/content-type.adoc) | Performs operations over content types. For example: pull, push, remove |

@@ -56,4 +57,18 @@ | [files](cli/docs/files.adoc) | Performs operations over files. For example: tree, ls, push |

1. Log in with an admin user
1. Run Configuration command to set the initial configuration required by all commands to operate
```shell script
config
Enter the key/name that will serve to identify the dotCMS instance (must be unique) [local].
The name is [local]
Enter the dotCMS base URL (must be a valid URL starting protocol http or https) [http://localhost:8080]
The URL is [http://localhost:8080]
Are these values OK? (Enter to confirm or N to cancel) (Y/n)
...
Do you want to continue adding another dotCMS instance? (Y/n)n
0. Profile [local], Uri [http://localhost:8080], active [no].
1. Profile [local#1], Uri [https://demo.dotcms.com], active [no].
One of these profiles needs to be made the current active one. Please select the number of the profile you want to activate. 1
```
2. Log in with an admin user
```shell script
login --user=admin@dotCMS.com --password

@@ -199,6 +214,6 @@ ```

## CLI Instance Configuration
## Configuration
The CLI can be used to manage multiple dotCMS instances. Each instance profile is defined in the `~/.dotcms/dot-service.yml` file.
Whatever profile is active will be used by the CLI to execute the commands.
Whatever profile is active will be used by the CLI to execute the commands on
The selected profile can be obtained by running the `status` command.

@@ -209,5 +224,7 @@ Here's an example of the default `dot-service.yml` file shipped with the CLI:

- name: "default"
url: "http://localhost:8080"
credentials:
user: "admin@dotcms.com"
- name: "demo"
url: "https://demo.dotcms.com"
active: true

@@ -218,19 +235,14 @@ credentials:

The profiles declared on this file are paired up with properties defined in an internal `application.properties` file.
Therefore, in order to add a new instance profile, you need to add a new entry in the `dot-service.yml` as it is shown on the example above.
The `active` attribute indicates which profile is currently active. The CLI will use the active profile to execute the commands.
If more than one profile is marked active, this will result in an InvalidStateException.
The `credentials` section is optional. If the credentials are not provided, the CLI will prompt the user to enter them when the `login` command is executed.
```properties
# Your configuration properties
dotcms.client.servers.default=http://localhost:8080/api
dotcms.client.servers.demo=https://demo.dotcms.com/api
```
If the `dot-service.yml` file does not exist, the CLI will prompt to create one No commands can operate without having a valid configuration in place.
Notice how the `dotcms.client.servers` property has a suffix matching the profile name in the `dot-service.yml` file.
The CLI provides a `config` command to set the initial configuration required by all commands to operate. The command will guide you through the process of adding a new instance profile to the `dot-service.yml` file. and setting the active profile.
See the [Configuration](cli/docs/config.adoc) section for more details. And the [Examples](#examples) section for a practical example.
Therefore, in order to add a new instance profile, you need to add a new entry in the `dot-service.yml` file and a new property extending the `application.properties` file.
Application properties can be extended via system properties, environment variables, `.env` file or in `$PWD/config/application.properties` file.
```shell script
To learn more about how to extend the `application.properties` file see the Quarkus configuration guide [Here](https://es.quarkus.io/guides/config-reference#application-properties-file)
In future versions this process will be facilitated by the CLI itself.
### Workspace

@@ -262,3 +274,3 @@

- In Your repository General Settings, Secrets and variables, Actions
- Create a new variable called `DOT_API_URL` and set the value to a valid dotCMS URL. e.g. `https://demo.dotcms.com/api`
- Create a new variable called `DOT_API_URL` and set the value to a valid dotCMS URL. e.g. `https://demo.dotcms.com`
![How to create a variable](doc_images/create_variable.png)

@@ -265,0 +277,0 @@ - Create a new secret called `DOT_TOKEN` and set the value to a valid dotCMS CLI token.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc