Building a script
This guide explains how to create a valid configuration file for execute applications on the Dione platform. The file should be written in JSON format and describe the required dependencies, installation steps, environment setup, and startup commands for the application.
File Structure
The configuration file should follow this structure:
{
"dependencies": { ... },
"installation": [ ... ],
"start": [ ... ]
}
Each section is explained in detail below.
Dependencies
This section lists all external dependencies that must be available before running the application. Dione will ensure these are installed or notify the user if missing.
Format
- Key: the dependency name (e.g.,
git
) - Value: an object that specifies the version
Example
"dependencies": {
"git": {
"version": "latest"
},
"uv": {
"version": "latest"
}
}
You can specify a specific version like "3.10"
instead of "latest"
if needed.
Installation
This section defines the steps required to install or set up the application after cloning the repository.
Each step includes:
-
name
: a human-readable description of the step -
env
(optional): environment specification for running commands -
commands
: a list of commands to run-
Simple commands: plain strings
-
Platform-specific commands: use an object with:
platform
: one ofwindows
,linux
,mac
command
: the command string
-
Example
"installation": [
{
"name": "Cloning repository",
"commands": [
"git clone https://github.com/myshell-ai/MeloTTS.git melotts"
]
},
{
"name": "Installing requirements",
"env": {
"name": "env",
"version": "3.10"
},
"commands": [
"cd melotts",
"uv pip install -e .",
"python -m unidic download"
]
}
]
env.name
: the name of the virtual environment or tool wrapper (e.g.,env
ormyenv
).env.version
: the interpreter version to use (e.g.,3.10
).
When env
is specified, all commands in that step will run within the given environment.
Dione will also add the dependency uv
to the dependencies automatically, if it is not already specified.
Environment Usage in Start
You can also specify which environment to use when launching your application in the start
section.
Example
"start": [
{
"name": "Starting MeloTTS",
"catch": "8888",
"env": "env",
"commands": [
"cd melotts/melo",
"uv run app.py --port 8888"
]
}
]
env
in astart
step refers to the environment by name (matchingenv.name
in installation).- Dione will activate this environment before running the commands.
Start
This section defines how to launch the application after installation.
Keys
name
: a description of the launch stepcatch
(optional): a port number or keyword Dione can watch to detect that the app is runningenv
(optional): the environment name to activatecommands
: same format as in the installation section
Full Start Example
"start": [
{
"name": "Starting MeloTTS",
"catch": "8888",
"env": "env",
"commands": [
"cd melotts/melo",
"uv run app.py --port 8888"
]
}
]
Tips & Best Practices
- Use clear, descriptive
name
values for each step. - Include
env
blocks for steps that require a specific interpreter or wrapper. - Always include platform-specific commands where necessary.
- Use the
catch
key to help Dione detect when the application is ready. - Test each command manually on each platform and environment.
Full Example
{
"dependencies": {
"git": { "version": "latest" },
"uv": { "version": "latest" }
},
"installation": [
{
"name": "Cloning repository",
"commands": [
"git clone https://github.com/myshell-ai/MeloTTS.git melotts"
]
},
{
"name": "Installing requirements",
"env": { "name": "env", "version": "3.10" },
"commands": [
"cd melotts",
"uv pip install -e .",
"python -m unidic download"
]
}
],
"start": [
{
"name": "Starting MeloTTS",
"catch": "8888",
"env": "env",
"commands": [
"cd melotts/melo",
"uv run app.py --port 8888"
]
}
]
}
Create a folder called melotts
and place the dione.json
file inside it.
Now you can make a pull request to the Official Dione Scripts to add your application to the list of available applications.