Skip to main content

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/v1 and it just works.
  • 🛠️ One CLI for everythinginit, doctor, start, models, train, logs, expose, login, whoami, usage.

Two tiers

TierAuthWhat you get
FreenoneLocal Ollama inference, OpenAI-compatible API, in-process fine-tuning, SQLite storage
Prolocopilot loginEverything 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

Source code

The CLI and local API live in locopilot-public-cli/src/:

FolderPurpose
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.tsSingle source of truth for cloud HTTP calls (Pro tier)
src/shared/DB pool, Ollama runtime client, shared types