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 }
[[commands.subcommand]]
path = ["run"]
label = "Run the server"
[[commands.subcommand.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 |
| `--address` | `:8080` | Bind address for the API server |
| `--api-keys` | | List of API Keys to enable API authentication. |
| `-t, --threads` | Automatic | Number of threads used for parallel computation. |
| `--context-size` | | Default context size for models |
| `--log-level` | `info` | Set the level of logs to output [error,warn,info,debug,trace] |
./local-ai run --models-path /path/to/models --address :9090
"""
[[commands.subcommand.field]]
id = "models_path"
label = "Models directory"
type = "path"
option = ["--models-path"]
path = { kind = "directory", role = "input", must_exist = false }
sources = ["ref"]
[[commands.subcommand.field]]
id = "address"
label = "Bind address"
type = "string"
option = ["--address"]
suggestions = [{ value = ":8080", label = ":8080 (default)" }]
sources = ["ref"]
[[commands.subcommand.field]]
id = "threads"
label = "Threads"
type = "integer"
option = ["--threads", "-t"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "context_size"
label = "Context size"
type = "integer"
option = ["--context-size"]
sources = ["ref"]
[[commands.subcommand.field]]
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"]
[[commands.subcommand.task]]
id = "serve"
label = "Serve models"
fields = ["models_path", "address"]
required = ["models_path"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["models_path", "address", "log_level"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["threads", "context_size"]