# `jadpo toolchain`

Manage Jadpo releases.

The jadpo you install runs the Jadpo release line a project's app.jadpo names (`jadpo: "0.1"`): its newest release, or the one jadpo.lock pins, fetched once into your cache folder and checked against its SHA-256 and GitHub artifact attestation before it runs. `jadpo toolchain` lists the releases kept and `remove` deletes one; both always run with the jadpo you installed. `pin` writes the release a project runs with into jadpo.lock, so every run and build of it uses that release, and `unpin` takes it out. Set JADPO_TOOLCHAIN=local to run every command with the jadpo you started.

```text
jadpo toolchain [action] [version]
```

## Arguments

- `action` (optional): What to do: remove, pin or unpin, or nothing to list them
- `version` (optional): The release to remove

## On every command

- `--json`: Print data for tools instead of text
- `--help`: Show every flag, with examples
- `--color <when>`: Choose when to use colour

`jadpo toolchain --json` writes one JSON document to standard output instead of text, with the same exit code. The document has `schemaVersion`, `command` (`"toolchain"`), `ok`, `data` (what the command produced, `null` when it failed) and `diagnostics` (each error with its `rule`, `reason`, `next` and `help`). A command that needs a terminal refuses `--json` and names the flags that do the same job.

## Examples

```text
# See the Jadpo releases kept for your projects
jadpo toolchain
# Pin the release this project runs with
jadpo toolchain pin
# Delete a release no project needs
jadpo toolchain remove 0.1.2
```

## Errors

- [`cli.toolchain_arguments`](../errors/cli.toolchain_arguments.md): Toolchain command has invalid arguments
- [`toolchain.artifact_write_failed`](../errors/toolchain.artifact_write_failed.md): Generated file could not be written
- [`toolchain.project_not_found`](../errors/toolchain.project_not_found.md): Project could not be found
- [`toolchain.version_newer`](../errors/toolchain.version_newer.md): Project is on a later Jadpo line
- [`toolchain.version_older`](../errors/toolchain.version_older.md): Project is on an earlier Jadpo line
- [`record.edited`](../errors/record.edited.md): Generated record was edited by hand
