loopinstall
A tool for installing Chainlink LOOP plugins from YAML configuration files.
Installation
To install from source:
go install github.com/smartcontractkit/chainlink-common/pkg/loop/cmd/loopinstall@latest
Or clone and install locally:
git clone https://github.com/smartcontractkit/chainlink-common.git
cd chainlink-common
go install ./pkg/loop/cmd/loopinstall
Usage
# Run `loopinstall --help` to see the options.
loopinstall [options] <plugin-config-file> [<plugin-config-file>...]
Configuration
(See plugins.example.yaml for a complete example configuration.)
Example configuration file structure:
defaults:
# Go build flags.
# The `-s` flag is added to strip debug information from the binary to reduce
# the binary size for releases.
# See: `go tool link -help`
goflags: "-ldflags='-s'" # Default Go build flags
plugins:
cosmos:
- name: "default"
moduleURI: "github.com/smartcontractkit/chainlink-cosmos"
gitRef: "f740e9ae54e79762991bdaf8ad6b50363261c056"
installPath: "./pkg/cosmos/cmd/chainlink-cosmos"
libs:
- "/go/pkg/mod/github.com/!cosm!wasm/wasmvm@v*/internal/api/libwasmvm.*.so"
The installPath is relative to the root of the downloaded module but it can also be an absolute path like: github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/cmd/chainlink-cosmos. The absolute path will be stripped to the relative path (it is supported for backwards compatibility).
The libs field is an array of strings representing directory paths, which can include glob patterns for library files that need to be included with the plugin. Docker build will use these paths to copy the libraries into the final container image.
Private Repository Access
To install plugins from private repositories:
-
Set your GitHub token. Use the gh cli and gh auth setup-git.
-
Optional for CI/CD only: Configure Git to use HTTPS with token authentication:
git config --global url."https://${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
-
Configure GOPRIVATE via environment variable:
export GOPRIVATE=github.com/myorg/*,github.com/another-org/*
The GOPRIVATE environment variable supports glob patterns (e.g., github.com/myorg/*) and tells Go to bypass the public module proxy for these repositories.