Local Keep AI
An AI coding CLI that runs on your own machine, hands back real files, and cannot run up a bill you did not agree to.
pip install local-keep-ai-cli
No npm. No Docker. No subscription required.
Quickstart
After install, the command is lk.
Fastest path — a free hosted model
# Get a free OpenRouter key (no billing required) at openrouter.ai/keys
export SAGE_OPENROUTER_API_KEY="sk-or-v1-..."
lk ask "build a TODO app" --out ./my-todo --model openrouter:qwen/qwen3-coder:free
Offline path — a local model, no network at all
lk install # installs the Ollama runtime and default models
lk ask "build a TODO app" --out ./my-todo --model ollama:qwen3:latest
lk install is safe to re-run — already-installed pieces are skipped.
Interactive
lk run # interactive coding agent: READ / SEARCH / edit / run
lk run is the REPL, and where the slash commands below live.
Why this instead of a hosted coding assistant
It keeps working with the network off. Local GGUF inference runs in-process. The offline test suite does not merely check that a model loads — it blocks the network at the OS level, generates real text, then re-inspects the OS socket table to prove the process held no network socket while the model was resident.
Your code stays yours. With a local model, prompts and source never leave the machine. Nothing is uploaded for training.
It writes real files. Output is a working tree on disk you can cd into,
run, and commit — not a chat transcript you copy out of a browser tab.
Predictable cost. Local models cost nothing to run. Hosted models are opt-in
per invocation via --model.
Models
Over 1,100 models in the catalogue — roughly 466 you can run on your own machine and 667 hosted.
lk models # list models from all configured providers
lk models --ollama # everything available to pull from Ollama
lk models --category coding # coding, reasoning, general, vision, small, embedding
lk models --search qwen # search the catalogue
lk models --details # full descriptions, with pros and cons
Download and register a local GGUF model:
lk pull <model> # download a GGUF from the shared bucket — no API key needed
lk train <model> # register a downloaded GGUF for use
lk use <model> # set it as the default
lk rm <model> # remove it and free the disk space
The number of models you actually see is device-dependent: entries that neither your machine nor the server it is talking to can run are hidden.
Commands
| Command | What it does |
|---|---|
lk ask |
Ask a question, or run a one-shot task |
lk run |
Interactive coding agent — read, search, edit, run |
lk search |
Web search with multi-model synthesis and cited sources |
lk image |
Generate an image with Vertex AI Imagen |
lk models |
List available models from every configured provider |
lk install |
Set up Local Keep AI on a fresh machine |
lk pull · lk train · lk train-all · lk use · lk rm |
Manage local GGUF models |
lk sync · lk sync-catalog |
Sync models and refresh the catalogue |
lk mcp |
Run an MCP server over stdio (Zed, Claude Desktop, …) |
lk rag · lk corpus · lk ext |
Local RAG, shared corpus, extensions |
lk integrate |
Connected service integrations |
lk schedule · lk daemon |
Scheduled tasks and the remote agent daemon |
lk sms |
Control a Local Keep AI machine from iMessage or Google Messages |
lk config · lk secrets |
Configuration, secrets and .env hygiene |
lk login · lk logout · lk whoami |
Account |
lk update |
Update to the latest published release |
lk fix-llama-cpp |
Rebuild llama-cpp-python with GPU acceleration for this machine |
Run lk --help, or any subcommand with --help, for the full reference.
Autonomous commands
Long-running loops that work with little to no human input:
lk autopilot "ship the checkout flow" # autonomous build loop
lk autofleet "migrate the API to async" # autonomous fleet loop
lk autoorg "raise test coverage" # autonomous organisation loop
Inside lk run, the equivalents are /autopilot (stop it with
/autopilot-stop), /autofleet, /autoorg and /swarm.
Releases up to 1.22.1 shipped these as
autopolit//autopolit, a misspelling. The old spelling still works as a hidden alias so existing scripts keep running, but it is deprecated — useautopilot.
REPL slash commands
Available inside lk run:
/help /model /models /context /files /read /rag /think /expert
/phd /confidence /tdd /test /sandbox /undo /history /compact
/clear /status /system /version /update
Install options
pip install local-keep-ai-cli # CLI — fast, pure-Python install
pip install "local-keep-ai-cli[local]" # + in-process GGUF inference
pip install "local-keep-ai-cli[server]" # + FastAPI backend
pip install "local-keep-ai-cli[voice]" # + WebRTC voice
pip install "local-keep-ai-cli[all]" # everything
Requires Python 3.9+.
The base install is deliberately light. In-process GGUF inference needs
llama-cpp-python, which compiles from source and wants a C++ toolchain, so it
lives in the [local] extra rather than taxing every install with a multi-minute
build. Everything else — hosted models, Ollama, RAG, the agent — works without
it. If a GGUF model reports itself unavailable, that extra is what you are
missing; lk fix-llama-cpp rebuilds it with GPU acceleration for your machine.
pipx install local-keep-ai-cli is recommended if you want the CLI isolated
from your project environments.
The commands localkeep, sage and sage-cli are installed as aliases of lk,
so existing scripts, shell history and editor integrations keep working.
Configuration
| Variable | Purpose |
|---|---|
SAGE_OPENROUTER_API_KEY |
OpenRouter key for hosted models |
Use lk config to view and set options, and lk secrets for credential storage
and .env hygiene.
Also available on
Web, iOS, Android, macOS, Windows, Linux, an SMS bridge, and editor integrations for VS Code, JetBrains, Zed, Sublime Text, Neovim, Cursor, Unity and Godot.
- Homepage: https://localkeep.ai
- Source: https://github.com/laynef/claude-ai-clone
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file local_keep_ai_cli-1.22.2-py3-none-any.whl.
File metadata
- Download URL: local_keep_ai_cli-1.22.2-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fec990b53ecaa4a444c6091677b1622597e115d99311f77e3683464dd691e33d
|
|
| MD5 |
973832c4c2e34d80b885287345a59595
|
|
| BLAKE2b-256 |
face5d095819c9ff8f8676c653d4a2088c35758198631bf8e1ca27fdec1d75e9
|