> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobster.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# mobster audit

> Check a Team plan audit export offline.

Check a Team plan audit export offline: the hash chain, the signed head of the API's export, and with `--keys` every Mac's signature. Nothing leaves this Mac.

## Usage

```text theme={"theme":"css-variables"}
mobster audit <command>
```

```text theme={"theme":"css-variables"}
examples:
  mobster audit verify audit.jsonl
  mobster audit verify audit.jsonl --keys keys.json
  mobster audit verify export.json
```

## Commands

| Command | What it does |
| - | - |
| [`mobster audit verify`](#mobster-audit-verify) | check an audit export's hash chain and signatures |

## `mobster audit verify`

Check an audit export, offline. It follows the hash chain entry by entry and says which entry first fails: a gap, an entry out of order, or one that was changed. For the JSON Lines export from the API it also checks the signed head against Mobster's license key, which pins where the export starts, where it ends and how many entries it holds, so a cut-off start or end is caught too. With `--keys` it checks each Mac entry's signature against that Mac's key. The relay's own entries are unsigned.

Get the Macs' keys from the Macs themselves, not from the export, so the relay can't vouch for itself. Nothing leaves this Mac.

### Arguments and options

| Name | Default | Description |
| - | - | - |
| `FILE` | required | the audit export: JSON Lines from the API, or JSON from the console |
| `--key FILE` | the key built into Mobster | the license public key, as a PEM, for a JSON Lines export's signed head |
| `--keys FILE` | none | a JSON file of \{"\<mac id>": "\<base64url Ed25519 public key>"}; checks every Mac entry's signature |
| `--json` | off | print the result as one JSON object |

```text theme={"theme":"css-variables"}
examples:
  mobster audit verify audit.jsonl
  mobster audit verify audit.jsonl --keys keys.json
  mobster audit verify export.json

exit codes: 0 every entry checked out, 1 something didn't check out, 2 a file couldn't be read
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.