Argos Command Line Interface (CLI)
Use the Argos CLI for seamless screenshot uploads to our visual testing platform, ideally integrated into your CI workflow.
You can access @argos-ci/cli
through our npm package. The source code is available on our GitHub repository.
Installation
- npm
- yarn
- pnpm
- bun
npm i --save-dev @argos-ci/cli
yarn add --dev @argos-ci/cli
pnpm add --save-dev @argos-ci/cli
bun add --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 environment variable (ie. secret).
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
- bun
npm exec -- argos upload ./screenshots
yarn run argos upload ./screenshots
pnpm exec -- argos upload ./screenshots
bun x argos upload ./screenshots
Debug mode
You can enable debug mode by setting the DEBUG
environment variable.
- npm
- yarn
- pnpm
- bun
DEBUG=@argos-ci/core npm exec -- argos upload ./screenshots
DEBUG=@argos-ci/core yarn run argos upload ./screenshots
DEBUG=@argos-ci/core pnpm exec -- argos upload ./screenshots
DEBUG=@argos-ci/core bun x argos upload ./screenshots
Help Command
To view a list of available options, use the argos help command.
- npm
- yarn
- pnpm
- bun
npm exec -- argos help upload
yarn run argos help upload
pnpm exec -- argos help upload
bun x argos help upload