generated: '2026-08-27' method: searched source: https://localai.io/reference/cli-reference docs: https://localai.io/reference/cli-reference name: local-ai description: >- LocalAI ships as a single Go binary named `local-ai` which is both the server and the CLI. Unusually, the CLI is not a client wrapper around a hosted API — `local-ai run` IS the API. Subcommands additionally expose inference, agents and the MCP admin server without a running HTTP server, and every flag has an equivalent environment variable (environment variables take precedence over flags). install_methods: - method: container recommended: true registry: docker.io/localai/localai (mirror quay.io/go-skynet/local-ai) docs: https://localai.io/installation/ - method: install script command: 'curl https://localai.io/install.sh | sh' probed_status: 200 - method: macos-dmg asset: LocalAI.dmg docs: https://localai.io/docs/getting-started/macos/ - method: linux-binary assets: - local-ai-v4.9.0-linux-amd64 - local-ai-v4.9.0-linux-arm64 - local-ai-v4.9.0-darwin-arm64 docs: https://localai.io/installation/ - method: kubernetes chart: local-ai (https://go-skynet.github.io/helm-charts) docs: https://localai.io/installation/ note: Chart 3.4.2 / appVersion 2.23, last published 2024-11-21 — see packages/localai-packages.yml. - method: source command: 'GO_TAGS=auth make build' docs: https://localai.io/installation/ commands: - name: run description: Start the LocalAI server and HTTP API. - name: models description: Manage LocalAI models and definitions. - name: backends description: Manage LocalAI backends and definitions. - name: chat description: Run the built-in terminal agent against a LocalAI server. - name: tts description: Convert text to speech. - name: sound-generation description: Generate audio files from text or audio. - name: transcript description: Convert audio to text. - name: agent description: Run agents standalone without the full LocalAI server. - name: mcp-server description: >- Run the LocalAI admin tool surface as a stdio MCP server controlling a remote LocalAI instance over HTTP. Flags --target , --api-key , --read-only. See mcp/localai-mcp.yml. - name: worker description: Start a worker for distributed mode (generic, backend-agnostic). - name: p2p-worker description: Run workers to distribute workload via p2p (llama.cpp only). - name: agent-worker description: Start an agent worker for distributed mode (executes agent chats via NATS). - name: util description: Utility commands. - name: explorer description: Run the P2P explorer. - name: federated description: Run LocalAI in federated mode. - name: completion description: Generate shell completion scripts for bash, zsh or fish. flag_groups: - name: Global examples: ['--log-level (error|warn|info|debug|trace)', '--debug (DEPRECATED)'] - name: Storage examples: ['--models-path', '--data-path', '--generated-content-path', '--upload-path', '--localai-config-dir'] - name: Backend - name: Models - name: Performance examples: ['--f16'] - name: API examples: ['--address'] - name: Hardening examples: ['LOCALAI_OPAQUE_ERRORS', 'LOCALAI_DISABLE_API_KEY_REQUIREMENT_FOR_HTTP_GET'] - name: Authentication examples: ['LOCALAI_AUTH', 'LOCALAI_OIDC_ISSUER', '--disable-local-auth', 'LOCALAI_REGISTRATION_MODE'] - name: Chat - name: P2P examples: ['--p2p', '--federated'] env_var_convention: prefix: LOCALAI_ precedence: Environment variables take precedence over CLI flags. dotenv: Supported via .env files; see https://localai.io/advanced/ shell_completion: shells: [bash, zsh, fish] command: local-ai completion docs: https://localai.io/reference/shell-completion