Infield CLI

Sync your repos with Infield from the command line

Install the infield command line tool to sync your dependencies from your local environment or continuous integration pipeline.


Download the latest release for your architecture:

Linux (x86)


Intel Mac


Apple Silicon Mac


Extract the binary:

# For example, for Linux:
tar xzf infield_Linux_x86_64.tar.gz

Syncing dependencies

Generate your API key inside Infield at You must set the environment variable INFIELD_API_TOKEN to your api key.

Then run the CLI to sync a repo. Pass paths to the files your package manager uses to store dependency versions:

Package ManagerDefinition FileLockfile
INFIELD_API_TOKEN=infield_token infield sync --repo-environment-id ID --definition-file package.json --lock-file package-lock.json

You can find your repo environment ID inside Infield (Repos -> Choose a Repo -> Environments -> Edit).

Applying safe upgrades

Use the CLI to apply upgrades that Infield has researched and found to not contain any breaking changes. This will run your package manager locally to upgrade the dependencies in your developer environment, which you can use to then open a pull request.

infield update --repo-environment-id ID