# bigroy/ayon-launch-scripts architecture

> Architecture diagram of the GitHub repository bigroy/ayon-launch-scripts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bigroy/ayon-launch-scripts
- Repository: https://github.com/bigroy/ayon-launch-scripts

## Overview

AYON Launch Scripts provides CLI-driven execution of Python scripts and headless publishing inside supported DCC applications. The main workflow resolves an application variant, builds its AYON context and host-specific launch arguments, then runs a script and relays process output and status. Publishing adds a workfile-opening publish script and configurable pre/post hooks; a launcher action can find the latest workfile and submit a farm publish. The graph reflects sampled calls and README capabilities; hook dispatch and some publish internals were not sampled, so those links are marked unverified.

Main entry points: [`client/ayon_launch_scripts/addon.py`](https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/addon.py) (CLI commands), [`client/ayon_launch_scripts/plugins/launcher_actions/publish_last_workfile.py`](https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/plugins/launcher_actions/publish_last_workfile.py) (Publish launcher action), [`client/ayon_launch_scripts/run_script.py`](https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/run_script.py) (Host launcher), [`client/ayon_launch_scripts/scripts/publish_script.py`](https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/scripts/publish_script.py) (Publish entry script)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and launch"]
  node_addon["CLI commands<br/>[addon.py]"]
  node_variant["Variant lookup<br/>[lib.py]"]
  node_launcher["Host launcher<br/>[run_script.py]"]
  node_output["Output relay<br/>[lib.py]"]
end

subgraph group_publish["Publishing workflow"]
  node_publish_script["Publish entry script<br/>[publish_script.py]"]
  node_hooks["Pre/post scripts"]
  node_fusion_entry["Fusion entry script"]
  node_workfile["Latest workfile lookup<br/>[lib.py]"]
  node_skip_checks["Publish skip checks"]
end

subgraph group_farm["Farm submission"]
  node_farm_action["Publish launcher action"]
end

subgraph group_server["Server addon"]
  node_server_addon["Server addon<br/>[__init__.py]"]
  node_settings["Addon settings<br/>[main.py]"]
end

node_user(("AYON operator"))
node_dcc["DCC application"]
node_deadline["Deadline service"]

node_user -->|"runs command"| node_addon
node_addon -->|"resolves variant"| node_variant
node_addon -->|"launches script"| node_launcher
node_launcher -->|"starts process"| node_dcc
node_addon -->|"relays output"| node_output
node_addon -->|"selects entry script"| node_publish_script
node_publish_script -.->|"dispatches hooks"| node_hooks
node_launcher -->|"configures launch entry"| node_fusion_entry
node_farm_action -->|"finds workfile"| node_workfile
node_farm_action -->|"builds publish command"| node_addon
node_farm_action -->|"submits job"| node_deadline
node_hooks -->|"includes check"| node_skip_checks
node_server_addon -->|"loads settings"| node_settings

click node_addon "https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/addon.py"
click node_variant "https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/lib.py"
click node_launcher "https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/run_script.py"
click node_output "https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/lib.py"
click node_publish_script "https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/scripts/publish_script.py"
click node_hooks "https://github.com/bigroy/ayon-launch-scripts/tree/main/client/ayon_launch_scripts/pre_post_scripts"
click node_fusion_entry "https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/scripts/fusion_launch_script.py3"
click node_workfile "https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/lib.py"
click node_skip_checks "https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/pre_post_scripts/quit_on_only_workfile_instance.py"
click node_farm_action "https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/plugins/launcher_actions/publish_last_workfile.py"
click node_server_addon "https://github.com/bigroy/ayon-launch-scripts/blob/main/server/__init__.py"
click node_settings "https://github.com/bigroy/ayon-launch-scripts/blob/main/server/settings/main.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_addon,node_variant,node_launcher,node_output toneBlue
class node_publish_script,node_hooks,node_fusion_entry,node_workfile,node_skip_checks toneAmber
class node_farm_action toneMint
class node_server_addon,node_settings toneRose
class node_user,node_dcc,node_deadline toneIndigo
```

## Components

### CLI and launch

- [CLI commands](https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/addon.py): `client/ayon_launch_scripts/addon.py`
- [Variant lookup](https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/lib.py): `client/ayon_launch_scripts/lib.py`
- [Host launcher](https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/run_script.py): `client/ayon_launch_scripts/run_script.py`
- [Output relay](https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/lib.py): `client/ayon_launch_scripts/lib.py`

### Publishing workflow

- [Publish entry script](https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/scripts/publish_script.py): `client/ayon_launch_scripts/scripts/publish_script.py`
- [Pre/post scripts](https://github.com/bigroy/ayon-launch-scripts/tree/main/client/ayon_launch_scripts/pre_post_scripts): `client/ayon_launch_scripts/pre_post_scripts`
- [Fusion entry script](https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/scripts/fusion_launch_script.py3): `client/ayon_launch_scripts/scripts/fusion_launch_script.py3`
- [Latest workfile lookup](https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/lib.py): `client/ayon_launch_scripts/lib.py`
- [Publish skip checks](https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/pre_post_scripts/quit_on_only_workfile_instance.py): `client/ayon_launch_scripts/pre_post_scripts/quit_on_only_workfile_instance.py`

### Farm submission

- [Publish launcher action](https://github.com/bigroy/ayon-launch-scripts/blob/main/client/ayon_launch_scripts/plugins/launcher_actions/publish_last_workfile.py): `client/ayon_launch_scripts/plugins/launcher_actions/publish_last_workfile.py`

### Server addon

- [Server addon](https://github.com/bigroy/ayon-launch-scripts/blob/main/server/__init__.py): `server/__init__.py`
- [Addon settings](https://github.com/bigroy/ayon-launch-scripts/blob/main/server/settings/main.py): `server/settings/main.py`

### Other components

- **AYON operator**
- **DCC application**
- **Deadline service**

## Connections

- AYON operator → CLI commands: runs command (evidence: `README.md`)
- CLI commands → Variant lookup: resolves variant (evidence: `client/ayon_launch_scripts/addon.py`)
- CLI commands → Host launcher: launches script (evidence: `client/ayon_launch_scripts/addon.py`)
- Host launcher → DCC application: starts process (evidence: `client/ayon_launch_scripts/run_script.py`)
- CLI commands → Output relay: relays output (evidence: `client/ayon_launch_scripts/addon.py`)
- CLI commands → Publish entry script: selects entry script (evidence: `client/ayon_launch_scripts/addon.py`)
- Publish entry script → Pre/post scripts: dispatches hooks
- Host launcher → Fusion entry script: configures launch entry (evidence: `client/ayon_launch_scripts/run_script.py`)
- Publish launcher action → Latest workfile lookup: finds workfile (evidence: `client/ayon_launch_scripts/plugins/launcher_actions/publish_last_workfile.py`)
- Publish launcher action → CLI commands: builds publish command (evidence: `client/ayon_launch_scripts/plugins/launcher_actions/publish_last_workfile.py`)
- Publish launcher action → Deadline service: submits job (evidence: `client/ayon_launch_scripts/plugins/launcher_actions/publish_last_workfile.py`)
- Pre/post scripts → Publish skip checks: includes check
- Server addon → Addon settings: loads settings (evidence: `server/__init__.py`)
