LocalAIStack is an open, modular software stack for building and operating a local AI workstation.
It provides a unified control layer for installing, managing, upgrading, and running AI development environments, inference runtimes, models, and applications on local hardware, without depending on cloud services or proprietary vendor platforms.
LocalAIStack is designed to be hardware-aware, reproducible, and extensible, serving as a long-term foundation for local AI computing.
Running AI workloads locally is no longer a niche requirement, but the local AI software ecosystem is still highly fragmented:
- Inference engines, frameworks, and applications evolve independently
- CUDA, drivers, Python, and system dependencies are tightly coupled
- Installation paths vary across different hardware configurations
- Environment drift makes systems hard to reproduce and maintain
- Many tools assume a cloud-first deployment model
LocalAIStack addresses this by treating the local AI workstation itself as infrastructure.
LocalAIStack is built around the following principles:
- Local-first: no mandatory cloud dependency, with offline operation possible when needed
- Hardware-aware: automatically adapts software capabilities based on CPU, GPU, memory, and interconnect capacity
- Modular and composable: every component is optional and independently manageable
- Reproducible by default: installation and runtime behavior is deterministic and versionable
- Open and vendor-neutral: no lock-in to a specific hardware vendor, model, or framework
LocalAIStack is not a single application. It is a layered stack made of cooperating subsystems.
- Supported operating systems:
- Ubuntu 22.04 LTS
- Ubuntu 24.04 LTS
- GPU driver and CUDA compatibility management
- System package management and mirror configuration
- Safe upgrade and rollback mechanisms
Available on demand:
- Python (multiple versions, isolated environments)
- Java (OpenJDK 8 / 11 / 17)
- Node.js (LTS, version-managed)
- Ruby
- PHP
- Rust
All language environments are optional, isolated, upgradable, and removable without polluting the host system.
Supported inference engines include:
- Ollama
- llama.cpp
- vLLM
- SGLang
Availability is constrained automatically by hardware capability. For example, when installing llama.cpp, the system should evaluate whether a GPU is available and what model it is; if no GPU is present, it should install a CPU-only variant.
- PyTorch
- TensorFlow (optional)
- Hugging Face Transformers
- LangChain
- LangGraph
- Unsloth (for local LLM fine-tuning and reinforcement learning)
Framework versions are aligned with installed runtimes and CUDA configuration. This repository already includes an unsloth module, installed by default via the official Linux path python3 -m pip install --user unsloth, and it requires Python < 3.14.
Optional local services for AI development and RAG workflows:
- PostgreSQL
- MySQL
- Redis
- ClickHouse
- Nginx
All services support:
- One-command start and stop
- Persistent data directories
- Local-only or network-accessible modes
Curated open-source AI applications deployed as managed services:
- RAGFlow
- ComfyUI
- open-deep-research
- Unsloth Studio
- Extendable through manifests
Each application includes:
- Dependency isolation
- Port management
- Unified access entry points
- VS Code (local server mode)
- Aider
- OpenCode
- RooCode
These tools are integrated but not mandatory.
LocalAIStack provides a unified model management layer:
- Model sources:
- Hugging Face
- ModelScope
- Ollama
- Supported formats:
- GGUF
- safetensors
- Capabilities:
- Search
- Download
- Integrity verification
- Hardware compatibility checks
- Repair of missing tokenizer/config support files
LocalAIStack classifies hardware into capability tiers and adapts available functionality automatically.
Example tiers:
- Tier 1: entry level (
<=14Binference) - Tier 2: mid-range (around
30Binference) - Tier 3: high-end (
>=70B, multi-GPU, NVLink)
The system should avoid installing software that the hardware cannot run reliably.
LocalAIStack provides:
- A web-based management interface
- A CLI for advanced users
- Built-in multilingual UI support
- Optional AI-assisted interface translation
- No hard-coded language assumptions
LocalAIStack
├── Control Layer
│ ├── Hardware Detection
│ ├── Capability Policy Engine
│ ├── Package & Version Management
│
├── Runtime Layer
│ ├── Container-based execution
│ ├── Native high-performance paths
│
├── Software Modules
│ ├── Languages
│ ├── Inference Engines
│ ├── Frameworks
│ ├── Services
│ └── Applications
│
└── Interfaces
├── Web UI
└── CLI
- Local LLM inference and experimentation
- RAG and agent development
- AI education and teaching labs
- Research reproducibility
- Private enterprise AI environments
- Hardware evaluation and benchmarking
LocalAIStack is under active development.
Current early priorities:
- A stable Tier 2 (around
30B) local inference workflow - Deterministic installation paths
- Clear hardware-to-capability mapping
Roadmaps and milestones will be published as the project evolves.
Minimal workflow: clone the repository, build it, then use the built CLI.
Command conventions:
- Linux/macOS:
./build/lasand./build/las-server - Windows PowerShell:
.\build\las.exeand.\build\las-server.exe
git clone <repo-url> LocalAIStack
cd LocalAIStackmake tidy
make buildBuild outputs:
- Linux/macOS:
./build/las(CLI),./build/las-server(server) - Windows PowerShell:
.\build\las.exe(CLI),.\build\las-server.exe(server)
Examples below use Linux/macOS syntax by default; in Windows PowerShell, replace ./build/las with .\build\las.exe.
Start with the overview:
./build/las --help# Interactive initialization (recommended)
./build/las init
# Non-interactive initialization (scriptable)
./build/las init \
--api-key "sk-xxxx" \
--language zh-CN \
--assistant-provider siliconflow \
--assistant-model deepseek-ai/DeepSeek-V4-Flash \
--translation-provider siliconflow \
--translation-model tencent/Hunyuan-MT-7B
# System info and hardware detection
./build/las system info
./build/las system detect
# system init is equivalent to init
./build/las system initEffects:
- Generates the config file:
$HOME/.localaistack/config.yaml - Default split responsibilities between two models:
- Translation model:
tencent/Hunyuan-MT-7B - Assistant model:
deepseek-ai/DeepSeek-V4-Flash(customizable)
- Translation model:
- Generates baseline hardware info in
base_info.jsonfor the install planner, config planner, and smart-run
# List manageable modules
./build/las module list
# Install / upgrade / uninstall / purge
./build/las module install ollama
./build/las module update ollama
./build/las module uninstall ollama
./build/las module purge ollama
# Health check
./build/las module check ollama
# For example, install the Unsloth training / fine-tuning framework
./build/las module install unsloth
./build/las module check unsloth
# Install the Unsloth Studio web UI
./build/las module install unsloth-studio
./build/las module check unsloth-studio
# Module-specific settings
./build/las module setting comfyui Comfy-Org_z_image_turboModules already integrated in this repository include inference runtimes such as ollama, llama.cpp, and vllm, model tools such as hf and modelscope, the unsloth training / fine-tuning framework, and the unsloth-studio local web UI application.
The repository also now includes an obeaver module, installable with ./build/las module install obeaver, which provisions the upstream microsoft/obeaver project. On Windows it automatically checks for and installs Foundry Local with winget install Microsoft.FoundryLocal; on macOS it automatically checks for and installs Foundry Local with brew install microsoft/foundrylocal/foundrylocal. Linux does not support Foundry Local, so use obeaver run --engine ort <local-onnx-model-dir> there.
# Generate a config plan for a module (text)
./build/las module config-plan llama.cpp
# JSON output
./build/las module config-plan llama.cpp --output json
# Demonstration only, do not write to disk
./build/las module config-plan vllm --dry-run --planner-debug
# Strict mode: fail immediately if the planner fails
./build/las module config-plan vllm --planner-strict --dry-run
# Save to ~/.localaistack/config-plans/<module>.json
./build/las module config-plan ollama --apply# Search models (supports all / ollama / huggingface / modelscope)
export HF_ENDPOINT=https://hf-mirror.com
./build/las model search qwen3
./build/las model search qwen3 --source huggingface --limit 20
# Download models
./build/las model download qwen3-coder:30b
./build/las model download unsloth/Qwen3-Coder-Next-GGUF
./build/las model download unsloth/Qwen3-Coder-Next-GGUF --file Q4_K_M.gguf
# List downloaded models
./build/las model list
# Repair missing tokenizer/config files
./build/las model repair ByteDance/Ouro-2.6B-Thinking
# Remove a model
./build/las model rm qwen3-coder:30b --force# Run GGUF (llama.cpp)
./build/las model run unsloth/Qwen3-Coder-Next-GGUF
# Specify runtime parameters
./build/las model run unsloth/Qwen3-Coder-Next-GGUF \
--ctx-size 65536 \
--threads 16 \
--n-gpu-layers 40
# Automatic batch tuning + print command only
./build/las model run unsloth/Qwen3-Coder-Next-GGUF \
--auto-batch --dry-run
# smart-run (use an LLM to recommend parameters)
./build/las model run unsloth/Qwen3-Coder-Next-GGUF \
--smart-run --smart-run-debug --dry-run
# Force refresh smart-run (ignore local cache and ask the LLM again)
./build/las model run unsloth/Qwen3-Coder-Next-GGUF \
--smart-run --smart-run-refresh --smart-run-debug --dry-run
# Inspect smart-run cache
./build/las model smart-run-cache list
./build/las model smart-run-cache list unsloth/Qwen3-Coder-Next-GGUF
# Remove smart-run cache for a model
./build/las model smart-run-cache rm unsloth/Qwen3-Coder-Next-GGUF
# Strict smart-run mode
./build/las model run unsloth/Qwen3-Coder-Next-GGUF \
--smart-run --smart-run-strict --dry-run
# Run safetensors (vLLM)
./build/las model run ByteDance/Ouro-2.6B-Thinking \
--vllm-max-model-len 8192 \
--vllm-gpu-memory-utilization 0.9# List available LLM providers
./build/las provider list
# Service management
./build/las service start ollama
./build/las service status ollama
./build/las service stop ollama# List recent failures
./build/las failure list --limit 20
# Filter by phase or category
./build/las failure list --phase smart_run --category timeout
# JSON output
./build/las failure list --output json --limit 5
# Show details and repair suggestions for one failure
./build/las failure show <event-id>Optional debug switch:
export LOCALAISTACK_FAILURE_DEBUG=1On failure it will additionally print: phase/category/retryable/log_path/suggestion.
# Bash
./build/las completion bash > /tmp/las.bash
# Zsh
./build/las completion zsh > /tmp/_las
# Fish
./build/las completion fish > /tmp/las.fish
# PowerShell
./build/las completion powershell > /tmp/las.ps1# Use a specific config file
./build/las --config /tmp/las-config.yaml module list
# Enable verbose output
./build/las --verbose model listThe following tree matches the command entry points currently registered in the CLI:
las
├─ init
├─ module
│ ├─ list
│ ├─ install <module>
│ ├─ update <module>
│ ├─ uninstall <module>
│ ├─ purge <module>
│ ├─ check <module>
│ ├─ setting <module> <setting-args...>
│ └─ config-plan <module>
├─ service
│ ├─ start <service>
│ ├─ stop <service>
│ └─ status <service>
├─ model
│ ├─ search <query>
│ ├─ download <model-id> [file]
│ ├─ list
│ ├─ run <model-id> [gguf-file-or-quant]
│ ├─ rm <model-id>
│ ├─ repair <model-id>
│ └─ smart-run-cache
│ ├─ list [model-id]
│ └─ rm <model-id>
├─ provider
│ └─ list
├─ failure
│ ├─ list
│ └─ show <event-id>
└─ system
├─ init
├─ detect
└─ info
Notes:
initis registered both at the root and assystem init; they are equivalentmodulealso has the aliasmodulesmodel repairalso has the aliasmodel fix
| Command | Purpose | Common Example |
|---|---|---|
./build/las init |
Initialize user config and baseline hardware info | ./build/las init --language zh-CN --api-key "sk-xxxx" |
./build/las system init |
System init entry equivalent to init |
./build/las system init |
./build/las system detect |
Trigger hardware detection | ./build/las system detect |
./build/las system info |
Inspect system info | ./build/las system info |
./build/las module list |
List manageable modules | ./build/las module list |
./build/las module install <module> |
Install a module | ./build/las module install ollama |
./build/las module update <module> |
Upgrade a module | ./build/las module update llama.cpp |
./build/las module uninstall <module> |
Uninstall a module | ./build/las module uninstall vllm |
./build/las module purge <module> |
Deep-clean a module | ./build/las module purge ollama |
./build/las module check <module> |
Check module health | ./build/las module check comfyui |
./build/las module setting <module> ... |
Run module-specific configuration | ./build/las module setting comfyui Comfy-Org_z_image_turbo |
./build/las module config-plan <module> |
Generate a module config plan | ./build/las module config-plan vllm --planner-debug --dry-run |
./build/las service start <service> |
Start a service | ./build/las service start ollama |
./build/las service stop <service> |
Stop a service | ./build/las service stop ollama |
./build/las service status <service> |
Show service status | ./build/las service status ollama |
./build/las provider list |
List built-in LLM providers | ./build/las provider list |
./build/las model search <query> |
Search models | ./build/las model search qwen3 --source huggingface --limit 20 |
./build/las model download <model-id> |
Download a model | ./build/las model download unsloth/Qwen3-Coder-Next-GGUF --file Q4_K_M.gguf |
./build/las model list |
List downloaded models | ./build/las model list |
./build/las model repair <model-id> |
Repair model support files | ./build/las model repair ByteDance/Ouro-2.6B-Thinking |
./build/las model rm <model-id> |
Remove a model | ./build/las model rm qwen3-coder:30b --force |
./build/las model run <model-id> |
Start a local model | ./build/las model run unsloth/Qwen3-Coder-Next-GGUF --ctx-size 65536 --threads 16 |
./build/las model run <model-id> --auto-batch |
Auto-tune batch / ubatch | ./build/las model run unsloth/Qwen3-Coder-Next-GGUF --auto-batch --dry-run |
./build/las model run <model-id> --smart-run |
Use smart-run to suggest runtime parameters | ./build/las model run unsloth/Qwen3-Coder-Next-GGUF --smart-run --smart-run-debug |
./build/las model run <model-id> --smart-run-refresh |
Ignore cache and ask the LLM again | ./build/las model run unsloth/Qwen3-Coder-Next-GGUF --smart-run --smart-run-refresh --dry-run |
./build/las model smart-run-cache list |
List smart-run cache entries | ./build/las model smart-run-cache list unsloth/Qwen3-Coder-Next-GGUF |
./build/las model smart-run-cache rm <model-id> |
Remove smart-run cache for a model | ./build/las model smart-run-cache rm unsloth/Qwen3-Coder-Next-GGUF |
./build/las failure list |
List failure records | ./build/las failure list --phase smart_run --category timeout |
./build/las failure show <event-id> |
Show failure details and suggestions | ./build/las failure show evt-xxxx |
./build/las --help: show full help- Global flags:
--config <path>: specify the config file path--verbose: enable verbose output
Purpose:
- Initialize user configuration
- Write
~/.localaistack/config.yaml - Generate
~/.localaistack/base_info.json
Common flags:
--config-path <path>: specify where to write the config--api-key <key>: set the SiliconFlow API key--language <lang>: set the interaction language, such aszh-CNoren--assistant-provider <name>/--assistant-model <id>: set the assistant model--assistant-base-url <url>/--assistant-timeout-seconds <n>: set assistant access parameters--translation-provider <name>/--translation-model <id>: set the translation model--translation-base-url <url>/--translation-timeout-seconds <n>: set translation access parameters
Purpose:
- Manage software modules, including install, upgrade, uninstall, purge, health checks, and parameter settings
Subcommands:
module list: list manageable modules and show whether they are installedmodule install <module>: install a modulemodule update <module>: upgrade a modulemodule uninstall <module>: uninstall a modulemodule purge <module>: deep-clean a modulemodule check <module>: validate whether a module is usablemodule setting <module> <setting-args...>: invoke module-specific setting logicmodule config-plan <module>: generate a configuration plan for a module
Common module config-plan flags:
--model <model-id>: include a model ID in the planning context--apply: save to~/.localaistack/config-plans/<module>.json--dry-run: print only, do not save--planner-debug: print planning source and reasoning--planner-strict: fail immediately if planning fails--output text|json: set output format
Purpose:
- Unified service lifecycle entry point
Subcommands:
service start <service>service stop <service>service status <service>
This is suitable for background services managed by LocalAIStack, such as ollama.
Purpose:
- Search, download, list, run, repair, and remove models
Subcommands:
model search <query>- Flags:
--source, -s all|ollama|huggingface|modelscope - Flags:
--limit, -n <N>
- Flags:
model download <model-id> [file]- Flags:
--source, -s <source> - Flags:
--file, -f <filename>
- Flags:
model listmodel rm <model-id>- Flags:
--force, -f - Flags:
--source, -s <source>
- Flags:
model repair <model-id>- Flags:
--source, -s <source>
- Flags:
model run <model-id> [gguf-file-or-quant]- Runtime routing:
GGUF -> llama.cpp,safetensors -> vLLM
- Runtime routing:
Common model run flags:
- Model source and file selection:
--source, -s <source>--file, -f <gguf-file>
- llama.cpp inference parameters:
--threads--ctx-size--n-gpu-layers--tensor-split--batch-size--ubatch-size--auto-batch
- Sampling parameters:
--temperature--top-p--top-k--min-p--presence-penalty--repeat-penalty--chat-template-kwargs
- vLLM parameters:
--vllm-max-model-len--vllm-gpu-memory-utilization--vllm-trust-remote-code
- Common runtime parameters:
--host--port--dry-run
smart-run-related flags:
--smart-run: enable hardware- and model-aware parameter suggestions--smart-run-debug: print parameter sources and fallback reasons--smart-run-refresh: ignore local cache and force a fresh LLM recommendation--smart-run-strict: fail immediately if smart-run fails
smart-run parameter persistence:
- Cache directory:
~/.localaistack/smart-run/ - Save timing: immediately after the model process starts successfully
- Priority order:
- Explicit user flags
- Locally saved smart-run parameters
- Fresh LLM suggestions
- Static defaults / auto-tune
Purpose:
- Inspect and remove persisted smart-run parameters
Subcommands:
model smart-run-cache list [model-id]- Flags:
--runtime llama.cpp|vllm
- Flags:
model smart-run-cache rm <model-id>- Flags:
--runtime llama.cpp|vllm
- Flags:
Purpose:
- List built-in LLM providers
Subcommands:
provider list
Purpose:
- Inspect failure records and suggested actions
Subcommands:
failure list- Flags:
--limit <N> - Flags:
--phase <phase> - Flags:
--category <category> - Flags:
--output text|json
- Flags:
failure show <event-id>
Common phase values:
install_plannerconfig_plannersmart_runmodule_installmodel_run
Purpose:
- System initialization and information entry points
Subcommands:
system init: equivalent to rootinitsystem detect: hardware detection entry pointsystem info: system information entry point
LocalAIStack is an open-source project.
- License: Apache License 2.0. See LICENSE.
- Contributions are welcome
- Vendor neutrality is a design principle
More documentation lives under docs/:
- Architecture Design
- Module System and Manifest Specification
- Hardware Capabilities and Policy Mapping
- Runtime Execution Model
- Feature List
LocalAIStack treats local AI computing as infrastructure, not as a loose collection of tools.
It aims to make local AI systems:
- Predictable
- Maintainable
- Understandable
- Sustainable for long-term use