> For the complete documentation index, see [llms.txt](https://ascribed-dev.com/docs/llms.txt). This documentation describes Ascribe 0.4.5. Anything marked in main, not yet released isn't in that release yet.

# `ascribe vale`

> Reference · Write Vale's preset out as the project's own configuration: options, output, and exit codes.

`ascribe vale eject` writes the preset `[checks.vale]` names out as the project's own Vale configuration, so the project can change it. [Check prose with Vale](https://ascribed-dev.com/docs/checks/vale.md) is the task it's used in.

The options every command accepts are in the [command reference](https://ascribed-dev.com/docs/command.md#options-every-command-accepts).

## `ascribe vale`

Sets up Vale for a project. Vale itself is run by `ascribe check --vale` and the editor.

### `ascribe vale eject`

Writes the preset `[checks.vale]` names out as the project's own Vale configuration: `.vale.ini` and a `.vale/` styles folder in the project's folder, with the rules `off` names turned off in `.vale.ini`. Then it changes `[checks.vale]` in `ascribe.toml` to `config = ".vale.ini"`, in place of `preset` and `off`, keeping its other keys and comments.

It lists each file it wrote, `ascribe.toml` last. It changes `ascribe.toml` only when git could put it back, as every [command that writes](https://ascribed-dev.com/docs/command.md#commands-that-write) does: with changes not committed, it's refused, and named, unless you pass `--force`. With `--dry-run`, it says what it would write, and writes nothing.

- `--dry-run`: Say what it would change, and change nothing.
- `--force`: Change files even when git couldn't put them back as they are: ones with changes not committed, ones git doesn't track, or ones in no repository.
- `--format <FORMAT>`: How to show what was written.
  - `text` (the default): Short text, for people and agents to read.
  - `json`: One JSON document, for tools.

With `--format json`, it writes the preset and the files in the document its [schema](https://ascribed-dev.com/docs/contracts/json-reports.md#ascribe-vale-eject) describes.

| Code | Meaning |
| --- | --- |
| `0` | The preset is the project's own now |
| `2` | It wrote nothing: no `ascribe.toml`, a [content model](https://ascribed-dev.com/docs/glossary.md#content-model) with errors, a `[checks.vale]` that names no preset, a `.vale.ini` or `.vale` that's there already, or, without `--force`, an `ascribe.toml` git couldn't put back. Or a file couldn't be written; the files it wrote before that stay. |

## See also

- [Check prose with Vale](https://ascribed-dev.com/docs/checks/vale.md): the preset, your own configuration, and where Vale runs.
- [`[checks.vale]`](https://ascribed-dev.com/docs/content-model/checks.md#checksvale): every key.
