# `alta attest`

> alta attest: for publishers and reviewers: signs a statement that names the chart's id, version and tree digest; writes <id>-<version>.<type>.intoto.json.

For publishers and reviewers: signs a statement that names the chart's id, version and tree digest; writes `<id>`-`<version>`.`<type>`.intoto.json.

## Usage

```text
alta attest <dir|archive> --key <private key file> [--type publish|review] [--audit <status>] [--tier <tier>] [--out <file>] [--json]
```

## Arguments

| Name | | Description |
|---|---|---|
| `dir|archive` | **required** | The chart folder (it must pass alta lint) or its archive. |

## Options

| Name | Type | Default | Description |
|---|---|---|---|
| `--key` | *string* | *Default: ALTA_SIGNING_KEY_FILE* | The file of your Ed25519 private key (PEM), readable by you only. Never the key itself. |
| `--type` | *string* | *Default: publish* | publish: you publish these files. review: you reviewed them (needs --audit and --tier). |
| `--audit` | *string* |  | review: the audit status, pass, review, warn, malicious, pending or error. |
| `--tier` | *string* |  | review: official, verified or community. |
| `--out` | *string* | *Default: `<id>-<version>.<type>.intoto.json`* | Where to write the attestation (never inside the chart folder: it would change the digest). |
| `--json` | *flag* |  | Print the result (alta.attest/1) as JSON. |

## Exit codes

| Name | Description |
|---|---|
| `0` | ok |
| `1` | problems found |
| `2` | bad usage |
| `3` | not in this version |

## Examples

*Sign what you publish*

```sh [Terminal]
alta attest my-agent --key ~/.config/alta/keys/publisher.key
```

*Reaches the repository's address (the only commands that use the network): it prints what it fetched and checked.*
