Repositories, artifact metadata and properties, AQL search, Build Integration, and
newer versions and licenses for a dependency inventory, on JFrog Artifactory,
through its classic REST API (api/...). artifact set-properties is the one command that
writes. Verification level: unit.
Supported versions: The oldest JFrog Artifactory version toil supports hasn’t been established. toil
calls the classic REST API (api/...) and AQL with an access or identity token sent
as a Bearer header. No release has been verified yet.
Credential
An Artifactory access token or identity token: in Artifactory, your profile →
Edit Profile → Generate an Identity Token. toil sends it as
Authorization: Bearer <token>. There is no username, password or browser login, and
no CI fallback variable.
Configuration
| Key | Env var | Required | Meaning |
|---|---|---|---|
baseUrl | TOIL_ARTIFACTORY_BASE_URL | yes | Artifactory root, keeping any context path, e.g. https://artifactory.imagile.dev/artifactory |
token | TOIL_ARTIFACTORY_TOKEN | yes | Access or identity token |
npmRepo | TOIL_ARTIFACTORY_NPM_REPO | no | npm repository key for package outdated and package license-check |
nugetRepo | TOIL_ARTIFACTORY_NUGET_REPO | no | NuGet repository key for package outdated and package license-check |
mavenRepo | TOIL_ARTIFACTORY_MAVEN_REPO | no | Maven repository key for package outdated |
writes | TOIL_ARTIFACTORY_WRITES | no | true lets artifact set-properties run (with --allow-write) |
Environment variables (CI, or a one-off shell):
export TOIL_ARTIFACTORY_BASE_URL=https://artifactory.imagile.dev/artifactory
export TOIL_ARTIFACTORY_TOKEN=<your access token>
export TOIL_ARTIFACTORY_NPM_REPO=npm-remote
Or ~/.toil/config.json:
{
"version": 2,
"connections": {
"corp-artifactory": { "area": "artifactory", "baseUrl": "https://artifactory.imagile.dev/artifactory", "npmRepo": "npm-remote", "nugetRepo": "nuget-remote", "mavenRepo": "maven-remote" }
},
"defaults": { "artifactory": { "connection": "corp-artifactory" } }
}
The token never goes in this file; a plaintext one there is refused with
CONFIG_INVALID. Run toil connections add corp-artifactory --area artifactory (or
toil connections login corp-artifactory) to keep it in the OS credential store, or
set TOIL_ARTIFACTORY_TOKEN.
Commands
ping: Check Artifactory connectivity and authentication.datais Artifactory’s text answer, normallyOK.repo list: List repositories (--type local|virtual|remote|federated,--package-type npm|maven|nuget|docker|pypi|...).artifact get <repo> <path>: Get metadata for an artifact or folder (checksums, size, timestamps).artifact properties <repo> <path>: Read custom properties on an artifact.artifact set-properties <repo> <path> key=value...: Set custom properties on an artifact. A write: needswrites: trueon the connection and--allow-write. Without--recursivenorecursiveparameter is sent, so on a folder Artifactory’s own default applies. Values are sent as typed: a comma makes several values, and a;starts another property.datais{ repo, path, properties }as asked for.artifact search: Search artifacts using AQL, newest first. Needs at least one of--repo,--nameor--path(*and?wildcards);--after/--beforefilter on the creation date (ISO 8601);--limitdefaults to 100 (0 also means 100);--propertiesasks for properties too.datais{ results, range }.build list: List builds registered in Artifactory Build Integration, each with anamederived from itsuri, and ahintwhen there are none.--timeout <s>(default 60) is the request’s timeout; the command itself allows up to 600 s.build runs <name>: List all run numbers for a build.build get <name> <number>: Get build info (artifacts, dependencies, VCS revision) for a specific run.package outdated(alsotoil deps outdated): Check for newer versions available in Artifactory, for the direct production dependencies of an inventory.--ecosystem npm|nuget|maven|all(defaultall);--major,--minoror--patchkeep only bumps of at least that size. Ecosystems with no repository key set are listed inuncheckedEcosystems.package license-check(alsotoil deps license-check): Report licenses for the direct dependencies of an inventory (--ecosystem,--include-dev). Maven licenses are alwaysnull; a NuGet package with only a license URL reportsSee licenseUrl.
package outdated and package license-check read the inventory that toil deps scan writes, from
--from <file> or, when that’s left out on the CLI, from stdin; over MCP, pass from.
They first ping Artifactory and stop if it doesn’t answer or rejects the token, then
make one request per package, one at a time, so they’re allowed up to 600 s. A lookup
that fails for any reason (a wrong repository key included) counts as no answer: the
package is left out of outdated, or gets license: null.
toil artifactory artifact search --repo libs-release-local --name 'api-*.jar' --limit 10
toil artifactory artifact set-properties libs-release-local dev/imagile/api/1.4.0/api-1.4.0.jar qa.status=passed --allow-write
toil deps scan | toil artifactory package outdated --ecosystem npm --minor
toil artifactory package license-check --from inventory.json --include-dev Settings at a glance
-
baseUrlrequiredArtifactory root, keeping any context path, e.g. https://artifactory.imagile.dev/artifactory
TOIL_ARTIFACTORY_BASE_URL -
tokenrequired secretArtifactory access or identity token
TOIL_ARTIFACTORY_TOKEN -
npmReponpm repository key that package outdated and package license-check look packages up in
TOIL_ARTIFACTORY_NPM_REPO -
nugetRepoNuGet repository key that package outdated and package license-check look packages up in
TOIL_ARTIFACTORY_NUGET_REPO -
mavenRepoMaven repository key that package outdated looks packages up in
TOIL_ARTIFACTORY_MAVEN_REPO
Commands at a glance
toil artifactorypingCheck Artifactory connectivity and authentication
toil artifactoryrepo listList repositories
toil artifactoryartifact getGet metadata for an artifact or folder (checksums, size, timestamps)
toil artifactoryartifact propertiesRead custom properties on an artifact
toil artifactoryartifact set-propertieswriteSet custom properties on an artifact (format: key=value key=value...)
toil artifactoryartifact searchSearch artifacts using AQL (Artifactory Query Language) (consider --output-file for large results)
toil artifactorybuild listList builds registered in Artifactory Build Integration (names may differ from ADO pipeline names; use "search --repo" when empty)
toil artifactorybuild runsList all run numbers for a build
toil artifactorybuild getGet build info (artifacts, dependencies, VCS revision) for a specific run
toil artifactorypackage outdatedalsotoil deps outdatedCheck for newer versions available in Artifactory (requires Artifactory)
toil artifactorypackage license-checkalsotoil deps license-checkReport licenses for all direct dependencies via Artifactory (requires Artifactory)