CLI, MCP and library
The same 66 tools are exposed three ways. There is one implementation per tool; the surfaces are thin adapters over it.
CLI
cleya <tool> [options]
Results are JSON on stdout — exit code 0 on success, 1 on failure. Colour and the branded header
appear only when stdout is an interactive terminal, so piping or redirecting gives you clean,
parseable output. NO_COLOR is honoured.
cleya --help # tools grouped by category
cleya <tool> --help # options for one tool
cleya recipes # goal → tool-sequence discovery
cleya capabilities # the whole manifest, machine-readable
Flag grammar is uniform: --output is canonical with --out as a universal alias, underscores
and hyphens are interchangeable, and comma-lists are equivalent to repeated flags.
MCP
{
"mcpServers": {
"cleya": { "command": "cleya-mcp" }
}
}
Tools are registered as cleya_<tool> with Zod schemas. The server's instructions steer an agent
toward the right path rather than making it guess — the single biggest failure mode in practice
was never capability, it was discoverability: a capable agent hand-rolling FFmpeg or raw
Chrome because it could not find the tool that already did the job.
Start any session with cleya_capabilities — one call returns every tool with its options,
examples, category, cost hint and platform constraints.
Library
import { render, draft, contrast, brandCheck, resolveConfig } from "cleya";
const config = resolveConfig({ ffmpeg_path: "/opt/homebrew/bin/ffmpeg" });
const result = await draft({ starter: "promo-hero", brand: "brand.json" }, config);
Every tool is (params, config) => Promise<ToolResult<T>>, fully typed. Core helpers are
exported too — resolveConfig, the platform presets, the scene compiler, the starter loader and
the harvest primitives.