# allyhub reference compare

> A piece measured from its code, with no render, against a reference's sections (your interpretation.json's, else its neutral segments): per section and overall, the piece's numbers less the reference's, and a side-by-side sheet

Source: https://allyhub.com/docs/reference/cli/reference-compare · AllyHub 0.10.0
Index of all docs: https://allyhub.com/llms.txt

## Usage

```bash
allyhub reference compare [reference] [item] [options]
```

## Arguments

| Argument | Type | What it is |
| --- | --- | --- |
| `<reference>` | string | The reference: its folder, its reference.json, or its id under .allyhub/work/reference/ |
| `<item>` | string | The piece: its id (its file without its extension) or its file; default the project's only one |

## Options

| Option | Type | Default | What it does |
| --- | --- | --- | --- |
| `--combo` | list of string |  | The first combo matching name=value pairs joined with commas (lang=zh-cn,hook=b), or a combo's id (c03); default the first combo |
| `--by` | `parts`, `time` |  | parts: the piece's parts aligned to the sections, by durations, places and names; time: each section against the same seconds of the piece. Default parts, time when they cannot be aligned |

## Global options

`--dir <value>`: the project's folder; default the one around where it is run. `--json`: print the result as JSON.

## Output

With `--json`, the command prints an object with these fields:

| Field | Type | What it is |
| --- | --- | --- |
| `reference` | string |  |
| `sheet` | string |  |
| `matches` | list of values |  |

## Examples

```bash
allyhub reference compare ad launch/film
allyhub reference compare .allyhub/work/reference/ad launch/film --by time
```

## Exit codes

`0` when it succeeds; the others are listed in [Exit codes](https://allyhub.com/docs/reference/cli/exit-codes.md).

## In the work

**references**: Studying reference videos, and a piece against them

[`reference`](https://allyhub.com/docs/reference/cli/reference.md) → `reference compare` → [`reference set`](https://allyhub.com/docs/reference/cli/reference-set.md) → [`frames`](https://allyhub.com/docs/reference/cli/frames.md) → [`frames compare`](https://allyhub.com/docs/reference/cli/frames-compare.md) → [`words`](https://allyhub.com/docs/reference/cli/words.md) → [`audio`](https://allyhub.com/docs/reference/cli/audio.md) → [`align`](https://allyhub.com/docs/reference/cli/align.md)
