LocalAI/core/cli
LocalAI [bot] d200401e86
feat: Add --data-path CLI flag for persistent data separation (#8888)
feat: add --data-path CLI flag for persistent data separation

- Add LOCALAI_DATA_PATH environment variable and --data-path CLI flag
- Default data path: /data (separate from configuration directory)
- Automatic migration on startup: moves agent_tasks.json, agent_jobs.json, collections/, and assets/ from old config dir to new data path
- Backward compatible: preserves old behavior if LOCALAI_DATA_PATH is not set
- Agent state and job directories now use DataPath with proper fallback chain
- Update documentation with new flag and docker-compose example

This separates mutable persistent data (collectiondb, agents, assets, skills) from configuration files, enabling better volume mounting and data persistence in containerized deployments.

Signed-off-by: localai-bot <localai-bot@noreply.github.com>
Co-authored-by: localai-bot <localai-bot@noreply.github.com>
2026-03-09 14:11:15 +01:00
..
context chore: allow to set local-ai log format, default to custom one (#7679) 2025-12-21 21:21:59 +01:00
worker chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
backends.go chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
cli.go feat: Add shell completion support for bash, zsh, and fish (#8851) 2026-03-08 09:32:39 +01:00
completion.go feat: Add shell completion support for bash, zsh, and fish (#8851) 2026-03-08 09:32:39 +01:00
completion_test.go feat: Add shell completion support for bash, zsh, and fish (#8851) 2026-03-08 09:32:39 +01:00
explorer.go chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
federated.go chore: update cogito and simplify MCP logics (#6413) 2025-10-09 12:36:45 +02:00
models.go fix(cli): import via CLI needs system state (#7746) 2025-12-27 11:10:28 +01:00
run.go feat: Add --data-path CLI flag for persistent data separation (#8888) 2026-03-09 14:11:15 +01:00
soundgeneration.go fix: Remove debug print statement from soundgeneration.go (C2) (#8843) 2026-03-08 08:49:29 +01:00
transcript.go fix: rename json_verbose to verbose_json (#8627) 2026-02-23 17:57:06 +00:00
tts.go chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
util.go chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00