Skip to content
thomaslittlePublic

About

A local AI control center and developer platform: Rust runtime, native desktop app, CLI, and permission-aware SDKs.

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

252 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OriginLM

See your AI. Build with it.

A local control center for the AI you already have, and the developer platform that lets your applications use it. Provider coverage is evidence-based and operation-specific.

CI React Doctor License: MIT Status: alpha

OriginLM is a Rust toolkit with an embedded library, a standalone native helper, authenticated local transports, TypeScript and Python SDKs, and optional React selectors. Your application does not have to reproduce client-specific paths, metadata parsers, or streaming protocols for each AI client a user might have installed.

Published alpha (0.1.0-alpha.30). The API can change between 0.1.0-alpha.N revisions. npm (0.1.0-alpha.30) and PyPI (0.1.0a30) ship prebuilt helpers for Linux (x64, arm64) and Windows (x64); crates.io is at 0.1.0-alpha.30. On macOS, build from source (cargo install originlm-cli) and set LAI_HELPER_PATH. Start with the install guide, CLI usage & MCP guide, or SDK quickstarts. Runtime archives remain unsigned; provider coverage is operation-specific: read the support matrix before relying on a provider.

npm install originlm@alpha
pip install originlm==0.1.0a30
cargo add originlm@=0.1.0-alpha.30

Instant CLI & MCP (olm usage / olm mcp)

Install globally to check live plan allowances across every detected provider from your terminal or expose them over MCP (puts olm and originlm on PATH on Linux x64/arm64 and Windows x64):

npm i -g originlm@alpha
olm usage
olm mcp

See CLI usage & built-in MCP server.

What it does

  • Passive discovery. Finds installed AI clients and profiles (Codex, Claude Code, Grok, Gemini CLI, Antigravity, OpenCode, Muse Code, Kiro, Pi, Cursor, GitHub Copilot, Ollama, LM Studio, and API routes you configure) from metadata only. No scanning at import time, no secrets read, no network calls.
  • Evidence-backed inventory. Provider, installation, profile, account, connection, route, model, billing, and quota-pool identities stay distinct, with field-level evidence. Unknown and unsupported are different states, and unknowns are never filled in with guesses.
  • Selection. Route-aware, framework-neutral selection logic that keeps each provider's native model IDs and option descriptors. There are no hard-coded universal "Low/Medium/High" controls.
  • Granted sessions. Streaming text sessions, approvals, cancellation, image input, host MCP tools, resumable sessions, and scoped result artifacts, only after a host grants them explicitly.
  • Explicit native-tool sessions. Host MCP defaults to read-only, host-tools-only behavior. An operator may separately grant native CLI shell, file, web, and build tools with native_policy; see the host MCP contract and provider details.
  • Thin SDKs. Rust is the canonical implementation. The TypeScript and Python SDKs are typed protocol clients generated from the Rust contracts. The React hooks and eight selector layouts are optional.

Privacy

OriginLM has no telemetry or hosted relay. History and grants stay on your machine. Authorized provider operations can send prompts, attachments and tool results to the provider you select; local model routes can run locally. Credentials are never returned to consuming apps. See the privacy boundary.

Safety model

Finding an installation does not establish an active subscription, and a discovery signal is never permission to execute.

  • The installed client owns its credentials. Subscription tokens are never exported as API keys, browser cookies are never read, and nothing silently falls back to paid usage or rotates accounts to evade limits.
  • Metadata, execution, workspace access, tools, and paid options are separate, revocable, per-application grants.
  • Local transports are loopback/owner-scoped and authenticated; cancellation only touches processes the toolkit started.

See the threat model and SECURITY.md.

Quick start

You need the pinned Rust toolchain (installed automatically by rustup from rust-toolchain.toml), Node.js 22.16+, and Python 3.11+.

git clone https://github.com/thomaslittle/originlm.git
cd originlm
npm ci --ignore-scripts
npm run build
cargo build --locked -p originlm-cli

The helper is target/debug/originlm (.exe on Windows). Run a metadata-only scan of this machine:

target/debug/originlm scan --json

To see exactly what discovery finds without touching your real home directory, point it at an empty directory: scan --json --home /absolute/empty/dir.

Plan usage for every AI provider detected on this machine. It shows percent used and left per 5-hour, weekly and model window, reset times, plan, and whether each reading is live or cached. Usage is read from every provider that has a usage source: Claude Code, Codex, Cursor, OpenCode, Muse, Grok, Antigravity, Gemini CLI, GitHub Copilot and Pi. Every other detected provider is listed with the reason it has no reading:

npm i -g originlm@alpha      # puts `olm` and `originlm` on PATH
olm usage              # or: target/debug/originlm usage

Session-history token totals are a separate explicit read:

olm usage --history --json

It reads bounded Claude Code, Codex, Gemini CLI, Grok, and Kiro history, never prompts, tool output, or credentials. See session-history usage. Any MCP client (Claude Code, Codex, T3) can ask for the same plan usage from the built-in MCP server:

claude mcp add originlm -- olm mcp --allow-identity

See built-in MCP server. On-disk local models are a separate read:

target/debug/originlm models --json

See on-disk local models.

One shared runtime and the control center

target/debug/originlm serve --ipc originlm-user --independent \
  --token-file "$HOME/.originlm/broker-token.json" \
  --admin-token-file "$HOME/.originlm/broker-admin-token.json" \
  --allow-passive-discovery --idle-timeout 900
target/debug/originlm-control \
  --token-file "$HOME/.originlm/broker-admin-token.json"

Ordinary applications receive the normal token; the admin token is only for the control center because it can list and revoke connected apps. Omitting --admin-token-file leaves that management surface unavailable. For multiple apps, replace --token-file with --grants-file (see the shared-broker guide); each app then gets a distinct token and identity, and revocation is app-scoped.

