---
url: https://docs.mochiexec.io/reference/cli/mochi_executable_edit.md
description: Replace one executable's definition in its flow file
---

# mochi executable edit

Replace one executable's definition in its flow file

## Synopsis

Replaces the executable at REF (e.g. `run ws/ns:name`) with the JSON definition in --data. The rest of the flow file, including comments, is left as it is.

```shell
mochi executable edit REF [flags]
```

## Options

| Flag | Type | Description |
|------|------|-------------|
| `--data` | `string` | JSON executable definition (required) |
| `-h, --help` |  | help for edit |
| `-o, --output` | `string` | Output format: text or json (default "text") |

## Options inherited from parent commands

| Flag | Type | Description |
|------|------|-------------|
| `-L, --log-level` | `string` | Log verbosity level (debug, info, fatal) (default "info") |
| `--sync` |  | Sync flow cache and workspaces |

## See also

* [mochi executable](mochi_executable.md) — Manage executables
