+------------------------+
| Metadata               |
+----------+-------------+
| Template | guides      |
+----------+-------------+
| Category | Build       |
+----------+-------------+
| Image    | ![][image0] |
+----------+-------------+

+-------------------+
| Section Metadata  |
+---------+---------+
| style   | content |
+---------+---------+

![][image0]

# aem Command Line Reference

## **Installation**

```
$ npm install -g @adobe/aem-cli
```

## **Usage**

```
$ aem --help
```

Help output:

```
Usage: aem <command> [options]

Commands:
  aem up       Run a AEM development server
  aem import   Run the AEM import server
  aem content  Manage AEM content from da.live



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"]
  --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
```

## **Available Commands**

- [up](#up)
- [import](#import)
- [content](#content)

### **up**

#### **Server Options**

- `--port`\
  Start development server on port\
  Default: `3000`
- `--addr`\
  Bind development server on address. Use `*` to bind to any address and allow external connections.\
  Default: `"127.0.0.1"`
- `--stop-other`, `--stopOther`\
  Stop other AEM CLI running on the above port\
  Default: `true`
- `--tls-cert`, `--tlsCert`\
  File location for your `.pem` file for local TLS support
- `--tls-key`, `--tlsKey`\
  File location for your `.key` file for local TLS support

#### **AEM Options**

- `--url`, `--pagesUrl`, `--pages-url`\
  The origin URL to fetch content from.
- `--livereload`\
  Enable automatic reloading of modified sources in the browser.\
  Default: `true`
- `--no-livereload`, `--noLiveReload`\
  Disable live-reload
- `--open`\
  Open a browser window at specified path\
  Default: `"/"`
- `--no-open`, `--noOpen`\
  Disable automatic opening of browser window
- `--print-index`, `--printIndex`\
  Prints the indexed records for the current page.\
  Default: `false`
- `--cache`
- `--forward-browser-logs, -–forwardBrowserLogs`\
  Forward browser console logs to terminal\
  Default: `false`

#### **Options**

- `--version`\
  Show version number\
  Default: `boolean`
- `--log-file`, `--logFile`\
  Log file (use `"-"` for stdout)\
  Default: `"-"`
- `--log-level`, `--logLevel`\
  Log level\
  Choices: `"silly"`, `"debug"`, `"verbose"`, `"info"`, `"warn"`, `"error"`\
  Default: `"info"`
- `--site-token, --siteToken          `\
  Site token to be used by the cli to access the website
- `--alpha-cache`, `--alphaCache`\
  Path to local folder to cache the responses (alpha feature, may be removed without notice)
- `--allow-insecure`, `--allowInsecure`\
  Whether to allow insecure requests to the server\
  Default: `false`
- `--cookies`\
  Proxy all cookies in requests. By default, only the hlx-auth-token cookie is proxied.\
  Default: `false`
- `--html-folder, --htmlFolder`\
  Serve HTML files from this folder without extensions (e.g., /folder/file serves folder/file.html or folder/file.plain.html) use this to preview content changes if you do not have access to the authoring system. Can be helpful for [Developing with AI Tools](https://www.aem.live/developer/ai-coding-agents)
- `--help`\
  Show help\
  Default: `boolean`

### **import**

#### **Server Options**

- `--port`\
  Start import server on port\
  Default: `3001`
- `--addr`\
  Bind import server on address. Use `*` to bind to any address and allow external connections.\
  Default: `"127.0.0.1"`
- `--stop-other`, `--stopOther`\
  Stop other AEM CLI running on the above port\
  Default: `true`
- `--tls-cert`, `--tlsCert`\
  File location for your `.pem` file for local TLS support
- `--tls-key`, `--tlsKey`\
  File location for your `.key` file for local TLS support

#### **AEM Importer Options**

- `--open`\
  Open a browser window at specified path\
  Default: `"/tools/importer/helix-importer-ui/index.html"`
- `--no-open`, `--noOpen`\
  Disable automatic opening of browser window
- `--cache`\
  Path to local folder to cache the responses
- `--ui-repo`, `--uiRepo`\
  Git repository for the AEM Importer UI. A fragment may indicate a branch other than `main`.\
  Default: `"https://github.com/adobe/helix-importer-ui"`
- `--skip-ui`, `--skipUI`\
  Do not install the AEM Importer UI\
  Default: `false`
- `--headers-file`, `--headersFile`\
  Location of a custom `.json` file containing headers to be used with all proxy requests

### **content**

The `content` command set lets you check out your da.live content into a local `content/` folder, edit it offline, inspect and merge changes against the remote, and push updates back. It follows a git-like workflow (stage, commit, push) and uses an internal git repository inside `content/` to track your edits.

Typical workflow:

```
$ aem content clone            # fetch remote content into ./content
$ # edit files under ./content
$ aem content status           # see what changed
$ aem content diff             # compare local vs remote
$ aem content add <path>       # stage changes
$ aem content commit -m "..."  # commit staged changes
$ aem content push             # upload to da.live
```

When `content/` is present, `aem up` automatically serves matching paths from it, so you can preview local edits before pushing.

#### **Authentication**

The `content` commands authenticate against da.live using Adobe IMS. On first use, a browser window opens for you to sign in; after a successful login the callback redirects to `https://tools.aem.live/cli/logged-in`. The resulting token is cached locally (in the project's `.hlx/` folder, alongside the site token) and reused on subsequent invocations.

- `--token`\
  &#x20;IMS token to use instead of the interactive browser flow. Useful for CI / non-interactive environments.

#### **Subcommands**

- `content clone`
- `content status`
- `content diff`
- `content merge`
- `content add`
- `content commit`
- `content push`

#### **content clone**

Downloads da.live sources into `./content/`, initializes a git repository with a baseline commit, writes a `.da-config.json` (org, repo, root path) inside `content/`, and records initial sync state.

Options:

- `--path`\
  &#x20;Path prefix to clone. Recommended for large sites to limit the scope of the initial clone.
- `--force`\
  &#x20;Overwrite an existing local `content/` folder.
- `--yes`\
  &#x20;Skip the confirmation prompt for large clones. Required in non-interactive environments (e.g. CI) when the clone exceeds the size threshold.
- `--token`\
  &#x20;IMS token (see Authentication).

#### **content status**

Lists added, modified, and deleted files under `content/` relative to the last sync — similar to `git status`, but scoped to content rather than code.

#### **content diff**

Shows the diff between your local working tree and the remote on da.live.

Options:

- `--path`\
  &#x20;Limit the diff to a specific path. If omitted, all changed paths are included.

#### **content merge**

Merges remote content into local files when both sides have changed.

Options:

- `--path`\
  &#x20;Merge a specific path. If omitted, all paths with conflicts are merged.

#### **content add**

Stages one or more paths so they will be included in the next commit. Works like `git add`.

Usage:

```
$ aem content add <path> [<path> ...]
```

#### **content commit**

Commits the currently staged changes with a message. Works like `git commit`.

Options:

- `-m`, `--message`\
  &#x20;Commit message. Required.

#### **content push**

Uploads committed changes from `content/` to da.live. You must `content add` and `content commit` first.

Options:

- `--path`\
  &#x20;Limit the push to a specific path.
- `--dry-run`\
  &#x20;Show what would be uploaded / deleted without making any changes on da.live.
- `--force`\
  &#x20;Proceed even when the remote has diverged. Use with care — this can overwrite remote changes.
- `--token`\
  &#x20;IMS token (see Authentication).

#### **Options**

- `--version`\
  Show version number\
  Default: `boolean`
- `--log-file`, `--logFile`\
  Log file (use `"-"` for stdout)\
  Default: `"-"`
- `--log-level`, `--logLevel`\
  Log level\
  Choices: `"silly"`, `"debug"`, `"verbose"`, `"info"`, `"warn"`, `"error"`\
  Default: `"info"`
- `--dump-headers, --dumpHeaders`\
  Dump request headers to console for debugging\
  Default: `false`
- `--allow-insecure`, `--allowInsecure`\
  Whether to allow insecure requests to the server\
  Default: `true`
- `--help`\
  Show help\
  Default: `boolean`

[image0]: https://main--helix-website--adobe.aem.page/media_130390ea6c8366c27bfda6908b30667a11e564fc6.png#width=1600&height=1200
