config.schema.json

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Envoke Configuration",
  "description": "Defines application environments for Envoke automatic desktop launcher. Apps are defined once in the catalog and referenced by name from each environment.",
  "type": "object",
  "required": ["apps", "environments"],
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "type": "string",
      "description": "Link to the JSON Schema for VS Code IntelliSense. Example: ./config.schema.json"
    },
    "apps": {
      "type": "object",
      "description": "Application catalog. Each key is a unique app name (e.g., 'Firefox', 'VSCode') referenced by environments. Apps are defined once here and can be shared across multiple environments.",
      "additionalProperties": {
        "type": "object",
        "required": ["path", "processName"],
        "additionalProperties": false,
        "properties": {
          "path": {
            "type": "string",
            "description": "Full path to the executable, or shell:AppsFolder\\AppUserModelId for UWP/Store apps. Win32 example: C:\\Program Files\\Mozilla Firefox\\firefox.exe. UWP example: shell:AppsFolder\\MSTeams_8wekyb3d8bbwe!MSTeams"
          },
          "processName": {
            "type": "string",
            "description": "Process name as it appears in Task Manager (without .exe). May differ from the executable name for Electron apps. Examples: firefox, Code, ms-teams, ClickUp. Use Get-Process to find the correct value."
          },
          "arguments": {
            "type": "string",
            "description": "Command-line arguments passed to the application at launch. Example: --profile Work. Can be overridden per environment in the apps reference list.",
            "default": ""
          },
          "skipMaximize": {
            "type": "boolean",
            "description": "Set to true for background processes or apps that should not be window-maximized after launch. Use for system tray apps, file explorers opened to a specific folder, or any app where maximizing is undesirable.",
            "default": false
          }
        }
      }
    },
    "settings": {
      "type": "object",
      "description": "Global settings that control tool behavior. All fields are optional — omit the entire settings block to use defaults.",
      "additionalProperties": false,
      "properties": {
        "windowTimeoutSeconds": {
          "type": "integer",
          "description": "Maximum seconds to wait for an application's window to appear after launch before marking it as a timeout failure. Applies to every app in the sequence. Default: 120 (2 minutes). Increase for slow-starting apps on cold boots; decrease for faster failure detection.",
          "default": 120,
          "minimum": 10,
          "maximum": 600
        },
        "parallelLimit": {
          "type": "integer",
          "description": "Maximum number of applications that may launch concurrently within a priority group. Default: 5. Range: 1–20. Set to 1 to effectively disable parallelism within a group. Has no effect when forceSequential is true.",
          "default": 5,
          "minimum": 1,
          "maximum": 20
        },
        "forceSequential": {
          "type": "boolean",
          "description": "When true, all applications launch sequentially one at a time regardless of priority grouping or parallelLimit. Use to troubleshoot launch ordering issues or on machines where concurrent launches cause instability. Default: false.",
          "default": false
        },
        "logDirectory": {
          "type": "string",
          "description": "Directory where the log file (ApplicationStartup.log) is written. Supports environment variables (e.g., %LOCALAPPDATA%). Default: %LOCALAPPDATA%\\Envoke\\Logs."
        },
        "enableDebug": {
          "type": "boolean",
          "description": "Enables DEBUG-level log entries to both console and log file. Equivalent to passing the -EnableDebug CLI flag. CLI -EnableDebug takes priority if both are provided.",
          "default": false
        },
        "forceEnvironment": {
          "type": "string",
          "description": "Permanently force a specific environment name (e.g., 'Work', 'Home'). Overrides schedule detection. CLI -Environment flag takes priority if both are provided."
        }
      }
    },
    "environments": {
      "type": "object",
      "description": "Named environments (e.g., 'Work', 'Home'). Each environment references apps from the catalog and optionally defines a schedule. The environment without a schedule acts as the fallback when no scheduled environment is active.",
      "additionalProperties": {
        "type": "object",
        "required": ["apps"],
        "additionalProperties": false,
        "properties": {
          "priority": {
            "type": "integer",
            "description": "Priority for schedule overlap resolution. Higher integer wins when multiple environments match the current day and time. Default: 0. Only needed when environments have overlapping schedules.",
            "default": 0
          },
          "schedule": {
            "type": "object",
            "description": "Day and time rules that activate this environment automatically. Omit entirely for the fallback environment (e.g., Home). When the current day and hour fall within the schedule, this environment is selected.",
            "required": ["days", "startHour", "endHour"],
            "additionalProperties": false,
            "properties": {
              "days": {
                "type": "array",
                "description": "Days of the week when this environment is active. Example: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday'] for a Sunday-Thursday work week.",
                "items": {
                  "type": "string",
                  "enum": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
                },
                "minItems": 1,
                "uniqueItems": true
              },
              "startHour": {
                "type": "integer",
                "description": "Hour (0-23, 24-hour clock) when this environment becomes active. Example: 7 means the environment activates at 7:00 AM.",
                "minimum": 0,
                "maximum": 23
              },
              "endHour": {
                "type": "integer",
                "description": "Hour (0-23, 24-hour clock) when this environment deactivates. Example: 15 means the environment deactivates at 3:00 PM.",
                "minimum": 0,
                "maximum": 23
              }
            }
          },
          "apps": {
            "type": "array",
            "description": "Ordered list of apps to launch in this environment. Apps launch sequentially in the order listed. Each entry references an app from the top-level apps catalog by name.",
            "items": {
              "type": "object",
              "required": ["name"],
              "additionalProperties": false,
              "properties": {
                "name": {
                  "type": "string",
                  "description": "App name matching a key in the top-level apps catalog. Case-sensitive. Example: 'Firefox' must match exactly how the app is keyed in the apps section."
                },
                "arguments": {
                  "type": "string",
                  "description": "Override the catalog arguments for this environment only. Replaces (does not append to) the catalog default. Example: '--profile Home D:\\Projects\\Personal' to open VSCode with a specific profile and folder."
                },
                "priority": {
                  "type": "integer",
                  "description": "Launch priority group for this app. Apps in higher-numbered groups launch only after all apps in lower-numbered groups have completed. Apps with the same priority launch concurrently (up to parallelLimit). Default: 0.",
                  "default": 0
                }
              }
            }
          }
        }
      }
    }
  }
}