Logo Aem Cli

Aem Cli

Tổ chức
adobe
aem-cli

Use this when installing, running, or configuring the Adobe AEM CLI (@adobe/aem-cli, formerly the helix-cli npm package; commands `aem up`, `aem import`, `aem content`), when `aem up` fails (port conflicts, cert errors, proxy 404s, pipeline vs. local-file confusion), or when migrating from the old helix-cli package. Covers installation, the local Edge Delivery dev server, .env / AEM_* configuration, HTTPS/TLS, proxy and certificate trust, content sync with da.live, and troubleshooting. For da.live content-format rules or the DA Source API contract use da-content; for writing EDS block code use content-driven-development.

Tổng quan

Nhà phát hànhadobe
Kho mãskills
Tên kỹ năngaem-cli
Sao
298
Bản fork
92
Tệp đi kèm
3
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 3 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được adobe công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Aem Cli trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/adobe/skills/tree/main/plugins/aem/edge-delivery-services/skills/aem-cli
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/adobe/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/plugins/aem/edge-delivery-services/skills/aem-cli .claude/skills/aem-cli
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Aem Cli trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Aem Cli ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Aem Cli không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

AEM CLI

Local development tool for AEM Edge Delivery Services. Three commands: aem up (local dev server), aem import (import server + UI), aem content (da.live content sync).

Binary: aem (primary), hlx (alias from the former helix-cli package, renamed to @adobe/aem-cli at v15.0.0).


1. Install

Prerequisite: Node.js 12.11 or newer (Node 22 LTS recommended). [verified]

bash
# Global install
npm install -g @adobe/aem-cli

# One-off via npx (no global install needed)
npx -y @adobe/aem-cli up

Verify:

bash
aem --version   # or: hlx --version

Migrating from the old helix-cli package

If npm install -g @adobe/aem-cli fails with File exists: …/hlx, the old package is still installed and owns the binary. Uninstall it first (npm package scoped under @adobe, named helix-cli): [verified]

bash
npm uninstall -g @adobe/helix-cli
npm install -g @adobe/aem-cli

The binary name changes from hlx to aem; both work after installation because aem-cli ships hlx as an alias.


2. aem up — Local Dev Server

Agent-standard invocation:

bash
aem up --no-open --forward-browser-logs

Check the server is running:

bash
curl -s -o /dev/null -w "%{http_code}" http://localhost:3000
# Expected: 200

Key flags

