Name | lmstrix JSON |
Version |
1.0.44
JSON |
| download |
home_page | None |
Summary | A toolkit for managing and testing LM Studio models with automatic context limit discovery |
upload_time | 2025-07-26 01:32:51 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License
Copyright (c) 2025 Adam Twardoch
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
ai
cli
context
developer-tools
llm
lmstudio
optimization
testing
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
LMStrix is a professional, installable Python toolkit designed to supercharge your interaction with [LM Studio](https://lmstudio.ai/). It provides a powerful command-line interface (CLI) and a clean Python API for managing, testing, and running local language models, with a standout feature: the **Adaptive Context Optimizer**.
**For the full documentation, please visit the [LMStrix GitHub Pages site](https://twardoch.github.io/lmstrix/).**
## Key Features
- **Automatic Context Optimization**: Discover the true context limit of any model with the `test` command.
- **Full Model Management**: Programmatically `list` available models and `scan` for newly downloaded ones.
- **Flexible Inference Engine**: Run inference with a powerful two-phase prompt templating system that separates prompt structure from its content.
- **Rich CLI**: A beautiful and intuitive command-line interface built with `rich` and `fire`.
- **Modern Python API**: An `async`-first API designed for high-performance, concurrent applications.
## Installation
```bash
# Using pip
pip install lmstrix
# Using uv (recommended)
uv pip install lmstrix
```
**For more detailed installation instructions, see the [Installation page](https://twardoch.github.io/lmstrix/installation/).**
## Quick Start
### Command-Line Interface (CLI)
```bash
# First, scan for available models in LM Studio
lmstrix scan
# List all models with their test status
lmstrix list
# Test the context limit for a specific model
lmstrix test "model-id-here"
# Run inference on a model
lmstrix infer "Your prompt here" --model "model-id" --max-tokens 150
```
### Python API
```python
import asyncio
from lmstrix import LMStrix
async def main():
# Initialize the client
lms = LMStrix()
# Scan for available models
await lms.scan_models()
# List all models
models = await lms.list_models()
print(models)
# Test a specific model's context limits
model_id = models[0].id if models else None
if model_id:
result = await lms.test_model(model_id)
print(result)
# Run inference
if model_id:
response = await lms.infer(
prompt="What is the meaning of life?",
model_id=model_id,
max_tokens=100
)
print(response.content)
if __name__ == "__main__":
asyncio.run(main())
```
**For more detailed usage instructions and examples, see the [Usage page](https://twardoch.github.io/lmstrix/usage/) and the [API Reference](https://twardoch.github.io/lmstrix/api/).**
## Development
```bash
# Clone the repository
git clone https://github.com/twardoch/lmstrix
cd lmstrix
# Install in development mode with all dependencies
pip install -e ".[dev]"
# Run the test suite
pytest
```
## Changelog
All notable changes to this project are documented in the [CHANGELOG.md](https://twardoch.github.io/lmstrix/changelog) file.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "lmstrix",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "Adam Twardoch <adam+github@twardoch.com>",
"keywords": "ai, cli, context, developer-tools, llm, lmstudio, optimization, testing",
"author": null,
"author_email": "Adam Twardoch <adam+github@twardoch.com>",
"download_url": "https://files.pythonhosted.org/packages/1d/1b/a3e7d24b49b0beb8bc145154d79cc6131211ee5185ffa82594135fd35bed/lmstrix-1.0.44.tar.gz",
"platform": null,
"description": "LMStrix is a professional, installable Python toolkit designed to supercharge your interaction with [LM Studio](https://lmstudio.ai/). It provides a powerful command-line interface (CLI) and a clean Python API for managing, testing, and running local language models, with a standout feature: the **Adaptive Context Optimizer**.\n\n**For the full documentation, please visit the [LMStrix GitHub Pages site](https://twardoch.github.io/lmstrix/).**\n\n## Key Features\n\n- **Automatic Context Optimization**: Discover the true context limit of any model with the `test` command.\n- **Full Model Management**: Programmatically `list` available models and `scan` for newly downloaded ones.\n- **Flexible Inference Engine**: Run inference with a powerful two-phase prompt templating system that separates prompt structure from its content.\n- **Rich CLI**: A beautiful and intuitive command-line interface built with `rich` and `fire`.\n- **Modern Python API**: An `async`-first API designed for high-performance, concurrent applications.\n\n## Installation\n\n```bash\n# Using pip\npip install lmstrix\n\n# Using uv (recommended)\nuv pip install lmstrix\n```\n\n**For more detailed installation instructions, see the [Installation page](https://twardoch.github.io/lmstrix/installation/).**\n\n## Quick Start\n\n### Command-Line Interface (CLI)\n\n```bash\n# First, scan for available models in LM Studio\nlmstrix scan\n\n# List all models with their test status\nlmstrix list\n\n# Test the context limit for a specific model\nlmstrix test \"model-id-here\"\n\n# Run inference on a model\nlmstrix infer \"Your prompt here\" --model \"model-id\" --max-tokens 150\n```\n\n### Python API\n\n```python\nimport asyncio\nfrom lmstrix import LMStrix\n\nasync def main():\n # Initialize the client\n lms = LMStrix()\n \n # Scan for available models\n await lms.scan_models()\n \n # List all models\n models = await lms.list_models()\n print(models)\n \n # Test a specific model's context limits\n model_id = models[0].id if models else None\n if model_id:\n result = await lms.test_model(model_id)\n print(result)\n \n # Run inference\n if model_id:\n response = await lms.infer(\n prompt=\"What is the meaning of life?\",\n model_id=model_id,\n max_tokens=100\n )\n print(response.content)\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\n\n**For more detailed usage instructions and examples, see the [Usage page](https://twardoch.github.io/lmstrix/usage/) and the [API Reference](https://twardoch.github.io/lmstrix/api/).**\n\n## Development\n\n```bash\n# Clone the repository\ngit clone https://github.com/twardoch/lmstrix\ncd lmstrix\n\n# Install in development mode with all dependencies\npip install -e \".[dev]\"\n\n# Run the test suite\npytest\n```\n\n## Changelog\n\nAll notable changes to this project are documented in the [CHANGELOG.md](https://twardoch.github.io/lmstrix/changelog) file.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2025 Adam Twardoch\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "A toolkit for managing and testing LM Studio models with automatic context limit discovery",
"version": "1.0.44",
"project_urls": {
"Changelog": "https://github.com/twardoch/lmstrix/blob/main/CHANGELOG.md",
"Documentation": "https://github.com/twardoch/lmstrix#readme",
"Homepage": "https://github.com/twardoch/lmstrix",
"Issues": "https://github.com/twardoch/lmstrix/issues",
"Repository": "https://github.com/twardoch/lmstrix.git"
},
"split_keywords": [
"ai",
" cli",
" context",
" developer-tools",
" llm",
" lmstudio",
" optimization",
" testing"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8fa997b9f19909b2b8e2a1beb2774916f169f1a46b59a35bef9f3033ca5a66aa",
"md5": "14bfe61d993854315e6ed3ec38358af1",
"sha256": "960ac96c9928d653bd98ed1d50ff9fe5ed00aa654d8f9ddffa3aacab33797763"
},
"downloads": -1,
"filename": "lmstrix-1.0.44-py3-none-any.whl",
"has_sig": false,
"md5_digest": "14bfe61d993854315e6ed3ec38358af1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 41553,
"upload_time": "2025-07-26T01:32:49",
"upload_time_iso_8601": "2025-07-26T01:32:49.850981Z",
"url": "https://files.pythonhosted.org/packages/8f/a9/97b9f19909b2b8e2a1beb2774916f169f1a46b59a35bef9f3033ca5a66aa/lmstrix-1.0.44-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "1d1ba3e7d24b49b0beb8bc145154d79cc6131211ee5185ffa82594135fd35bed",
"md5": "bacceab95d5e69fecedac2d0ef6a700e",
"sha256": "d7ed19dc4c2815bf1e4153cb32181e07058c9f7cbfb66855f3b0079d874b79fe"
},
"downloads": -1,
"filename": "lmstrix-1.0.44.tar.gz",
"has_sig": false,
"md5_digest": "bacceab95d5e69fecedac2d0ef6a700e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 54652,
"upload_time": "2025-07-26T01:32:51",
"upload_time_iso_8601": "2025-07-26T01:32:51.788911Z",
"url": "https://files.pythonhosted.org/packages/1d/1b/a3e7d24b49b0beb8bc145154d79cc6131211ee5185ffa82594135fd35bed/lmstrix-1.0.44.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-26 01:32:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "twardoch",
"github_project": "lmstrix",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "lmstrix"
}