Argos Command Line Interface (CLI)
The Argos Command Line Interface (CLI) offers a swift and straightforward method for uploading screenshots to the Argos visual testing platform. Ideally, this should be executed by your Continuous Integration (CI) process.
You can access @argos-ci/cli
through our npm package. The source code is available on our GitHub repository.
Installation
- npm
- yarn
- pnpm
npm i --save-dev @argos-ci/cli
yarn add --dev @argos-ci/cli
pnpm add --save-dev @argos-ci/cli
Configuration
Your configuration requirements may vary depending on the CI you use. Typically, you'll need to set ARGOS_TOKEN as a secret in the settings.
- Log into Argos, navigate to your project settings, and copy your
ARGOS_TOKEN
. - Declare an environment variable called
ARGOS_TOKEN
with the copied value.
Note: You can also specify the token with the --token=<your-repository-token>
argument. However, for security reasons, we recommend using an environment variable instead.
Upload Command
Use the upload
command to upload screenshots stored in your ./screenshots directory.
- npm
- yarn
- pnpm
npx @argos-ci/cli upload ./screenshots
yarn run @argos-ci/cli upload ./screenshots
pnpm exec @argos-ci/cli upload ./screenshots
Help Command
To view a list of available options, use the argos help command.
- npm
- yarn
- pnpm
npx @argos-ci/cli help upload
yarn run @argos-ci/cli help upload
pnpm exec @argos-ci/cli help upload