Listing packages
In AEL, the Agent Engineering Language, ael pack list lists the packages of a scope, and tells apart what is declared, what is installed and what your code actually uses.
Usage
ael pack list
ael pack list --scope src/api
ael pack list --json
| Option | Meaning |
|---|---|
--scope <folder> | List the packages of that folder's manifest. Without it, the manifest that covers the folder you are in. |
--json | The list in machine-readable form. |
What it shows
For every package in the scope, direct or not, the list says which of these hold:
| State | Meaning |
|---|---|
| Declared | Named in the scope's pack.ael. |
| Locked | Recorded in pack.lock, with its exact version. |
| Installed | Present in .package/ and matching the lock file. |
| Used | Selected by at least one file with refer … select …. |
| Kept | Not used directly, but needed by another package. |
For each package, it also gives:
- the scope the package comes from, when a folder inherits it from a manifest further up;
- its exact version and its source: the official registry, an
httpsaddress or alocalfile; - why it is there: declared by you, or brought in by another package.
A package that is installed but never used is listed as such. ael refmap shows the same finding in the context of your code.
What it never does
ael pack list changes nothing, uses no network and runs no package code. It reads the manifest, the lock file and the installed packages as they are.
If the manifest, the lock file and the installed packages disagree, the list says where. ael pack verify checks the installed files in depth, and ael pack install --locked brings them back in line with the lock file.
Related
- Why a package is in a project: the path that brings in one package.
- Dependency graph: every package and the links between them.