Welcome to LocoPilot
LocoPilot is the open-source CLI and HTTP server that lets you run AI models on your own machine, then scale to the cloud only when you need to. It is OpenAI-compatible, MIT-licensed, and ships as a single npm package.
npm install -g @infrarix/locopilot
locopilot init
locopilot start
That's it. Your local API is now serving POST /v1/chat/completions on port 8080.
What LocoPilot gives you
- 🐌 Local-first inference — every request is served by your own Ollama runtime first. Zero latency, zero per-token cost, complete data privacy.
- ⚡ Smart cloud fallback — when a model is missing locally, requests transparently route to LocoPilot Cloud (RunPod-backed serverless GPU) with a 90-second SLA.
- 🧠 Fine-tuning on your data — submit Unsloth, Axolotl, or MLX (Apple Silicon) jobs through the CLI. Alpaca and ShareGPT formats are validated for you.
- 🔌 Drop-in OpenAI compatibility — point any existing SDK (Python, Node.js, Go, Rust, LangChain) at
http://localhost:8080/v1and it just works. - 🛠️ One CLI for everything —
init,doctor,start,models,train,logs,expose,login,whoami,usage.
Two tiers
| Tier | Auth | What you get |
|---|---|---|
| Free | none | Local Ollama inference, OpenAI-compatible API, in-process fine-tuning, SQLite storage |
| Pro | locopilot login | Everything in Free + remote GPU fallback, cloud training (BullMQ-backed), Cloudflare tunnels, usage analytics |
Tier detection is purely client-side: a valid qs_ token in ~/.locopilot/config.json enables Pro features. The local CLI never needs cloud credentials.
Where to go next
- First time? → Installation → Quickstart
- Building an integration? → API reference
- Fine-tuning a model? → Training configuration
- Operating the stack? → Architecture overview
Source code
The CLI and local API live in locopilot-public-cli/src/:
| Folder | Purpose |
|---|---|
src/cli/ | Commander.js CLI — every command lives in src/cli/commands/ |
src/api/ | Fastify 5 HTTP gateway — OpenAI-compatible routes |
src/worker/ | In-process training worker (Free tier) |
src/training/ | TrainingAdapter interface, dataset validator, Unsloth / Axolotl / MLX adapters |
src/cloud/client.ts | Single source of truth for cloud HTTP calls (Pro tier) |
src/shared/ | DB pool, Ollama runtime client, shared types |