> For the complete documentation index, see [llms.txt](https://argos-ci.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://argos-ci.com/docs/learn/how-to-guides/visual-coverage/compare-non-image-files.md).

# Compare non-image files

Upload and diff text-based artifacts like JSON, HTML, Markdown, and CSS in Argos using the CLI files option.

Argos can compare more than screenshots. With the CLI, you can upload text-based artifacts such as API snapshots, generated HTML, Markdown files, CSS output, JavaScript bundles, XML documents, YAML files, or JSON fixtures and review their changes in Argos.

![Compare non-image files in Argos](https://content.gitbook.com/content/0slCNmeVzY3qdh0I85HX/blobs/KCZ7I73JUXmNDitNYHWA/json%20comparison%20d95543132bde0693cbb86877d840113a.png)

### Upload non-image files

Use the `-f` or `--files` option to tell the CLI which files to upload:

{% tabs %}
{% tab title="npm" %}

```
npm exec -- argos upload -f "**/*.{txt,json,yaml,yml,xml,html,md,css,js}" ./snapshots
```

{% endtab %}

{% tab title="yarn" %}

```
yarn run argos upload -f "**/*.{txt,json,yaml,yml,xml,html,md,css,js}" ./snapshots
```

{% endtab %}

{% tab title="pnpm" %}

```
pnpm exec -- argos upload -f "**/*.{txt,json,yaml,yml,xml,html,md,css,js}" ./snapshots
```

{% endtab %}

{% tab title="bun" %}

```
bun x argos upload -f "**/*.{txt,json,yaml,yml,xml,html,md,css,js}" ./snapshots
```

{% endtab %}
{% endtabs %}

The `-f` option replaces the default screenshot glob. If you want to upload screenshots and non-image files in the same build, include both patterns:

{% tabs %}
{% tab title="npm" %}

```
npm exec -- argos upload -f "**/*.{png,jpg,jpeg,webp,avif,gif}" "**/*.{txt,json,yaml,yml,xml,html,md,css,js}" ./snapshots
```

{% endtab %}

{% tab title="yarn" %}

```
yarn run argos upload -f "**/*.{png,jpg,jpeg,webp,avif,gif}" "**/*.{txt,json,yaml,yml,xml,html,md,css,js}" ./snapshots
```

{% endtab %}

{% tab title="pnpm" %}

```
pnpm exec -- argos upload -f "**/*.{png,jpg,jpeg,webp,avif,gif}" "**/*.{txt,json,yaml,yml,xml,html,md,css,js}" ./snapshots
```

{% endtab %}

{% tab title="bun" %}

```
bun x argos upload -f "**/*.{png,jpg,jpeg,webp,avif,gif}" "**/*.{txt,json,yaml,yml,xml,html,md,css,js}" ./snapshots
```

{% endtab %}
{% endtabs %}

Use stable file names and paths so Argos can match each uploaded file with its baseline on future builds.

### Supported content types

Argos currently supports these non-image content types:

* `text/plain`
* `application/json`
* `application/yaml`
* `text/yaml`
* `application/xml`
* `text/xml`
* `text/html`
* `text/markdown`
* `text/css`
* `application/javascript`
* `text/javascript`

Image snapshots can be PNG, JPEG, WebP, AVIF or GIF (`image/png`, `image/jpeg`, `image/webp`, `image/avif`, `image/gif`).

Video snapshots are not supported: an upload that includes a video file fails with an "Unsupported content type" error. To share a screen recording on a pull request without diffing it, use [media sharing](/docs/learn/media.md).

### Framework support

Besides the CLI, the [Vitest SDK](/docs/reference/vitest.md#capturing-snapshots) uploads non-image snapshots with `argosSnapshot`, from browser or Node tests. [Contact us](https://argos-ci.com/contact) if you are interested in using this feature from another test framework.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://argos-ci.com/docs/learn/how-to-guides/visual-coverage/compare-non-image-files.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
