NativeLab
A fully local, privacy-first LLM workbench powered by llama.cpp - desktop GUI, terminal CLI, and an experimentation layer.
NativeLab is a desktop and terminal client for running large language models entirely on your machine. It wraps llama.cpp, running Ollama models, optional Hugging Face Transformers models, and API backends behind a polished PyQt6 GUI and a Claude-Code-style terminal CLI, with first-class support for multi-model pipelines, document references, long-document summarization, and a brand-new Labs experimentation layer.
PhonoLab is the official Android client - same local-first philosophy, runs llama.cpp on-device via JNI, with a chat UI, document attachments, RAG, vision model support, and a LAN API server. See PhonoLab/ or the PhonoLab page.
pip install nativelab
nativelab # GUI
nativelab --cli # terminal control center (setup, chat, models, labs, integrations)
# Standalone local server (turn any GGUF into an API)
python -m nativelab.server --model models/llama-7b.gguf --port 8787 --host 0.0.0.0
App screenshots
✨ Highlights
- 🖥️ Desktop GUI - Chat, model library, visual pipeline builder, MCP, Download tab, Labs, theming.
- ⌨️ Terminal CLI -
nativelab --cliopens a full terminal control center for chat, local/API models, skills, Labs, saved pipelines, integrations, endpoint serving,@fileembedding, slash commands, and linting. - 🧪 Labs - A dedicated experimentation layer with a shared endpoint API. New lab features get engine status, model swap, context change, and LLM calls for free.
- 🔌 Integrations - Local JSON endpoint, route browser, and saved Discord/WhatsApp bot connector profiles.
- 🔗 Visual Pipeline Builder - 20+ node types, shipped example presets, resizable sidebars, AI-assisted pipeline generation, native-accelerated graph helpers, live execution log, save/load.
- 🌐 Backend mixing - Local GGUF, running Ollama models, optional Hugging Face Transformers models, OpenAI-compatible APIs, and Anthropic endpoints share the same app state.
- 📱 LAN Device Discovery - Scan your local network for PhonoLab Android devices, register them as API model endpoints, route inference to phones and tablets over WiFi.
- 🔐 Hugging Face login - One-click browser login for gated/private repos, with access-token paste as an advanced fallback.
- ⚡ Parallel + pipeline mode - Run reasoning + coding engines simultaneously and chain them automatically.
- 🧠 Auto family detection - 20+ model families recognised from filename; correct prompt template applied.
- 📦 Downloaders - Pick popular presets or custom IDs for GGUFs, full HF Transformers snapshots, Ollama models, and llama.cpp binaries without leaving the app.
- 🖧 Local server app -
python -m nativelab.serverturns any GGUF model into an OpenAI/Anthropic compatible API server. Hardware-aware auto-configuration.
See changelog.txt for the latest release notes and docs/architecture.md for the layered design.
PhonoLab - Android Client
Run local LLMs on your phone. PhonoLab brings the NativeLab experience to Android.
| Feature | Details |
|---|---|
| On-device inference | Bundled llama-server via JNI fork+execve, no W^X issues |
| Chat UI | ChatGPT-style with sidebar, sessions, math rendering (KaTeX) |
| Document attachments | PDF, text, DOCX - RAG chunking + keyword retrieval |
| Image attachments | Gallery picker, vision model support (Llama 3.2 Vision, etc.) |
| Model catalog | Built-in small models: SmolLM2, Qwen, Llama 3.2, TinyLlama |
| LAN API server | OpenAI + Anthropic compatible, SSE streaming, request queuing |
| Device reporting | CPU, RAM, storage, model status via /device endpoint |
| Parameter editing | Temperature, top_k, top_p, repeat_penalty via /config endpoint |
| Smart reload | Queue requests during model switch, auto-drain on ready |
| Error safety | model_not_loaded, server_busy, gateway_timeout - never blank |
| Themes | Dark (NativeLab Studio) + Light (Cream & Sage) |
| Error handling | 17-layer error system, restart dialog, red banner notifications |
| Free forever | AGPL v3 - same as NativeLab |
📚 Documentation
The docs are split into short, focused files so you can jump straight to what you need.
| Page | What's inside |
|---|---|
| docs/README.md | Documentation index with one-line summaries. |
| docs/installation.md | Install, llama.cpp setup, first-time workspace. |
| docs/cli.md | nativelab --cli - quick reference + link to the beginner guide. |
| docs/features.md | Full feature catalogue; latest release notes are in changelog.txt. |
| docs/pipeline-builder.md | Visual pipeline builder, AI Builder, examples, JSON schema, native pipeline core. |
| docs/architecture.md | Layered architecture, project structure, data flow. |
| docs/labs.md | The Labs experimentation layer + how to add a feature. |
| docs/integrations.md | Integration endpoint routes, local HTTP bridge, Discord and WhatsApp bot connectors. |
| docs/models.md | Model registry, families, quantization, API models. |
| docs/workflows.md | Pipelines, references, summarization, MCP, model/runtime downloads. |
| docs/ui.md | GUI tour, theming, shortcuts, data persistence. |
| docs/troubleshooting.md | Common errors and their fixes. |
Beginner-friendly walkthroughs:
- 🆕 Never used a terminal LLM tool? Start with nativelab/cli/cli_guide.md.
- 🆕 Want to add a lab feature? Read docs/labs.md.
⚡ Quick start
GUI
pip install nativelab
nativelab
The first launch opens the desktop app. Use the Download tab to install llama.cpp binaries, grab a GGUF model, pull an Ollama model from an already-running Ollama daemon, or download a full HF Transformers snapshot. The HF Transformers downloader includes an in-app library installer for the optional Transformers runtime packages. For gated/private Hugging Face repos, sign in from Settings > Accounts > Hugging Face > Login with Hugging Face first, then accept or request access on the repo page if Hugging Face still returns 403.
CLI
pip install nativelab
nativelab --cli
The CLI runs an interactive wizard the first time:
- Verifies
llama-server/llama-cliare present (or guides you to install them). - Lets you pick or download a GGUF model from HuggingFace.
- Asks for a context size with sensible defaults.
- Opens the terminal control center with Chat, Models, API Models, Skills, Labs, Pipelines, Integrations, Status, and Setup.
nativelab --cli models list
nativelab --cli api-models list
nativelab --cli skills chat-on
nativelab --cli endpoint /snapshot --json
nativelab --cli chat
Full beginner walkthrough: nativelab/cli/cli_guide.md.
🧪 Labs - the experimentation layer
The nativelab/labs/ package is a sandbox for new features. Every lab panel receives a single LabEndpoints instance and uses it for all engine interaction:
from nativelab.labs import LabEndpoints
# Read state
endpoints.status_text # "🟢 Server :8612"
endpoints.model_path # "/abs/path/to/mistral-7b.Q4_K_M.gguf"
endpoints.snapshot() # {model_name, ctx_value, server_port, …}
# Synchronous LLM call - auto-routes API > server > CLI
endpoints.call_llm(messages=[...], system_prompt="…")
# Reverse routing - ask the host app to change state
endpoints.request_load_model("/path/to/other.gguf")
endpoints.request_context(8192)
endpoints.request_unload()
Add a lab feature by dropping nativelab/labs/<feature>.py with a QWidget panel that has LAB_NAME, LAB_ICON, and a set_endpoints(...) method, then appending it to LAB_FEATURES. Full guide in docs/labs.md.
🛠️ Requirements
- Python 3.10+
- PyQt6 (installed automatically as a dependency)
- llama.cpp binaries -
llama-server/llama-cli. The GUI's Download tab installs these for you, or you can drop them in./llama/bin/. - Optional:
psutil(RAM monitor),pypdf(PDF summarization),pyflakes/flake8/pylint(CLI lint). - Optional HF backend: use the HF Transformers downloader's Install Libraries action, or install the displayed Transformers/Torch/safetensors/Accelerate/SentencePiece/Pillow command manually.
Detailed instructions in docs/installation.md.
🤝 Contributing
Issues and PRs welcome. See CONTRIBUTING.md and CODE_OF_CONDUCT.md.
For security disclosures, see SECURITY.md.
📜 License
AGPL v3 - free and open source forever. See LICENSE.
Both NativeLab and PhonoLab are licensed under AGPL v3. NativeLab depends on llama.cpp (MIT) and PyQt6 (GPL/commercial). PhonoLab depends on llama.cpp (MIT) and AndroidX (Apache 2.0).
Built for people who want their LLMs local, fast, and under their own control.
Install NativeLab · Get PhonoLab · GitHub · Docs · Issues
Metadata
Release files for nativelab 0.3.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| nativelab-0.3.8.tar.gz | 6.0 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nativelab-0.3.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.6 MB
Release files / nativelab-0.3.8.tar.gz
| Download URL | nativelab-0.3.8.tar.gz |
|---|---|
| Size | 6.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a86bcee953e6ed509867dc81fc31688a59f9c371c343f5ed7a07b0579f3439de
|
|
BLAKE2b-256 checksum How to use checksums |
fb02693deac02f5f3bcd285a735b2f256aa487f96846d0b6a76864b9534a9792
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / nativelab-0.3.8-py3-none-any.whl
| Download URL | nativelab-0.3.8-py3-none-any.whl |
|---|---|
| Size | 6.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9446e3b3bbb88594cdc03be4b3827d20adc3e86ff9311b4451525a9029347eca
|
|
BLAKE2b-256 checksum How to use checksums |
d847603c681209a946ad0feaad9a5209e8b5f580778ad7c1e9b7a9c1a32a2003
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for nativelab 0.3.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.