Component Schema
Component configuration defines buildable and deployable units stored in components/<id>.json.
Schema
{
"id": "string",
"name": "string",
"local_path": "string",
"remote_path": "string",
"build_artifact": "string",
"extract_command": "string",
"version_targets": [
{
"file": "string",
"pattern": "string"
}
],
"changelog_target": "string",
"scripts": {
"lint": ["shell command"],
"test": ["shell command"],
"build": ["shell command"],
"bench": ["shell command"],
"trace": ["shell command"]
},
"extensions": {},
"release": {}
}Fields
Required Fields
id(string): Unique component identifier, derived fromlocal_pathdirectory name (lowercased)local_path(string): Absolute path to local source / git checkout directory,~is expandedremote_path(string): Remote path relative to projectbase_path(the deploy target)build_artifact(string): Build artifact path relative tolocal_path, must include filename
Important:
local_pathmust point to a git repository / source checkout, not the production deploy target. The deploy target is derived fromproject.base_path + component.remote_path. Iflocal_pathpoints to the deployed directory, builds will run inside production and uncommitted-changes checks will fail (the directory isn’t a git repo). This is a common misconfiguration after server migrations.
Optional Fields
name(string): Human-readable component name, defaults toidextract_command(string): Command to execute after artifact upload, runs inside target directory- Supports template variables:
{artifact},{targetDir}
- Supports template variables:
version_targets(array): List of version detection patternsfile(string): Path to file containing version (relative tolocal_path)pattern(string): Regex pattern to extract version (first capture group)
changelog_target(string): Path to changelog file (relative tolocal_path)extensions(object): Extension-specific settings- Keys are extension IDs (e.g.,
"wordpress","rust") - Values are extension setting objects
- Keys are extension IDs (e.g.,
scripts(object): Component-owned shell commands for extension-shaped capabilities- Supported keys:
lint,test,build,bench,trace - Each value is an array of shell commands run sequentially in
local_path - Resolution order is
scripts.<capability>first, then linked extension support, then not-applicable - Scripts receive the same runner env paths (
HOMEBOY_COMPONENT_ID,HOMEBOY_COMPONENT_PATH,HOMEBOY_RUN_DIRand sidecar file vars when relevant) as extension runners, withHOMEBOY_EXTENSION_ID=component-script - Use
scripts.build, notbuild_command;build_commandis still only a diagnostic output field.
- Supported keys:
release(object): Component-scoped release configurationenabled(boolean): Whether release pipeline is enabledsteps(array): Release step definitionssettings(object): Release pipeline settings
Runtime Requirements
Important: local_path must point to a git repository / source checkout, not the production deploy target. The deploy target is derived from project.base_path + component.remote_path. If local_path points to the deployed directory, builds will run inside production and uncommitted-changes checks will fail (the directory isn’t a git repo). This is a common misconfiguration after server migrations.
{
"command": "component.env",
"id": "example",
"extension": "example-extension",
"runtimes": {
"php": { "version": "8.2", "source": "component" },
"node": { "version": "22", "source": "extension:example-extension" }
}
}Important: local_path must point to a git repository / source checkout, not the production deploy target. The deploy target is derived from project.base_path + component.remote_path. If local_path points to the deployed directory, builds will run inside production and uncommitted-changes checks will fail (the directory isn’t a git repo). This is a common misconfiguration after server migrations.
Hook Fields
- Supports template variables:
{artifact},{targetDir}
local_path vs remote_path
local_path (source) remote_path (deploy target)
┌──────────────────────────┐ ┌──────────────────────────────────────────┐
│ ~/repos/extrachill-api/ │ ── build ──▶ │ /var/www/site/wp-content/plugins/ │
│ (git checkout, builds │ deploy │ extrachill-api/ │
│ run here) │ │ (project.base_path + remote_path) │
└──────────────────────────┘ └──────────────────────────────────────────┘file(string): Path to file containing version (relative tolocal_path)pattern(string): Regex pattern to extract version (first capture group)
homeboy component env reports runtime requirements in a generic runtimes map:
Example
{
"id": "extrachill-api",
"name": "Extra Chill API",
"local_path": "/Users/dev/extrachill-api",
"remote_path": "wp-content/plugins/extrachill-api",
"build_artifact": "build/extrachill-api.zip",
"extract_command": "unzip -o {{artifact}} && rm {{artifact}}",
"version_targets": [
{
"file": "composer.json",
"pattern": ""version":\s*"([^"]+)""
}
],
"changelog_target": "CHANGELOG.md",
"pre_version_bump_commands": [
"./scripts/verify-generated-sources"
],
"post_version_bump_commands": [
"./scripts/refresh-versioned-artifacts"
],
"post_release_commands": [
"echo 'Release complete!'"
],
"extensions": {
"wordpress": {
"settings": {
"php_version": "8.1"
}
}
},
"release": {
"enabled": true,
"steps": [
{
"id": "test",
"type": "extension.run",
"label": "Run Tests",
"config": {
"extension": "rust"
}
}
]
}
}Version Target Format
Runtime IDs are extension-owned strings. source is component for component config or detector output and extension:<id> for extension-provided defaults. Legacy component extension settings such as { "php": "8.2", "node": "22" } are still parsed for compatibility; new config should use runtimes.
pre_version_bump_commands (array of strings): Commands to run BEFORE version targets are updated
- Keys are extension IDs (e.g.,
"wordpress","rust") - Values are extension setting objects
Extract Command Context
post_version_bump_commands (array of strings): Commands to run AFTER version files are updated
- Supported keys:
lint,test,build,bench,trace - Each value is an array of shell commands run sequentially in
local_path - Resolution order is
scripts.<capability>first, then linked extension support, then not-applicable - Scripts receive the same runner env paths (
HOMEBOY_COMPONENT_ID,HOMEBOY_COMPONENT_PATH,HOMEBOY_RUN_DIRand sidecar file vars when relevant) as extension runners, withHOMEBOY_EXTENSION_ID=component-script - Use
scripts.build, notbuild_command;build_commandis still only a diagnostic output field.
post_release_commands (array of strings): Commands to run after the release pipeline completes
enabled(boolean): Whether release pipeline is enabledsteps(array): Release step definitionssettings(object): Release pipeline settings
Storage Location
Setting local_path to the same directory as the deploy target is a misconfiguration — builds would run in production and homeboy deploy would fail uncommitted-changes checks.
- Supports template variables:
{artifact},{targetDir}
Related
file(string): Path to file containing version (relative tolocal_path)pattern(string): Regex pattern to extract version (first capture group)