Creating a Dione Script

This guide explains how to create a valid dione.json configuration file. This JSON file defines your application’s dependencies, installation steps, environment setup, and startup commands.

File Structure

The configuration file must follow this structure:

{
  "requirements": { ... },
  "dependencies": { ... },
  "installation": [ ... ],
  "start": [ ... ]
}

1. Requirements

This section checks if the user’s device meets the necessary hardware or OS requirements.

Format

  • Key: Requirement name (e.g., gpus).
  • Value: Array of supported values. An empty array [] means no restriction.
RequirementDescriptionExample Values
gpusSupported GPU vendors["nvidia", "amd"]
osSupported Operating Systems["windows", "linux"]

Example

"requirements": {
    "gpus": ["nvidia", "amd"],
    "os": ["windows"] // Only runs on Windows
}

2. Dependencies

Dione automatically installs these external tools if they are missing.

Available Dependencies

DependencyDescription
gitGit version control system
git_lfsGit Large File Storage
condaConda package manager
uvFast Python package installer (Recommended)
ffmpegMultimedia framework
nodeNode.js runtime
pnpmFast package manager for Node
build_toolsVisual Studio Build Tools (Windows)
cudaCUDA Toolkit for NVIDIA GPUs
ollamaOllama server for running LLMs

Example

"dependencies": {
  "git": { "version": "latest" }
}

3. Installation

Defines the steps to install and set up the application.

Step Properties

Each installation step is an object with the following fields:

FieldTypeDescription
nameStringRequired. Human-readable description of the step.
commandsArrayRequired. List of commands to execute.
envObject/StringEnvironment to run commands in (details below).
parallelBooleanIf true, runs commands simultaneously. Default: false.
variablesArrayList of environment variables to set for this step.

The env Object

The env property allows you to create isolated environments.

  • Structure: { "name": "env_name", "type": "uv" | "conda", "version": "3.10" }
  • Usage: If specified, all commands in the step run inside this environment.

Command Format

Commands can be simple strings or objects for platform specifics:

  • String: "pip install -r requirements.txt"
  • Object:
    {
      "platform": "windows",
      "gpus": "nvidia",
      "command": "pip install torch --index-url ..."
    }

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", "type": "uv" },
    "variables": [
      { "key": "MODEL_PATH", "value": "./models" }
    ],
    "commands": ["cd melotts", "uv pip install -e ."]
  }
]

4. Start

Defines how to launch the application. You can provide multiple start options (e.g., “Default”, “Debug”, “Custom Port”).

Step Properties

FieldTypeDescription
nameStringRequired. Name of the start option.
commandsArrayList of commands to execute.
catchString/NumberPort or keyword Dione monitors to know the app is ready.
envObject/StringEnvironment to activate (reuse the one from Installation).
stepsArrayFor complex startup sequences involving multiple stages.
customizableBooleanIf true on a command object, allows user input.

Customizable Commands

Allow users to modify parameters before launch:

{
  "command": "python main.py --port 8080",
  "customizable": true
}

Examples

Simple Start:

"start": [
  {
    "name": "Starting MeloTTS",
    "catch": "8888",
    "env": "env",
    "commands": ["cd melotts/melo", "uv run app.py --port 8888"]
  }
]

Multiple & Customizable Start:

"start": [
  {
    "name": "Default Start",
    "catch": "8188",
    "env": "env",
    "commands": ["cd melotts/melo", "uv run app.py --port 8188"]
  },
  {
    "name": "Start with Params",
    "catch": "8288",
    "env": "env",
    "steps": [
      {
        "name": "Starting",
        "commands": [
          "cd melotts/melo",
          { "command": "uv run app.py --port 8288", "customizable": true }
        ]
      }
    ]
  }
]

Full Example

{
  "requirements": {
    "gpus": ["nvidia", "amd"],
    "os": ["windows", "linux"]
  },
  "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"],
      "variables": [ { "key": "DEV_MODE", "value": "false" } ]
    },
    {
      "name": "Start with Custom Port",
      "catch": "9000",
      "env": "env",
      "commands": ["cd melotts/melo", "uv run app.py --port 9000"]
    }
  ]
}

Tips & Best Practices

  • Use descriptive names: Help users understand what each step does.
  • Use env blocks: Isolate dependencies to avoid conflicts.
  • Use catch: Ensure Dione knows when to show the “Open” button.
  • Test compatibility: Verify commands on all supported platforms (Windows/Linux).

Submitting Your Script

Watch our video tutorial or follow these steps:

  1. Upload to GitHub: Host your dione.json in a public repository.
  2. Go to Dione: Navigate to your Account > Scripts.
  3. Submit: Click “Submit Script”.
  4. Fill Details:
    • Enter the repository URL.
    • Important: Fill the “commit hash” field with the latest commit hash to strictly version your script (security requirement).
  5. Review: Click “Submit for review”. Your script will be reviewed shortly.