---
title: "Edit with the CLI"
description: "The get, validate and put loop that makes document edits safe from a terminal."
url: https://docs.spinrun.ai/build/edit-with-cli
markdown_url: https://docs.spinrun.ai/build/edit-with-cli.md
---

# Edit with the CLI

```bash
spinrun agent list
spinrun agent get triage-bot > agent.json
jq '.instructions = "Triage, then label."' agent.json > edited.json
spinrun agent validate --file edited.json
spinrun agent put --file edited.json
```

`get` prints the document and nothing else, so it pipes. Every other command prints text, or JSON with `--json`.

## Related [#related]

* [Edit with curl](https://docs.spinrun.ai/build/edit-with-curl.md)
* [CLI](https://docs.spinrun.ai/cli.md)
