Loading...
Loading...
Reference for the Adobe AEM CLI (@adobe/aem-cli, formerly the helix-cli npm package; commands `aem up`, `aem import`, `aem content`) — installation, the local Edge Delivery dev server, .env / AEM_* configuration, HTTPS/TLS, proxy & certificate trust, content sync with da.live, and troubleshooting. Use when installing, running, or configuring the aem/hlx CLI, when `aem up` fails (port conflicts, cert errors, proxy 404s, pipeline vs. local-file confusion), or when migrating from the old helix-cli package. Do NOT use for da.live content-format rules or the DA Source API contract (use da-content); do NOT use for writing EDS block code (use content-driven-development).
npx skill4agent add adobe/skills aem-cliaem upaem importaem contentaemhlxhelix-cli@adobe/aem-cli[verified]# Global install
npm install -g @adobe/aem-cli
# One-off via npx (no global install needed)
npx -y @adobe/aem-cli upaem --version # or: hlx --versionnpm install -g @adobe/aem-cliFile exists: …/hlx@adobehelix-cli[verified]npm uninstall -g @adobe/helix-cli
npm install -g @adobe/aem-clihlxaemaem-clihlxaem upaem up --no-open --forward-browser-logscurl -s -o /dev/null -w "%{http_code}" http://localhost:3000
# Expected: 200| Flag | What it does |
|---|---|
| Do not open a browser window on startup |
| Forward browser console messages (log, error, warn, info) to the terminal |
| Listen on a different port (default: |
| Bind address; use |
| Origin URL to proxy content from (overrides the project's default pages URL) |
| Serve local HTML files from |
| URL path where |
| Disable automatic browser reload on file changes |
| Stop another AEM CLI instance on the same port before starting (default: true) |
| Path to |
| Path to |
| Allow insecure (self-signed cert) requests to the upstream server |
| Print indexed records for the current page (debugging) |
| Site token for CLI access to the website |
| Proxy all cookies (default: only |
--html-folder[verified]aem up --html-folder drafts --no-open --forward-browser-logs
# Files in ./drafts/ are served at /drafts/<name> (no extension needed).env.env[verified]# .env example
AEM_PORT=8080
AEM_PAGES_URL=https://stage.myproject.com
AEM_FORWARD_BROWSER_LOGS=true
AEM_HTML_FOLDER=drafts
AEM_TLS_CERT=server.crt
AEM_TLS_KEY=server.key
AEM_OPEN=/productsAEM_*mkcertbrew install mkcertchoco install mkcertgo install filippo.io/mkcert@latestmkcert -install # one-time CA install
mkcert -cert-file server.crt -key-file server.key localhost 127.0.0.1
aem up --tls-cert server.crt --tls-key server.keyopenssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes \
-out server.crt -keyout server.key -subj "/CN=localhost"
aem up --tls-cert server.crt --tls-key server.keyAEM_TLS_CERT=server.crt
AEM_TLS_KEY=server.keyaem upunable to get local issuer certificate# macOS / Linux
export NODE_EXTRA_CA_CERTS=/path/to/corporate-ca.crt
aem up
# Windows
set NODE_EXTRA_CA_CERTS=./certs/corporate-ca.pem
aem upNODE_EXTRA_CA_CERTS.env| Variable | Purpose |
|---|---|
| Proxy for HTTP requests |
| Proxy for HTTPS requests |
| Fallback for either protocol |
| Comma-separated hosts to bypass; |
aem importaem import # opens Importer UI in browser at port 3001
aem import --no-open # headless / background start
aem import --port 3002 # different port| Flag | Default | What it does |
|---|---|---|
| | Import server port |
| — | Do not open the browser window |
| | Allow self-signed certs on the proxied site |
| helix-importer-ui repo on GitHub | Custom Importer UI repo |
| | Skip downloading/installing the UI |
| — | JSON file of custom headers for proxy requests |
| — | Cache proxied responses to a local folder |
| | Print request headers to console for debugging |
| — | TLS for the import server itself (see §4) |
import.jsaem contentaem content clone [--path /] # auth via browser popup; clones into ./content/
aem content status # show added / modified / deleted files
aem content diff [path] # diff local vs remote
aem content merge [path] # sync remote changes into local files
aem content add <files..> # stage changes (like git add)
aem content commit -m "..." # commit staged changes (like git commit)
aem content push # upload committed changes to da.live
aem content push --force # overwrite remote on conflict.hlx/.da-token.jsonTOKEN=$(jq -r .access_token .hlx/.da-token.json)aem content push[verified]curl -sI https://content.da.live/<org>/<repo>/path/to/image.png | grep -i "content-type"TOKEN=$(jq -r .access_token .hlx/.da-token.json)
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: image/png" \
--data-binary @./image.png \
"https://admin.da.live/source/<org>/<repo>/path/to/image.png"<span class="icon icon-X">[verified]curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: text/html" \
--data-binary @./page.html \
"https://admin.da.live/source/<org>/<repo>/path/to/page.html"| Symptom | Cause | Fix |
|---|---|---|
| old | uninstall the old package (see §1) then reinstall |
| Port 3000 is taken | Pass |
| Corporate proxy intercepts TLS | Export corp CA cert → |
| Local HTML file in | Add |
| Wrong origin URL proxied | Pass |
| CLI silently no-ops on binaries | Upload binary via DA Source API (see §7) |
| Pre-upload normalization removes EDS decorations | POST directly to DA Source API for byte-faithful upload |
| Port 3001 in use, or UI download failed | Try |
AEM_*@adobe/aem-clihelix-clihelix-importer-uiaem import