Skip to content

LM-Client/client-universal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


LM Client logo

LM Client

A clean, cross-platform desktop chat client for LM Studio's local REST server.
Chat with any locally running language model — with streaming, file attachments, MCP integrations, and full sampling control.

Homepage  ·  Releases  ·  Issues


Screenshots

LM Client — dark theme LM Client — light theme


Key Features

  • Four API modes — Native LM Studio /api/v1/chat, OpenAI /v1/chat/completions, OpenAI /v1/responses, and Anthropic /v1/messages (experimental)
  • Streaming responses — live token streaming with stop and status indicators
  • File & image attachments — drag & drop, paste, or file-picker; text files are inlined into the prompt; image files are sent as vision input
  • MCP integrations — add ephemeral or plugin-based Model Context Protocol integrations directly from Settings
  • Model manager — load, unload, and download models by ID; configure context length, eval batch size, KV-cache placement, flash attention and more from the UI
  • Full sampling control — Temperature, Top-P, Top-K, Repeat Penalty, Frequency Penalty, Presence Penalty, Max Tokens, Context Length, Reasoning Effort
  • Stateful chat — preserve server-side conversation state across turns (native + /v1/responses modes)
  • System prompt — configurable per session
  • Raw JSON override — merge arbitrary fields into the request payload for advanced use
  • Export / Import — back up and restore all chats, messages and settings as a single JSON file
  • Light / dark / system theme — with native Windows title-bar overlay color sync
  • Localization — English and Russian interface languages, easily extensible
  • Update checker — checks for new releases and shows a non-intrusive prompt
  • Onboarding wizard — guided first-run setup: connect to server, pick a model, choose language
  • Responsive layout — three-column desktop grid collapses to off-canvas drawers on tablets; dedicated mobile layout for phones (including Capacitor/Android target)
  • Secure by defaultcontextIsolation: true, nodeIntegration: false; API tokens are kept in memory only unless the user explicitly opts in to localStorage persistence

Supported Platforms

Platform Status
Windows (10/11) ✅ Fully supported — NSIS installer, native title-bar overlay
macOS ✅ Supported — DMG, hiddenInset title bar, traffic-light buttons; must build on a Mac
Linux ✅ Supported — AppImage; must build on Linux
Android (Capacitor) ⚠️ Code paths present; separate Capacitor project required
Browser (web) ⚠️ Works as a web app when served over HTTP/HTTPS; some save-file features degrade gracefully

Requirements

Running the installed app

  • LM Studio running with its local server enabled (default: http://localhost:1234)
  • Windows 10 or later, macOS 11+, or a modern Linux distribution (depending on the package)

Development

  • Node.js 18 or later
  • npm (comes with Node.js)
  • LM Studio with the local server enabled for testing

Installation

Download a pre-built release (recommended)

Go to Releases and download the package for your platform:

Platform File
Windows LM Client Setup x.x.x.exe (NSIS installer)
macOS LM Client-x.x.x.dmg
Linux LM Client-x.x.x.AppImage

Windows: Run the installer — it creates a desktop shortcut and a Start Menu entry.
macOS: Open the DMG and drag the app to /Applications.
Linux: Make the AppImage executable (chmod +x) and run it.

Build from source

See Build Instructions below.


Development Setup

# 1. Clone the repository
git clone https://github.com/<your-username>/lm-client.git
cd lm-client

# 2. Install dependencies
npm install

# 3. Start in development mode (opens Electron window)
npm start

Note: The app loads www/index.html directly as a local file, so no local dev server is required.


Build Instructions

The project uses electron-builder to produce distributable packages.

# Install dependencies (if not done already)
npm install

# Windows — NSIS installer (run on Windows)
npm run dist

# Windows — unpacked directory, faster for testing
npm run pack

# macOS — DMG (must run on macOS)
npm run dist:mac

# Linux — AppImage (must run on Linux)
npm run dist:linux

Build output is placed in the dist/ directory.

Cross-compilation is not supported by electron-builder for most targets. Build each platform on its native OS.

Code signing (Windows): Set the CSC_LINK and CSC_KEY_PASSWORD environment variables before building to sign the installer.
Code signing (macOS): Set CSC_LINK, CSC_KEY_PASSWORD and optionally APPLE_ID / APPLE_APP_SPECIFIC_PASSWORD for notarization.

Platform build target (COMPILE_AS)

The constant COMPILE_AS near the top of www/app.js controls the window-chrome behaviour and some layout decisions at runtime:

const COMPILE_AS = 'WINDOWS'; // change before building for another platform
Value Use case
WINDOWS Electron on Windows — hidden title bar + native overlay (min/max/close)
MACOS Electron on macOS — hidden-inset title bar, traffic-light buttons
LINUX Electron on Linux — no window-chrome adjustments
AUTO Runtime detection (useful for browser / Capacitor builds)
android_apk Capacitor Android build, forces mobile layout

Before building for a non-Windows platform, update COMPILE_AS to the appropriate value. The setting affects drag regions, reserved space for window controls, and the title-bar overlay API calls.


Usage Guide

  1. Start LM Studio and enable the local server (Developer tab → Start server).
  2. Open LM Client.
  3. On first run, the onboarding wizard will guide you through connecting to the server, picking a model, and selecting the interface language.
  4. Select your API mode from the top bar (Native, OpenAI, or Anthropic).
  5. Select a model from the model dropdown.
  6. Type your message in the composer and press Enter (or Shift+Enter for a new line).
  7. To attach a file or image, click the paperclip button or drag & drop a file onto the window.
  8. Adjust generation parameters in the Settings panel on the right.

Chat management

  • Click New chat in the sidebar to start a fresh conversation.
  • Right-click (or long-press on mobile) a chat to rename, pin, or delete it.
  • Use the search bar at the top of the sidebar to filter chats.

Export and import

Click the Export/Import button in the top bar to save all chats and settings to a JSON file, or to restore from a previously exported file.


Configuration

All settings are accessible from the Settings panel (gear icon, top-right).

Setting Description
Base URL Address of the LM Studio server (default: http://localhost:1234)
API token Optional Bearer token if the server requires authentication
Persist token Save the token to localStorage (marked as a risk — see Security Notes)
API mode Switch between Native, OpenAI Chat, OpenAI Responses, and Anthropic endpoints
Temperature / Top-P / Top-K Standard sampling parameters
Repeat Penalty Penalise repeated tokens (native mode)
Frequency / Presence Penalty OpenAI-compatible penalty parameters
Max output tokens Cap on generated tokens (-1 = no limit)
Context length Override the model context window (native mode)
Reasoning effort low / medium / high / on — passed when the model supports it
Stream responses Toggle streaming on/off
Stateful chat Maintain server-side conversation state (native + responses modes)
System prompt Prepended system message for every conversation
MCP integrations Add Model Context Protocol plugins or ephemeral MCP servers
Raw JSON override Arbitrary JSON merged into every request payload
Language Interface language: English / Russian
Theme Light / Dark / System

Settings are persisted to localStorage (key: lmstudio-client:settings).
Chat history is stored in IndexedDB (database: lmstudio-client), with a localStorage fallback.


Project Structure

lm-client/
├── assets/
│   └── icon.icns             # macOS / Linux application icon
├── build/
│   └── icon.ico              # Windows application icon
├── screenshots/
│   ├── main-dark.png
│   └── main-light.png
├── www/
│   ├── lang/
│   │   ├── en.js             # English i18n bundle (pre-bundled JS)
│   │   ├── en.json           # English i18n source
│   │   ├── ru.js             # Russian i18n bundle
│   │   └── ru.json           # Russian i18n source
│   ├── app.js                # All application logic (single-file)
│   ├── index.html            # UI markup
│   └── styles.css            # All styles and design tokens
├── main.js                   # Electron main process (platform-aware)
├── preload.js                # Electron preload script (contextBridge, Windows only)
└── package.json

Security Notes

  • Context isolation is enabled (contextIsolation: true) and Node.js integration is disabled (nodeIntegration: false) on all platforms. On macOS, sandbox: true is also enabled. The preload script (contextBridge) is loaded only on Windows, where it exposes a single window.electronTheme.setTheme() call to sync the native title-bar overlay colour with the app theme. On macOS and Linux no preload bridge is needed.
  • External links opened from the renderer are routed to the system browser via shell.openExternal(); the app itself never navigates to external URLs.
  • API token storage: By default the API token is kept in memory only and is never written to disk. The user can opt in to localStorage persistence via "Persist token to localStorage" in Settings. This option is clearly labelled as a risk in the UI, because localStorage is readable by anyone with access to the browser profile or OS user account.
  • No remote code execution: The app loads only local files (www/index.html). It makes outbound HTTP requests solely to the configured LM Studio server and to lmclient.app/api/v1/ for optional version checks and anonymous telemetry pings (platform + version + language + theme, no PII).
  • Telemetry: On launch and session end, the app sends an anonymous ping to lmclient.app/api/v1/stats.php containing only: event name, platform, version, interface language, theme, and bucketed session duration/message count. No IP address, model name, chat content, or API keys are ever transmitted. You can review the Stats object in www/app.js to verify.

Roadmap

This roadmap reflects planned or possible directions; nothing here is a commitment.

  • macOS and Linux packaged releases
  • Keyboard shortcuts (new chat, toggle sidebar, stop generation)
  • Chat search across message content
  • Markdown export of individual chats
  • Additional interface languages
  • Conversation branching / message editing with history
  • Custom themes / accent color picker
  • Android (Capacitor) public release

Contributing

Contributions are welcome. Please read CONTRIBUTING.md before opening a pull request.

Quick start:

  1. Fork the repository.
  2. Create a branch: git checkout -b fix/your-description or feat/your-description.
  3. Make your changes. Keep the scope focused — one logical change per PR.
  4. Test manually on your platform before submitting.
  5. Open a pull request against main with a clear description of what changed and why.

Bug reports and feature requests: Use GitHub Issues.


License

This project is licensed under the MIT License — see the LICENSE file for details.

MIT License

Copyright (c) 2026 ntirl

Disclaimer

LM Client is an independent, unofficial client application. It is not affiliated with, endorsed by, or officially connected to LM Studio or Anthropic. All product names, trademarks, and registered trademarks are the property of their respective owners.

This software communicates exclusively with servers you configure. The developer is not responsible for content generated by language models, for any data sent to or received from the configured server, or for any consequences of using this software.

About

Electron-based chat UI for LM Studio's REST API. Supports native, OpenAI-compatible and Anthropic endpoints.

Resources

License

Stars

Watchers

Forks

Contributors