# Automation

Automate conversions, remotely set settings, and control licenses with the EditReady API. You can also trigger custom scripts on specific events, and run custom processes, other apps, or integrate EditReady into an existing workflow.

{% hint style="info" %}
EditReady is also available as a [headless CLI](/editready-server.md).
{% endhint %}

## Requirements

* EditReady Pro license
* API: EditReady 22.4 or newer&#x20;
* Scripting: EditReady 25.4 or newer

## API

You can tell EditReady to do something by calling the app URL: `editready://`. You can call this from any app or script that can open a URL.

Copy/paste the URL below in a web browser, press `Enter`, and EditReady will open.

```
editready://open
```

You can also use a shell, copy/paste the command below, press `Enter`, and EditReady will open.

```
open 'editready://open'
```

### Activate & Deactivate License

```
editready://activate?key=<your-license-key>
```

```
editready://deactivate
```

### Add Clips

Adds a file or folder to the clip view.

```
editready://add?sourcePath=<file or folder path>
```

### Transcode

Transcodes a file or folder (also adds the file to the clip view).&#x20;

```
editready://transcode?sourcePath=<file or folder path>&preset=<preset name/path or UUID>&destinationPath=<folder path>
```

{% hint style="info" %}
EditReady stores its preset files inside the app bundle with a `.erpreset` file extension. (e.g. `/Applications/EditReady.app/Contents/Resources/Apple ProRes 422 (HQ).erpreset`). \
\
`User presets are saved in: /Users/<your-usename>/Library/Application Support/EditReady`
{% endhint %}

## Scripting

You can attach scripts (AppleScript or Python) to the following events:

* [EditReady Started](#editready-started)
* [File Conversion Completed](#file-conversion-completed)

<figure><img src="/files/8FwfpKZzuPeYGkfTXy9A" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
Scripting is a powerful tool. Easy to learn, but even easier to screw up. Always test your script with disposable data, and then test again. And again. Hedge does not offer support or assume responsibility for problems with or due to examples or any other script. If you’re new to scripting, find someone to help you out, or use the example scripts available here. Remember: you are solely responsible.
{% endhint %}

### EditReady Started

Fires once when launching EditReady. Has no payload.

### File Conversion Completed

Fires when a conversion has completed, and has the following payload:

{% code overflow="wrap" %}

```
03/10/2025, 15:18:11 - File Conversion Completed: {
  "FileConversionCompleted_destinationPath" = "/Volumes/Hedge/Clip-0001.braw";
  "FileConversionCompleted_status" = "Success";
  "FileConversionCompleted_sourcePath" = "/Volumes/G-DRIVE I/TEST";
  "FileConversionCompleted_error" = "none";
}
```

{% endcode %}

### Python

When a Python script is executed, the event payload is passed as a JSON string in the first command-line argument (sys.argv\[1]). You can parse it into a dictionary as follows:

```
import sys
import json

# Load the event payload from the first argument
payload = json.loads(sys.argv[1])

# Example: access fields from the payload
print(payload.get("FileConversionCompleted_status"))
```

### AppleScript

When an AppleScript script is executed, the event payload is injected into the script by identifying key names, such as "{FileConversionCompleted\_status}", and replacing them with corresponding values. You can test this as follows:

```
display alert "{FileConversionCompleted_status}"
```

### Event Log

All events and script execution results are recorded in the Event Log. You can find the log file at:

{% code overflow="wrap" %}

```
/Users/[your-username]/Library/Application Support/EditReady/Event Log/EditReadyEvents.log
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hedge.video/editready/automation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
