API Reference
Namespaces
Classes
Events
Global
Externals

Namespace: CLI

CIQ. CLI

Command Line Interface plugin.

Type Definitions


Registry

A collection of commands for the CLI.

Properties:

SingleRegistryItem

CLI command registry entry type

Type:
  • Object
Properties:
Name Type Argument Description
func function

The function to execute for the command.

man string <optional>

The cmd documentation, "manpage"

opts string <optional>

Command line options for the command. Use a colon to indicate an option that requires a value.

usage string <optional>

Usage string for the command.

ai Object <optional>

AI-specific metadata for tool generation.

Properties
Name Type Argument Description
description string <optional>

Description of the AI tool for LLM consumption.

parameters Array.<Object> <optional>

Array of parameter definitions for the AI tool.

parameters[].type string <optional>

Parameter type (e.g., "string", "number").

parameters[].name string <optional>

Parameter name.

parameters[].description string <optional>

Parameter description.

parameters[].required boolean <optional>

Whether the parameter is required.

parameters[].enum Array.<string> <optional>

Array of valid values for the parameter.

parameters[].examples Array.<string> <optional>

Array of example values for the parameter.

parameters[].pattern string <optional>

Regex pattern or format description for validation.

func function | string <optional>

Function that transforms AI parameters into CLI commands, or "cli" to use the default CLI function.

Example
{
  func: function func() {
    if (func.opts.e) {
      this.echo("Example option");
    }
    this.echo("Example command");
  },
  man: "Example command description",
  opts: "e",
  usage: "example [-e]",
  ai: {
    description: "AI tool description",
    parameters: [
      {
        type: "string",
        name: "paramName",
        description: "Parameter description",
        required: true
      }
    ],
    func: "cli"  // or custom function: (param) => "command " + param
  }
}