Specification
The Commandly specification defines a standard, language-agnostic JSON format for describing CLI tools. It can be used to:
- Build interactive UI for CLI tools
- Generate CLI command strings automatically
- Power AI-assisted tool configuration
- Programtically call cli tools from code
Format
Commands own their parameters, so the hierarchy is expressed by nesting. This mirrors how most CLI tools present their help output, and it means a parameter's key only needs to be unique among its own command's parameters - the same flag can appear on sibling commands without renaming.
A parameter with recursive: true is inherited by every command beneath the one it belongs to. A parameter on the tool's own parameters array with recursive: true is inherited by the whole tree.
See Schema Reference for the full object reference.
JSON Schema
A machine-readable JSON Schema is published at:
https://commandly.divyeshio.in/specification/tool.json
Add $schema to your tool JSON file to enable editor autocomplete and validation:
{
"$schema": "https://commandly.divyeshio.in/specification/tool.json",
"binaryName": "mytool",
"displayName": "My Tool",
"parameters": [],
"commands": []
}