FlagWhat it does
--no-openDo not open a browser window on startup
--forward-browser-logsForward browser console messages (log, error, warn, info) to the terminal
--port <n>Listen on a different port (default: 3000)
--addr <addr>Bind address; use * to allow external connections (default: 127.0.0.1)
--url <url>Origin URL to proxy content from (overrides the project's default pages URL)
--html-folder <dir>Serve local HTML files from <dir> without extensions
--html-mount <path>URL path where --html-folder files are served (default: /<dir>)
--no-livereloadDisable automatic browser reload on file changes
--stop-otherStop another AEM CLI instance on the same port before starting (default: true)
--tls-cert <file>Path to .pem file for TLS (see §4)
--tls-key <file>Path to .key file for TLS (see §4)
--allow-insecureAllow insecure (self-signed cert) requests to the upstream server
--print-indexPrint indexed records for the current page (debugging)
--site-token <token>Site token for CLI access to the website
--cookiesProxy all cookies (default: only hlx-auth-token is proxied)

--html-folder: without it, local HTML files are never served — all requests proxy to the remote pipeline, returning 404 for local-only paths. [verified]

Serving import HTML locally (preview-import pattern)

bash
aem up --html-folder drafts --no-open --forward-browser-logs
# Files in ./drafts/ are served at /drafts/<name> (no extension needed)

3. .env Configuration

All options can be persisted in .env at the project root; loaded automatically. [verified]

dotenv
# .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=/products

See references/command-reference.md for the complete AEM_* environment variable reference with defaults.


4. HTTPS / TLS

Trusted local certificate (recommended — avoids browser warnings)

Install mkcert (brew install mkcert on macOS, choco install mkcert on Windows, go install filippo.io/mkcert@latest elsewhere), then:

bash
mkcert -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.key

Self-signed certificate (no mkcert)

bash
openssl 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.key

Persisting TLS in .env

dotenv
AEM_TLS_CERT=server.crt
AEM_TLS_KEY=server.key

5. Corporate Proxy and Certificate Trust

aem up fails with unable to get local issuer certificate behind HTTPS-intercepting proxies. Export the corporate CA cert from your browser or ask IT, then set:

bash
# 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 up

NODE_EXTRA_CA_CERTS is a Node built-in — set it in the shell profile or CI, not .env.

Proxy env vars:

VariablePurpose
HTTP_PROXYProxy for HTTP requests
HTTPS_PROXYProxy for HTTPS requests
ALL_PROXYFallback for either protocol
NO_PROXYComma-separated hosts to bypass; * disables all proxies

6. aem import — Import Server

Local import server (default port 3001) serving the helix-importer-ui.

bash
aem import                   # opens Importer UI in browser at port 3001
aem import --no-open         # headless / background start
aem import --port 3002       # different port

Key flags:

FlagDefaultWhat it does
--port3001Import server port
--no-open—Do not open the browser window
--allow-insecuretrueAllow self-signed certs on the proxied site
--ui-repo <url>helix-importer-ui repo on GitHubCustom Importer UI repo
--skip-uifalseSkip downloading/installing the UI
--headers-file <file>—JSON file of custom headers for proxy requests
--cache <dir>—Cache proxied responses to a local folder
--dump-headersfalsePrint request headers to console for debugging
--tls-cert / --tls-key—TLS for the import server itself (see §4)

Workflow: For writing the import.js transformation script or running the full import pipeline, use the page-import or generate-import-html skills. This skill covers only starting and configuring the server.


7. aem content — da.live Content Sync

bash
aem 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

Auth token cached at .hlx/.da-token.json (gitignored); browser OAuth on first use.

Read the token directly to authenticate curl calls:

bash
TOKEN=$(jq -r .access_token .hlx/.da-token.json)

Known behaviour: binary files

aem content push silently no-ops on binary files (images, PDFs, fonts). [verified]

Verify a binary upload landed:

bash
curl -sI https://content.da.live/<org>/<repo>/path/to/image.png | grep -i "content-type"

If it 404s, upload the binary directly via the DA Source API:

bash
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"

Known behaviour: pre-upload HTML normalization

Pre-upload normalization strips EDS icon decorations (<span class="icon icon-X"> etc.). [verified] For byte-faithful EDS HTML, POST directly to the DA Source API:

bash
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"

See the da-content skill (platform reference §7) for the DA Source API contract and rate limits.


Troubleshooting

SymptomCauseFix
npm install -g @adobe/aem-cli → File exists: …/hlxold helix-cli package still owns the binaryuninstall the old package (see §1) then reinstall
aem up → EADDRINUSE: address already in use :::3000Port 3000 is takenPass --port <other> or kill the process on 3000
aem up → unable to get local issuer certificateCorporate proxy intercepts TLSExport corp CA cert → export NODE_EXTRA_CA_CERTS=/path/to/ca.crt
localhost:3000/mypath returns 404Local HTML file in mypath/ not mountedAdd --html-folder mypath (or AEM_HTML_FOLDER=mypath in .env)
aem up → pipeline 404 for pages that exist liveWrong origin URL proxiedPass --url https://your-pages-url.aem.page
aem content push reports success but binary is missingCLI silently no-ops on binariesUpload binary via DA Source API (see §7)
aem content push strips icon spans from HTMLPre-upload normalization removes EDS decorationsPOST directly to DA Source API for byte-faithful upload
aem import UI doesn't loadPort 3001 in use, or UI download failedTry --port 3002; or --skip-ui and open the UI separately

Reference

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Aem Cli làm được gì?

Use this when installing, running, or configuring the Adobe AEM CLI (@adobe/aem-cli, formerly the helix-cli npm package; commands `aem up`, `aem import`, `aem content`), when `aem up` fails (port conflicts, cert errors, proxy 404s, pipeline vs. local-file confusion), or when migrating from the old helix-cli package. Covers installation, the local Edge Delivery dev server, .env / AEM_* configuration, HTTPS/TLS, proxy and certificate trust, content sync with da.live, and troubleshooting. For da.live content-format rules or the DA Source API contract use da-content; for writing EDS block code...

Vì sao nên dùng Aem Cli trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Aem Cli là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Aem Cli trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/adobe/skills/tree/main/plugins/aem/edge-delivery-services/skills/aem-cli. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Aem Cli?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Aem Cli với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Aem Cli với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Aem Cli có miễn phí không?

Có. Kỹ năng này được adobe phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