Skip to content

Instantly share code, notes, and snippets.

@wesleycoder
Last active January 17, 2026 18:47
Show Gist options
  • Select an option

  • Save wesleycoder/96af12e8fb9aeb0963ba66a449fe675e to your computer and use it in GitHub Desktop.

Select an option

Save wesleycoder/96af12e8fb9aeb0963ba66a449fe675e to your computer and use it in GitHub Desktop.
Pitchfork Schema file

Pitchfork schema file

Pitchfork doesn't have a public json schema available so I put this one together, feel free to use this or suggest changes.

To add this schema to your pitchfork.toml use this syntax and url in the first line of the file:

#:schema https://gist.githubusercontent.com/wesleycoder/96af12e8fb9aeb0963ba66a449fe675e/raw/pitchfork.schema.json

# ... the rest of your file
{
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "Pitchfork Configuration",
"description": "Schema for pitchfork.toml configuration files",
"type": "object",
"properties": {
"daemons": {
"type": "object",
"description": "Define background services (daemons) for your project.",
"additionalProperties": {
"type": "object",
"required": [
"run"
],
"properties": {
"run": {
"type": "string",
"description": "The command used to start the daemon."
},
"auto": {
"type": "array",
"description": "Automatic lifecycle management actions.",
"items": {
"type": "string",
"enum": [
"start",
"stop"
]
}
},
"ready": {
"type": "object",
"description": "Conditions that indicate the daemon is ready.",
"oneOf": [
{
"properties": {
"delay": {
"type": "integer",
"description": "Seconds to wait before assuming ready."
}
},
"required": [
"delay"
]
},
{
"properties": {
"http": {
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri"
}
},
"required": [
"url"
]
}
},
"required": [
"http"
]
}
]
},
"ready_output": {
"type": "string",
"description": "Regex pattern in stdout/stderr that indicates the daemon is ready."
},
"depends": {
"type": "array",
"description": "List of daemon IDs that must be ready before this one starts.",
"items": {
"type": "string"
}
},
"cron": {
"type": "object",
"description": "Cron schedule table for scheduled tasks. Use either table form (`[daemons.<id>.cron]`) or inline table (`cron = { schedule = \"...\", retrigger = \"...\" }`).",
"additionalProperties": false,
"required": [
"schedule"
],
"properties": {
"schedule": {
"type": "string",
"description": "Standard cron expression for scheduled tasks."
},
"retrigger": {
"type": "string",
"description": "Behavior when a previous job is still running (e.g. 'finish' waits for previous run, 'always' starts new run).",
"enum": [
"finish",
"always",
"success",
"fail"
]
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment