Overview
relic is the command-line client of the Relic API. The
same binary runs the server. Configuration lives in YAML files that you apply
as with kubectl apply.
Commands are grouped by what they act on:
| Group | Does | Page |
|---|---|---|
relic server | runs, installs and inspects the server on this machine | Machine setup, Database |
relic auth | sign-in, contexts and access tokens | Sign in and contexts, Server, API and tokens |
relic artifact, cleanup, hold | files, properties, cleanup policies and legal holds | Artifacts |
relic apply, diff, get, delete | declarative configuration | Resources, apply, diff and delete |
relic build, image | build runs and container image promotion | Builds and images |
relic release | release bundles | Releases |
relic evidence | signed evidence | Evidence |
relic security | scanning, reports, SBOMs, VEX and waivers | Scanning and auditing, Scan reports and VEX |
relic package | package manager setup and publishing | Package managers |
relic storage, audit, usage, webhook, project, registry, api | server checks, audit log, usage, webhooks, projects, registries, API calls | Server, API and tokens |
relic replication | runs a replication now | Replication |
relic mcp | serves Relic's read-only tools to an AI agent | AI agents |
relic import | migrating from Artifactory® | Migrating from Artifactory |
relic completion | shell completion scripts | Artifacts |
Install
Install the latest release for Linux or macOS (amd64 or arm64) into
~/.local/bin. The script checks the SHA-256 sums and adds the relic-indexer
build a server hands to clients:
curl -fsSL https://relic.build/install.sh | sh
Install a specific release into another directory:
curl -fsSL https://relic.build/install.sh | sudo env RELIC_VERSION=v0.2.0-beta.4 RELIC_INSTALL_DIR=/usr/local/bin sh
Install only the CLI, without the relic-indexer build:
curl -fsSL https://relic.build/install.sh | env RELIC_INDEXER_PLATFORMS= sh
A Relic server also serves the script at /install.sh.
Each GitHub release has
archives for Linux and macOS (amd64, arm64) and Windows (amd64, zip), an SBOM
per archive, relic_<tag>_checksums.txt and its cosign signature
relic_<tag>_checksums.txt.sigstore.json.
To install by hand, set the release and platform (linux_amd64, linux_arm64,
darwin_amd64 or darwin_arm64):
v=v0.2.0-beta.4 p=linux_amd64
Download the archive and the checksum files:
gh release download "$v" --repo relicbuild/relic -p "relic_${v}_${p}.tar.gz" -p "relic_${v}_checksums.txt*"
Optionally, verify the checksum file's signature with cosign 2.5.0 or later:
cosign verify-blob "relic_${v}_checksums.txt" --bundle "relic_${v}_checksums.txt.sigstore.json" --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp '^https://github.com/relicbuild/relic/'
Check the archive's SHA-256 sum:
sha256sum -c --ignore-missing "relic_${v}_checksums.txt"
Unpack it and install relic in ~/.local/bin:
tar -xzf "relic_${v}_${p}.tar.gz" && install "relic_${v}_${p}/relic" ~/.local/bin/
The archives do not include the scanners; the Relic image does. A server without syft and grype runs with scanning off.
The image holds the binary at /relic. To copy it out, create a container
without starting it:
docker create --name relic-cli <relic-image>
Copy the binary out:
docker cp relic-cli:/relic ./relic
Remove the container:
docker rm relic-cli
Or build it from source in a checkout of the repository:
go build -o ~/bin/relic ./cmd/relic
Next, run relic server setup to write the config, add shell completion and
run the server as a service: systemd on Linux, launchd on macOS (Machine setup).