16.3.13 • Published 4 days ago

@adobe/aem-cli v16.3.13

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 days ago

AEM Command Line Interface (aem)

Status

codecov GitHub Actions Workflow Status GitHub license GitHub issues

The AEM Command Line Interface allows web developers to create, develop, and deploy digital experiences using the Adobe Experience Manager Sites feature Edge Delivery Services. Some of this functionality was known as Franklin or Project Helix before.

Installation

Install aem as a global command. You need Node 12.11 or newer.

npm install -g @adobe/aem-cli

Quick Start

$ aem --help
Usage: aem <command> [options]

Commands:
  aem up  Run a AEM development server

Options:
  --version                Show version number                         [boolean]
  --log-file, --logFile    Log file (use "-" for stdout)  [array] [default: "-"]
  --log-level, --logLevel  Log level
        [string] [choices: "silly", "debug", "verbose", "info", "warn", "error"]
                                                               [default: "info"]
  --tls-key, --tlsKey      Path to .key file (for enabling TLS)        [string]
  --tls-cert, --tlsCert    Path to .pem file (for enabling TLS)        [string]
  --help                   Show help                                   [boolean]

use <command> --help to get command specific details.

for more information, find our manual at https://github.com/adobe/helix-cli

Starting development

$ cd <my-cool-project>
$ aem up

automatically open the browser

The --open argument takes a path, eg --open=/products/, will cause the browser to be openend at the specific location. Disable with --no-open'.

setting up a self-signed cert for using https

  1. create the certificate
$ openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out server.crt -keyout server.key -subj "/CN=localhost"

this will create 2 files: server.crt and server.key

  1. start aem with tls support
$ aem up --tls-cert server.crt --tls-key server.key
    ___    ________  ___                          __      __ v14.26.1
   /   |  / ____/  |/  /  _____(_)___ ___  __  __/ /___ _/ /_____  _____
  / /| | / __/ / /|_/ /  / ___/ / __ `__ \/ / / / / __ `/ __/ __ \/ ___/
 / ___ |/ /___/ /  / /  (__  ) / / / / / / /_/ / / /_/ / /_/ /_/ / /
/_/  |_/_____/_/  /_/  /____/_/_/ /_/ /_/\__,_/_/\__,_/\__/\____/_/

info: Starting AEM dev server v14.26.1
info: Local AEM dev server up and running: https://localhost:3000/
  1. (optional) Add arguments to .env file:
$ echo -e "AEM_TLS_CERT=server.crt\nAEM_TLS_KEY=server.key" >> .env

environment

All the command arguments can also be specified via environment variables. the .env file is loaded automatically.

example:

.env

AEM_OPEN=/products
AEM_PORT=8080
AEM_PAGES_URL=https://stage.myproject.com

HTTP Proxy

In order to use a HTTP proxy (eg behind a corporate firewall), you can set the respective environment variables:

NO_PROXY is a list of host names (optionally with a port). If the input URL matches any of the entries in NO_PROXY, then the input URL should be fetched by a direct request (i.e. without a proxy).

Matching follows the following rules:

NO_PROXY=* disables all proxies. Space and commas may be used to separate the entries in the NO_PROXY list. If NO_PROXY does not contain any entries, then proxies are never disabled. If a port is added after the host name, then the ports must match. If the URL does not have an explicit port name, the protocol's default port is used. Generally, the proxy is only disabled if the host name is an exact match for an entry in the NO_PROXY list. The only exceptions are entries that start with a dot or with a wildcard; then the proxy is disabled if the host name ends with the entry. See test.js for examples of what should match and what does not.

*_PROXY The environment variable used for the proxy depends on the protocol of the URL. For example, https://example.com uses the "https" protocol, and therefore the proxy to be used is HTTPS_PROXY (NOT HTTP_PROXY, which is only used for http:-URLs).

If present, ALL_PROXY is used as fallback if there is no other match.

Global

optionvariabledefaultdescription
--log-fileAEM_LOG_FILE-Log file. use - to log to stdout
--log-levelAEM_LOG_LEVELinfoLog level

Up command

optionvariabledefaultdescription
--portAEM_PORT3000Development server port
--addrAEM_ADDR127.0.0.1Development server bind address
--livereloadAEM_LIVERELOADtrueEnable automatic reloading of modified sources in browser.
--no-livereloadAEM_NO_LIVERELOADfalseDisable live-reload.
--openAEM_OPEN/Open a browser window at specified path after server start.
--no-openAEM_NO_OPENfalseDisable automatic opening of browser window.
--tls-keyAEM_TLS_KEYundefinedPath to .key file (for enabling TLS)
--tls-certAEM_TLS_CERTundefinedPath to .pem file (for enabling TLS)

Developing AEM CLI

Testing

You can use npm run check to run the tests and check whether your code adheres to the aem-cli coding style.

16.3.13

4 days ago

16.3.12

5 days ago

16.3.11

6 days ago

16.3.10

11 days ago

16.3.9

22 days ago

16.3.8

25 days ago

16.3.7

27 days ago

16.3.6

27 days ago

16.3.5

1 month ago

16.3.4

1 month ago

16.3.3

1 month ago

16.3.2

1 month ago

16.3.1

2 months ago

16.3.0

2 months ago

16.2.14

2 months ago

16.2.13

2 months ago

16.2.12

2 months ago

16.2.11

2 months ago

16.2.10

2 months ago

16.2.9

2 months ago

16.2.8

2 months ago

16.2.7

3 months ago

16.2.6

3 months ago

16.2.5

3 months ago

16.2.4

3 months ago

16.2.3

3 months ago

16.2.2

3 months ago

16.2.1

3 months ago

16.2.0

4 months ago

16.1.6

4 months ago

16.1.5

4 months ago

16.1.4

5 months ago

16.1.3

5 months ago

16.1.1

6 months ago

16.1.0

6 months ago

16.1.2

5 months ago

16.0.8

6 months ago

16.0.7

6 months ago

16.0.6

6 months ago

16.0.5

6 months ago

16.0.4

6 months ago

16.0.3

6 months ago

16.0.2

7 months ago

16.0.1

7 months ago

16.0.0

7 months ago

15.0.2

7 months ago

15.0.1

7 months ago

15.0.0

7 months ago

14.26.1

7 months ago