Collection of YAML tool profiles for Ukiryu platform-adaptive command execution framework.
The Ukiryu Tool Register contains declarative YAML profiles that define how to execute various command-line tools across different platforms, shells, and versions.
Each tool profile includes:
-
Command definitions with arguments and options
-
Platform-specific configurations (macOS, Linux, Windows)
-
Shell-specific command formatting (bash, zsh, PowerShell, etc.)
-
Version detection and compatibility handling
This register follows the v1 schema. All tool definitions conform to the schema
defined in schemas/v1/tool.schema.yaml.
-
ImageMagick - Image conversion and processing
-
Ghostscript - PostScript and PDF interpreter
-
FFmpeg - Video/audio processing
-
Pandoc - Document conversion
-
jpegoptim - JPEG optimization
-
optipng - PNG optimization
-
Inkscape - SVG vector graphics
register/
└── tools/
├── imagemagick/
│ └── 7.1.yaml # Versioned tool (specific version)
│ └── index.yaml # Version routing and implementation index
├── ghostscript/
│ ├── 9.5.yaml
│ ├── 10.0.yaml
│ └── index.yaml
├── tar/
│ ├── 1.35.yaml # GNU tar 1.35
│ ├── 1.36.1.yaml # GNU tar 1.36.1
│ ├── gnu/
│ │ └── index.yaml # GNU implementation routing
│ └── busybox/
│ └── index.yaml # BusyBox implementation routing
├── cat/
│ └── generic.yaml # Generic tool (stable interface)
├── sort/
│ └── generic.yaml # Generic tool (stable interface)
└── ...
Tool versions are routed through index.yaml files using Versionian's version range matching syntax.
Versionian is a Ruby library for declaring, parsing, comparing, and rendering version schemes. It provides:
-
Built-in schemes: Semantic (SemVer), Calendar versioning (CalVer), SoloVer, WendtVer
-
Version range matching:
equals,after,before,betweenfor version constraints -
Extensible: Custom version schemes via declarative YAML or Ruby
Ukiryu uses Versionian internally to: * Parse detected tool versions * Compare versions against range specifications * Route to the appropriate YAML file based on version matching
Each tool can have multiple implementations (GNU, BusyBox, BSD, etc.), each
with its own index.yaml:
# tools/tar/gnu/index.yaml
ukiryu_schema: '1.0'
name: tar
interface: tar
implementations:
- name: gnu
display_name: GNU tar
detection:
executable: tar
command: ["--version"]
pattern: "tar (GNU tar) ([0-9.]+)"
version_scheme: semantic (1)
versions:
# Exact version match (Versionian range type)
- equals: "1.35"
file: "1.35.yaml"
# After version 1.35 (Versionian range type)
# Uses semantic versioning comparison
- after: "1.35"
file: "1.35.yaml"
# Default file when no version matches
default: "1.35.yaml"-
version_schemetells Ukiryu which Versionian scheme to use for version comparison.
The versions array in an implementation index supports Versionian’s range types:
-
equals: "1.35"- Exact version match -
after: "1.35"- Matches any version >= 1.35 (semantic versioning) -
before: "2.0"- Matches any version < 2.0 (semantic versioning) -
between: "1.35", "2.0"- Matches versions in inclusive range [1.35, 2.0] -
between: "1.35", "2.0"- Matches versions in inclusive range [1.35, 2.0]
Each version spec must point to an actual YAML file that exists in the
implementation directory (e.g., file: "1.35.yaml").
Important: Do not use symlinks or special filenames like "latest.yaml". Always reference the actual version file that exists.
The version_scheme field specifies which Versionian scheme to use:
version_scheme: semantic # MAJOR.MINOR.PATCH (e.g., 1.35.0)
version_scheme: calver # YYYY.MM.DD (e.g., 2024.01.17)
version_scheme: solover # N[+|-]postfix (e.g., 5+hotfix)
version_scheme: wendtver # MAJOR.MINOR.PATCH.BUILDTool profiles follow the v1 schema defined in schemas.
Key fields:
name-
Tool identifier (e.g., "imagemagick")
display_name-
Human-readable name
version-
Tool version (see Version Naming)
implements-
Interface contract this tool implements (e.g., "ping" for ping_gnu, ping_bsd)
version_detection-
How to detect installed version (see Version Detection)
search_paths-
Platform-specific executable locations
profiles-
Array of platform/shell-specific configurations
commands-
Command definitions with arguments, options, and flags
Tool profiles use two distinct versioning schemes:
-
Versioned tools (e.g.,
imagemagick/7.1.yaml,ghostscript/10.0.yaml):: Tools with well-defined, detectable versions. These tools have version-specific commands, options, or behaviors that differ between releases. -
Generic tools (e.g.,
cat/generic.yaml,sort/generic.yaml):: System utilities whose core interface is stable across versions or where version detection is unreliable/unnecessary. These tools use"version: generic"instead of a numeric version.
When to use each:
-
Use versioned profiles when:
-
The tool has version-specific command syntax or options
-
Version detection is reliable via
--versionor similar -
Different versions have incompatible interfaces
-
-
Use generic profiles when:
-
The tool is a standard Unix utility with stable interface (cat, grep, sort, etc.)
-
Version output varies by OS/distribution or is unreliable
-
The command syntax hasn’t changed meaningfully across versions
-
Examples:
# Versioned tool - FFmpeg has version-specific features
name: ffmpeg
version: "8.0"
version_detection:
command: -version
pattern: ffmpeg version ([\d.]+)
# Generic tool - cat has stable interface across versions
name: cat
version: generic
version_detection:
detection_methods:
- type: command
command: --version
pattern: cat \\(GNU coreutils\\) ([\\d.]+)
- type: man_page
paths:
macos: /usr/share/man/man1/cat.1
linux: /usr/share/man/man1/cat.1
system_tool: trueVersion detection determines which installed tool version to use. Ukiryu supports multiple detection methods with automatic fallback:
- Detection Methods Array (recommended)
-
Provides multiple detection strategies with automatic fallback. If one method fails, the next is tried.
version_detection:
detection_methods:
# Method 1: Try --version flag first
- type: command
command: --version
pattern: "Version ([\\d.]+)"
# Method 2: Fall back to parsing man page
- type: man_page
paths:
macos: /usr/share/man/man1/tool.1
linux: /usr/share/man/man1/tool.1
# Method 3: Mark as system tool if detection fails
- type: system_tool
modern_threshold: "1.0" # Minimum "modern" version- Legacy Single Method (deprecated)
-
Simple single-method detection:
version_detection:
command: --version
pattern: "Version ([\\d.]+)"
modern_threshold: "1.0"Detection method types:
-
command:: Run the tool and parse stdout/stderr for version-
command:: Array of arguments (e.g.,["--version"]or["-v", "-"]) -
pattern:: Regex with capture group for version number
-
-
man_page:: Parse the man page for version information-
paths:: Platform-specific man page paths
-
-
system_tool:: Mark as OS-provided utility (no version detection)
The modern_threshold specifies the minimum version considered "modern" for compatibility
checks.
To validate a tool profile locally, install the Ukiryu gem and use the validate
command:
# Install ukiryu
gem install ukiryu
# Validate a specific profile
ukiryu validate --definition tools/imagemagick/7.1.yaml
# Validate with schema from schemas repository
ukiryu validate --definition tools/imagemagick/7.1.yaml \
--schema ../schemas/v1/tool.schema.yaml
# Validate all profiles in the register
ukiryu validate allFor executable testing (smoke tests), use the --executable flag:
ukiryu validate --definition tools/imagemagick/7.1.yaml --executableFor best practices checking, use the lint command:
# Lint a specific profile
ukiryu lint file tools/imagemagick/7.1.yaml
# Lint all profiles
ukiryu lint all
# Show all linting rules
ukiryu lint rulesGitHub Actions automatically validates all tool profiles through two workflows:
Runs on:
-
Pull requests that modify YAML files in
tools//.yamlorinterfaces//.yaml -
Pushes to
mainorv1branches -
Daily scheduled runs (midnight UTC)
-
Manual workflow dispatch
The workflow performs two levels of validation:
-
Schema validation - Always runs, validates YAML syntax and v1 schema compliance
-
Executable testing - Optional, installs actual tools and runs smoke tests
To trigger executable testing:
-
Manually: Use workflow_dispatch with
validate_executable: true -
Scheduled: Daily runs include executable testing
The workflow uses a tool installation matrix (.github/tools-matrix.yaml) to
install tools across platforms:
# Example: imagemagick installation by platform
imagemagick:
platforms:
ubuntu:
- sudo apt-get install -y imagemagick
macos:
- brew install imagemagick
windows:
- choco install imagemagick --yesRuns on:
-
Pull requests that modify YAML files
-
Pushes to
mainorv1branches -
Manual workflow dispatch
Checks for best practices violations using ukiryu lint all across Ubuntu and macOS.
You can add profile validation to your own CI/CD pipeline:
# .github/workflows/validate-profiles.yml
name: Validate Tool Profiles
on:
pull_request:
paths:
- 'tools/**/*.yaml'
push:
tags:
- 'v*'
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Install ukiryu
run: gem install ukiryu
- name: Validate profiles
run: |
# Validate all changed YAML files
ukiryu validate allThe register includes a comprehensive cross-platform package installation verification system that tests tool installation across all supported platforms.
The CI build MUST FAIL if any of the following conditions are met:
-
Installation failure - If a package fails to install via the configured package manager (apt, homebrew, chocolatey, winget, etc.), the build fails.
-
Smoke test failure - If a tool installs successfully but the smoke test (basic CLI verification) fails to execute, the build fails. The smoke test verifies the tool executable can run basic commands (e.g.,
tool --version). -
Ukiryu detection failure - If a tool passes smoke tests but Ukiryu cannot detect or execute the tool, the build fails. This ensures the tool definitions in the register accurately reflect installed tools.
These strict criteria ensure that:
-
All declared packages can be installed on their target platforms
-
Installed tools are functional and can execute commands
-
Tool definitions accurately match installed tool versions and capabilities
The installation verification runs in these phases:
-
Install phase: Install packages using platform-appropriate package managers
-
Verify phase: For each installed tool:
-
Locate the executable (checking bundled tools, package manager paths, system paths)
-
Run smoke test command to verify basic functionality (e.g.,
tool --version) -
Verify the executable exists and is accessible
-
-
Validate phase: Run Ukiryu validation to verify:
-
Tool definition matches the installed tool version
-
Tool can be detected and executed by Ukiryu
-
All declared commands and options are valid
-
For CI to pass, ALL of the following must succeed:
-
All packages in
packages/*.yamlmust install successfully (or be marked as platform-unavailable viaplatforms.windows: falseetc.) -
All installed tools must pass their smoke tests
-
All tools must be detectable and executable by Ukiryu (except on Windows where a known path handling issue currently skips this step)
To add a new tool profile:
-
Determine the appropriate version naming scheme:
-
Use versioned profiles (
tools/<tool>/<version>.yaml) for tools with version-specific interfaces -
Use generic profiles (
tools/<tool>/generic.yaml) for stable system utilities
-
-
Check the tool’s man page for command syntax
-
Create a new YAML file in
tools/<tool-name>/ -
Follow the v1 schema defined in
schemas/v1/tool.schema.yaml -
Implement version detection using
detection_methodsarray with fallback -
Validate locally:
ukiryu validate --definition tools/<tool-name>/<version>.yaml -
Test the profile with real commands
-
Submit a pull request to the
v1branch
name: imagemagick version: "7.1" version_detection: command: -version pattern: Version: ImageMagick ([\d.]+) search_paths: macos: - /opt/homebrew/bin/magick linux: - /usr/bin/convert profiles: - name: default platforms: [macos, linux] shells: [bash, zsh] commands: - name: convert # … command definition
=== Generic profile example [source,yaml]
name: cat
version: generic
version_detection:
detection_methods:
- type: command
command: --version
pattern: cat \\(GNU coreutils\\) ([\\d.]+)
- type: man_page
paths:
macos: /usr/share/man/man1/cat.1
linux: /usr/share/man/man1/cat.1
system_tool: true
search_paths:
macos:
- /usr/bin/cat
linux:
- /usr/bin/cat
profiles:
- name: unix
platforms: [macos, linux]
shells: [bash, zsh, fish, sh]
commands:
- name: concatenate
# ... command definition
Before submitting a pull request:
-
❏ YAML syntax is valid
-
❏ Conforms to v1 schema
-
❏ All required fields are present
-
❏ Tool name and version are correct
-
❏ Commands work on all supported platforms
-
❏ Version detection works if defined
-
❏ No linting warnings (or warnings are documented)
Tools are loaded automatically by Ukiryu:
require 'ukiryu'
Ukiryu::Register.default_register_path = 'path/to/register'
tool = Ukiryu::Tool.get(:imagemagick)
result = tool.execute(:convert, {
inputs: ['input.png'],
output: 'output.jpg',
resize: '50x50'
})