{
  "id": "localai",
  "name": "LocalAI",
  "homepage": "https://localai.io/",
  "description": "OpenAI alternative.",
  "executables": [
    "local-ai"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/localai/chat/"
    ],
    "secret": [
      "~/localai.env",
      "~/.config/localai.env"
    ]
  },
  "commands": {
    "format": 1,
    "label": "LocalAI",
    "description": "Start the LocalAI API server. Only a few commonly used flags from the official CLI reference are included.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "run"
        ],
        "label": "Run the server",
        "source": [
          {
            "id": "ref",
            "kind": "manual",
            "url": "https://raw.githubusercontent.com/mudler/LocalAI/master/docs/content/reference/cli-reference.md",
            "revision": "2026-10-27",
            "evidence": "| `--models-path` | `BASEPATH/models` | Path containing models used for inferencing |\n| `--address` | `:8080` | Bind address for the API server |\n| `--api-keys` | | List of API Keys to enable API authentication. |\n| `-t, --threads` | Automatic | Number of threads used for parallel computation. |\n| `--context-size` | | Default context size for models |\n| `--log-level` | `info` | Set the level of logs to output [error,warn,info,debug,trace] |\n./local-ai run --models-path /path/to/models --address :9090\n"
          }
        ],
        "field": [
          {
            "id": "models_path",
            "label": "Models directory",
            "type": "path",
            "option": [
              "--models-path"
            ],
            "path": {
              "kind": "directory",
              "role": "input",
              "must_exist": false
            },
            "sources": [
              "ref"
            ]
          },
          {
            "id": "address",
            "label": "Bind address",
            "type": "string",
            "option": [
              "--address"
            ],
            "suggestions": [
              {
                "value": ":8080",
                "label": ":8080 (default)"
              }
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "threads",
            "label": "Threads",
            "type": "integer",
            "option": [
              "--threads",
              "-t"
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "context_size",
            "label": "Context size",
            "type": "integer",
            "option": [
              "--context-size"
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "log_level",
            "label": "Log level",
            "type": "enum",
            "option": [
              "--log-level"
            ],
            "choices": [
              {
                "value": "error",
                "label": "error"
              },
              {
                "value": "warn",
                "label": "warn"
              },
              {
                "value": "info",
                "label": "info"
              },
              {
                "value": "debug",
                "label": "debug"
              },
              {
                "value": "trace",
                "label": "trace"
              }
            ],
            "sources": [
              "ref"
            ]
          }
        ],
        "task": [
          {
            "id": "serve",
            "label": "Serve models",
            "fields": [
              "models_path",
              "address"
            ],
            "required": [
              "models_path"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "models_path",
              "address",
              "log_level"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "threads",
              "context_size"
            ]
          }
        ]
      }
    ]
  }
}