The broker owns its lifetime; closing a consumer does not stop it. The control center is a native Rust terminal UI over the public authenticated API, with Overview, accounts, models, usage, issues, applications, diagnostics, safe refresh, issue snooze/acknowledge, app revocation, and redacted export. It never opens SQLite or calls a provider. See the shared broker guide and the decision record.

Native desktop manager

cargo run -p originlm-desktop

The app attaches to a shared broker whose owner or administrator descriptor already exists. When none is running it hosts a private in-process runtime for the window, so a first run needs no token file; that runtime runs passive discovery, read-only metadata probes, and a read-only Playground workspace. Pass --token-file to select a specific shared broker.

A GPUI client built on GPUI Kit with the GPUI Fast backend: overview, providers, models, interactive usage charts, connected apps, sessions, a read-only playground, diagnostics and settings, all over the broker's public authenticated API. See crates/originlm-desktop/README.md.

Run the showcase

npm run dev

Open http://127.0.0.1:5173/, choose Show current pairing code, then Pair. The demo shows your real detected installations after an explicit browser pairing and never sends a prompt unless you grant a session and click Run live turn. With no paired runtime it falls back to clearly labeled example data. See the live demo guide and apps/demo.

Use it from your app

import { createLocalAI } from 'originlm';
import { openBundledTransport } from 'originlm/node';

const transport = await openBundledTransport({
  bundleDirectory: '/absolute/path/to/extracted/bundle',
  args: ['serve', '--stdio', '--allow-passive-discovery'],
});
const ai = await createLocalAI({ transport });
try {
  await ai.discovery.refresh({ level: 'passive' });
  console.log(await ai.connections.list());
} finally {
  await ai.close();
}
Integration Where to start
Install from npm, PyPI, crates.io or a local bundle Distribution
Native helper CLI, stdio / HTTP / broker transports Native helper, pairing, shared broker
Prompt-driven desktop app (provider/model selection, grants, streaming) Prompt-app guide
Register Gemini CLI / Antigravity / Grok profiles; declare billing Native profiles
Rust embedding originlm-kit and its examples
Python examples/python, Python SDK
React examples/react, React hooks, UI selectors
C# over HTTP, Tauri, browser extension examples/dotnet-http, examples/tauri, examples/browser-extension
Wire protocol, OpenAPI, JSON Schema Generated API, protocol/
Read approved cached usage through MCP Cache-only MCP guide
Order model catalogs by cached Intelligence Index (RankLLMs) Intelligence Index guide
Add a provider adapter Adapter authoring guide

Repository layout

Path Contents
crates/originlm-contracts, originlm-core Canonical serializable contracts; selection and permission-scoped projections. No I/O.
crates/originlm-discovery, originlm-platform Explicit passive inventory; injected OS boundaries.
crates/originlm-adapters, originlm-chatgpt-auth Provider integrations (native clients, ACP, HTTP/API routes); host-owned ChatGPT sign-in.
crates/originlm-runtime, originlm-service, originlm-transports Owner-scoped sessions; the shared native service; stdio, HTTP/SSE, broker, and Native Messaging transports.
crates/originlm-store Broker-owned SQLite snapshot, metadata, bounded journal, issues, and notification delivery state.
crates/originlm-control Optional native Rust terminal control center over the public broker API.
crates/originlm-update Ed25519 update verification, staging, active-session lease, activation, and rollback.
crates/originlm-kit, originlm-cli The embeddable Rust facade; the originlm helper executable.
packages/ sdk-typescript, sdk-python, selector-core, react, ui-react.
apps/demo The React showcase (uses only the public SDK).
protocol/ Generated JSON Schema, OpenAPI, and method list.
docs/, examples/, scripts/ Documentation, host-integration examples, build/verify/release tooling.

Platform status

Platform Status
Windows x64 Runtime host implemented; prebuilt npm (originlm-cli-windows-x64) and PyPI (win_amd64) helpers published (unsigned). Older Windows versions are not independently qualified.
Linux x64 / arm64 Runtime host supported; prebuilt npm (originlm-cli-linux-x64, originlm-cli-linux-arm64) and manylinux 2.28 PyPI helpers published (unsigned).
macOS Build from source only (cargo install originlm-cli + LAI_HELPER_PATH). Prebuilt macOS release artifacts are not currently shipped on npm or in the release pipeline.

Status words in this repository are deliberate: planned, implemented, fixture-tested, platform-executed, and live-qualified mean different things. Most provider paths are fixture-tested; live qualification is called out per provider in the support matrix.

Verify

python -m venv .venv-build            # then activate it with your shell
python -m pip install -r scripts/requirements-build.txt
npx --no-install playwright install chromium
python scripts/verify.py --profile all

verify.py --profile all runs the Rust workspace, SDK, generator, selector, browser, and accessibility checks against synthetic homes, fake clients, and mock servers. It never spends an AI allowance. --profile release additionally needs a .NET 8 SDK, builds a checksummed bundle, tests clean tarball and wheel consumers, and measures an idle baseline. See CONTRIBUTING.md for the full workflow.

Documentation

Contributing, security, license

Contributions are welcome. Start with CONTRIBUTING.md and the Code of Conduct. Report vulnerabilities privately as described in SECURITY.md.

OriginLM is released under the MIT License. It builds on and credits several open-source projects; see THIRD_PARTY_NOTICES.md. Provider and product names are trademarks of their owners; their use here does not imply affiliation or endorsement.

Brand & migration

Package identities and registry details are documented in migration and package identities. The replacement artwork is recorded in logo provenance.

About

A local AI control center and developer platform: Rust runtime, native desktop app, CLI, and permission-aware SDKs.

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages