- Rust 39.9%
- JavaScript 36.7%
- CSS 18.1%
- HTML 3.1%
- Dockerfile 2.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .agents/workflows | ||
| assets | ||
| src | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| README.md | ||
| README.zh-TW.md | ||
| requirement.md | ||
| requirement.zh-TW.md | ||
| TODO.md | ||
| TODO.zh-TW.md | ||
LM-Studio-Check
An automated monitoring tool designed to check the health and performance of AI models running on LM Studio (or any compatible OpenAI API endpoints). It provides both a fast CLI mode and a beautifully designed Web UI.
Features
- CLI Monitoring: Instantly checks all loaded models from your terminal, outputting their responses, token usage, and generation speed (Tokens Per Second).
- Web Interface: A sleek, responsive dashboard (built with Ant Design principles) to visually monitor model status, view detailed chat bubbles, and switch between Light/Dark themes and English/Traditional Chinese languages.
- Performance Metrics: Automatically calculates Tokens Per Second (TPS) and tracks duration for each model check.
- Customizable System Prompt: Define a default system behavior through environment variables.
Quick Start
-
Copy the example environment variables file:
cp .env.example .env -
Edit the
.envfile and configure your API endpoint and token:LM_API_ENDPOINT=http://localhost:1234/v1 LM_API_TOKEN=your-token-here WEB_PORT=3000 LM_SYSTEM_PROMPTS='["You are a helpful AI assistant. Please answer in English.","You are a professional software engineer. Talk like a seasoned programmer.","You are a creative writer. Answer in a poetic and engaging tone.","You are a witty and sarcastic AI. Give a funny but accurate response.","You are an expert translator. Reply entirely in Traditional Chinese."]' LM_COOLDOWN_MINUTES=15 -
Run the CLI check:
cargo run -
Or start the Web UI Server:
cargo run -- serveThen open
http://localhost:3000in your browser.
Containerization (Docker / nerdctl)
This project includes a multi-stage Dockerfile and a docker-compose.yml, making it incredibly easy to deploy as a lightweight, secure container.
Build and Run using Compose (Recommended)
- Ensure your
.envis configured properly. Thedocker-compose.ymldefaults to usinghost.docker.internalto connect to the LM Studio instance running on your host machine. - Run the following command:
docker compose up -d # Or using nerdctl nerdctl compose up -d - Open
http://localhost:3000in your browser.
Note: The results.json file is mounted into the container as a volume to ensure that the 15-minute cooldown mechanism and historical records are preserved across restarts.
Updating the Application
If you modify the source code or pull new updates, you need to rebuild the Docker image and restart the container. Add the --build flag:
docker compose up -d --build
# Or using nerdctl
nerdctl compose up -d --build
Build Image Manually
If you prefer to build the image manually without Compose:
# Build the image
docker build -t lm-studio-check .
# Or using nerdctl
nerdctl build -t lm-studio-check .
# Run the container
docker run -d -p 3000:3000 -v $(pwd)/results.json:/app/results.json --add-host host.docker.internal:host-gateway --env-file .env lm-studio-check