llmctl-cli 0.4.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,173 @@
1
+ Metadata-Version: 2.4
2
+ Name: llmctl-cli
3
+ Version: 0.4.1
4
+ Summary: Cross-platform CLI to manage llama-server router presets, Hugging Face GGUF models, hardware probes, skills, and local/remote services.
5
+ Keywords: llm,llama.cpp,llama-server,gguf,huggingface,cli
6
+ Author: Ana Alonso
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: Microsoft :: Windows
14
+ Classifier: Operating System :: POSIX :: Linux
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: System :: Systems Administration
21
+ Classifier: Topic :: Utilities
22
+ Requires-Python: >=3.11
23
+ Project-URL: Homepage, https://github.com/Ana-Alonso/llmctl
24
+ Project-URL: Repository, https://github.com/Ana-Alonso/llmctl
25
+ Project-URL: Issues, https://github.com/Ana-Alonso/llmctl/issues
26
+ Description-Content-Type: text/markdown
27
+
28
+ # llmctl
29
+
30
+ [![CI](https://github.com/Ana-Alonso/llmctl/actions/workflows/ci.yml/badge.svg)](https://github.com/Ana-Alonso/llmctl/actions/workflows/ci.yml)
31
+ [![Release](https://github.com/Ana-Alonso/llmctl/actions/workflows/release.yml/badge.svg)](https://github.com/Ana-Alonso/llmctl/actions/workflows/release.yml)
32
+ [![PyPI](https://img.shields.io/pypi/v/llmctl-cli.svg)](https://pypi.org/project/llmctl-cli/)
33
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/)
34
+ [![Zero Runtime Deps](https://img.shields.io/badge/dependencies-0%20runtime-brightgreen.svg)](pyproject.toml)
35
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
36
+
37
+ CLI multiplataforma (**Linux, macOS y Windows**) en Python puro (sin dependencias externas en runtime) para gestionar presets del router de `llama-server`, modelos GGUF de Hugging Face o locales, hardware (NVIDIA, Apple Silicon/Metal, AMD, Vulkan/iGPU y CPU), chat/benchmarks en terminal, perfiles locales/remotos con API key, binarios oficiales de `llama.cpp` y skills centralizadas (`SKILL.md`).
38
+
39
+ ## Estado por plataforma y empaquetado (CI en vivo)
40
+
41
+ | Objetivo | Estado en `main` | Backend / Artefacto |
42
+ | :--- | :---: | :--- |
43
+ | **Linux** (Ubuntu, Python 3.11–3.13 + lint + `ty`) | [![Linux CI](https://img.shields.io/github/check-runs/Ana-Alonso/llmctl/main?nameFilter=Linux%20%2F%20Python%203.13&label=Linux)](https://github.com/Ana-Alonso/llmctl/actions/workflows/ci.yml) | `systemd --user` / `process` |
44
+ | **macOS** (Python 3.11–3.13) | [![macOS CI](https://img.shields.io/github/check-runs/Ana-Alonso/llmctl/main?nameFilter=macOS%20%2F%20Python%203.13&label=macOS)](https://github.com/Ana-Alonso/llmctl/actions/workflows/ci.yml) | `launchd` + Apple Silicon Metal |
45
+ | **Windows** (Python 3.11–3.13) | [![Windows CI](https://img.shields.io/github/check-runs/Ana-Alonso/llmctl/main?nameFilter=Windows%20%2F%20Python%203.13&label=Windows)](https://github.com/Ana-Alonso/llmctl/actions/workflows/ci.yml) | `process` + NVIDIA/Vulkan/CPU |
46
+ | **Paquete `.deb`** (Debian / Ubuntu) | [![Package .deb](https://img.shields.io/github/check-runs/Ana-Alonso/llmctl/main?nameFilter=Package%20.deb&label=.deb)](https://github.com/Ana-Alonso/llmctl/actions/workflows/ci.yml) | `llmctl_<ver>_all.deb` |
47
+ | **Paquete `.rpm`** (Fedora / RHEL) | [![Package .rpm](https://img.shields.io/github/check-runs/Ana-Alonso/llmctl/main?nameFilter=Package%20.rpm&label=.rpm)](https://github.com/Ana-Alonso/llmctl/actions/workflows/ci.yml) | `llmctl-<ver>-1.*.noarch.rpm` |
48
+
49
+ ## Instalación en 1 comando (sin descargar ni clonar el repo)
50
+
51
+ ### Universal desde PyPI (Linux, macOS y Windows)
52
+ ```bash
53
+ uv tool install llmctl-cli
54
+ # o con pipx / pip:
55
+ pipx install llmctl-cli
56
+ pip install --user llmctl-cli
57
+ ```
58
+ *(El paquete en PyPI se llama `llmctl-cli`, pero el comando instalado en tu terminal sigue siendo **`llmctl`**).*
59
+
60
+ ### Script directo Linux y macOS
61
+ ```bash
62
+ curl -fsSL https://raw.githubusercontent.com/Ana-Alonso/llmctl/main/install.sh | bash
63
+ ```
64
+
65
+ ### Script directo Windows (PowerShell)
66
+ ```powershell
67
+ irm https://raw.githubusercontent.com/Ana-Alonso/llmctl/main/install.ps1 | iex
68
+ ```
69
+
70
+ ### Paquetes nativos (desde [GitHub Releases](https://github.com/Ana-Alonso/llmctl/releases))
71
+ - **Fedora / RHEL (`.rpm`):** `sudo dnf install ./llmctl-0.4.1-1.*.noarch.rpm`
72
+ - **Debian / Ubuntu (`.deb`):** `sudo apt install ./llmctl_0.4.1_all.deb`
73
+ - **macOS / Linux (Homebrew):** fórmula `llmctl.rb` adjunta en cada release.
74
+ - **Windows (Scoop):** manifiesto `llmctl.json` adjunto en cada release.
75
+
76
+ ### Instalar `llama-server` oficial automáticamente (opcional)
77
+ Si todavía no tienes `llama.cpp` instalado en tu equipo:
78
+ ```bash
79
+ llmctl server install --dry-run # previsualiza el binario oficial según tu SO/GPU
80
+ llmctl server install # descarga, extrae y guarda la ruta en config.toml
81
+ llmctl server update # actualiza si hay nueva release en ggml-org/llama.cpp
82
+ ```
83
+
84
+ ## Requisitos
85
+
86
+ - **Python >= 3.11** (biblioteca estándar; cero dependencias externas en runtime)
87
+ - **`llama-server`** (`llama.cpp`): instalable con `llmctl server install` o detectado en `PATH` (no requerido en modo remoto)
88
+ - Opcional: `nvidia-smi` (NVIDIA), `rocm-smi`/`amd-smi` (AMD), `vulkaninfo` (iGPU/Vulkan) o Apple Silicon (`sysctl` integrado en macOS)
89
+
90
+ ## Verificación inicial
91
+
92
+ ```bash
93
+ llmctl --version
94
+ llmctl doctor
95
+ llmctl gpu
96
+ llmctl status
97
+ ```
98
+
99
+ ## Backends de servicio multiplataforma
100
+
101
+ `llmctl` selecciona automáticamente el backend adecuado (o puedes forzarlo con `--backend` / `LLMCTL_BACKEND` / `config.toml`):
102
+
103
+ | Plataforma / Entorno | Backend | Gestión |
104
+ | :--- | :--- | :--- |
105
+ | **Linux (host)** | `systemd` | `systemd --user` + `journalctl` (`llmctl service install` genera la unit con la ruta real de `llama-server`) |
106
+ | **macOS** | `launchd` | `LaunchAgent` en `~/Library/LaunchAgents/` + logs en `~/Library/Logs/llmctl/` |
107
+ | **Windows / Contenedores / WSL** | `process` | Proceso en segundo plano con PID file + logs con `tail -f` nativo en Python |
108
+ | **Servidor remoto** | `remote` | Activado al usar `--backend remote`, un perfil remoto o `LLMCTL_API_URL` no-loopback |
109
+
110
+ ## Comandos principales
111
+
112
+ - **Modelos y presets:**
113
+ - `llmctl add [repo|archivo.gguf]` — Añade un modelo de Hugging Face o un `.gguf` local (`-i` búsqueda en vivo con auto-`mmproj` y optimización CPU-only, `-n <alias>`, `--file`, `--mmproj`, `--auto-mmproj`, `--mmproj-url`, `--cpu-optimize`, `--cpu-moe`, `--n-cpu-moe <N>`, `--no-restart`)
114
+ - `llmctl set <alias> clave=valor [...] [--unset clave]` — Edita o elimina parámetros de un preset en `models.ini` de forma atómica (p. ej. `llmctl set qwen ctx-size=16384 threads=8`)
115
+ - `llmctl rm [alias]` — Elimina un preset (`-i` interactivo, `--purge` borra caché solo si ningún otro preset comparte el repo)
116
+ - `llmctl ls` — Lista presets (HF y locales) y tamaño de caché (`--json`, `--names-only`)
117
+ - `llmctl ps` — Lista modelos cargados y disponibles en el router (`--json`)
118
+ - `llmctl pull <alias>` — Pre-descarga y carga un modelo vía `llama-server` con indicador de progreso en vivo
119
+ - `llmctl clean` — Detecta y borra carpetas huérfanas en caché (`--dry-run`, `--yes`)
120
+ - **Chat, benchmark y diagnóstico:**
121
+ - `llmctl chat <alias> [prompt...]` — Chat interactivo o *one-shot* con streaming SSE y soporte de pipes (`git diff | llmctl chat qwen "revisa este diff"`)
122
+ - `llmctl bench <alias1> [alias2 ...]` — Compara TTFT, `prompt tok/s`, `gen tok/s` y VRAM entre modelos (`--runs N`, `--max-tokens N`, `--json`)
123
+ - `llmctl test <alias>` — Suite auto-detectada (`--text`, `--vision`, `--tools`, `--embed`, `--fim`, `--all`, `--json`)
124
+ - `llmctl gpu` — Muestra VRAM/Metal/Vulkan, CPU (núcleos físicos/lógicos) y RAM (`--json`)
125
+ - `llmctl doctor` — Comprueba entorno, binario, perfil, `models.ini`, hardware y servicio (`--json`)
126
+ - `llmctl free` — Libera VRAM vía API router (`/models/unload`) o reiniciando el router
127
+ - **Perfiles, servidor remoto y API key:**
128
+ - `llmctl profile set homelab --url http://192.168.1.50:8080 --key mi-token --prof-backend remote --use`
129
+ - `llmctl profile list | use <nombre|default> | rm <nombre>`
130
+ - Flags globales: `--profile <nombre>`, `--api-url <url>`, `--api-key <token>` (o `LLMCTL_PROFILE`, `LLMCTL_API_URL`, `LLMCTL_API_KEY`)
131
+ - **Servicio y binarios:**
132
+ - `llmctl on | off | restart | status | logs [-n N] [--no-follow]`
133
+ - `llmctl service install | uninstall | info`
134
+ - `llmctl server install | update | info`
135
+ - `llmctl config` — Abre `models.ini` (`--app` abre `config.toml`, `--init` crea `config.toml`, `--show` muestra configuración efectiva)
136
+ - **Skills centralizadas (sin requerir `npx`):**
137
+ - `llmctl skill add <owner/repo|url|ruta>` (`--skill <nombre>`, `--all`, opcional `--via-npx`)
138
+ - `llmctl skill import | list | rm <nombre> | run <skill> <alias> [-p "prompt"] [-f archivo]`
139
+ - **Autocompletado e interactivo:**
140
+ - `llmctl completion bash | zsh | fish | powershell`
141
+ - `llmctl -i` / `--interactive`
142
+
143
+ ### Activar autocompletado
144
+
145
+ ```bash
146
+ # Bash
147
+ eval "$(llmctl completion bash)"
148
+
149
+ # Zsh
150
+ llmctl completion zsh > ~/.zsh/completions/_llmctl
151
+
152
+ # Fish
153
+ llmctl completion fish > ~/.config/fish/completions/llmctl.fish
154
+ ```
155
+
156
+ ```powershell
157
+ # PowerShell (añadir a $PROFILE)
158
+ llmctl completion powershell | Out-String | Invoke-Expression
159
+ ```
160
+
161
+ ## Desarrollo y empaquetado local
162
+
163
+ ```bash
164
+ git clone https://github.com/Ana-Alonso/llmctl.git
165
+ cd llmctl
166
+ uv sync --all-groups
167
+ make lint # ruff format --check, ruff check, ty check
168
+ make test-cov # pytest con cobertura >= 80%
169
+ uv build # sdist + wheel en dist/
170
+ ./packaging/build.sh rpm # o deb / all
171
+ ```
172
+
173
+ Ver historial de cambios en [CHANGELOG.md](CHANGELOG.md). Licencia [MIT](LICENSE).
@@ -0,0 +1,28 @@
1
+ llmctl/__init__.py,sha256=0JC26F2kDqZoLDn0KTh0K-nsGy2nIHavxf8RmAi5Bdw,323
2
+ llmctl/__main__.py,sha256=OK8AFFezQ9ag7li0kwFquLNc7ZnQ0xvaiyewFZLh14A,166
3
+ llmctl/bench.py,sha256=tUHgV53Aw9HRD9eazfQ2es_aFEeCn6iVn5lpBiR-dRk,5882
4
+ llmctl/cache.py,sha256=BguNl04vRMuLp2gSSF5QH1kgM7iFDFsFad2kKEUGBbc,3438
5
+ llmctl/chat.py,sha256=31N9OkkNZlhlc6LK2F5G-uIRZAXHFGdqhSQE-aOPc9M,6586
6
+ llmctl/cli.py,sha256=PrOzqQXu1ycN7r6wPzCEaBHc9IAUb2BBrS4HWT5wIXc,46051
7
+ llmctl/completions.py,sha256=kEn4oN43-Xe0RW3fQkMZvB7p5BXZDAUwYxsLNxRA9vw,12532
8
+ llmctl/config.py,sha256=Z0it46TE9Mf5PfljFDqkiA6V_dfz5A7YAKiXC9StAx4,22789
9
+ llmctl/doctor.py,sha256=m29dcItT4Pw2ZaW14BH4mKWo_GoxB6x1nR783Ylya-4,6441
10
+ llmctl/hardware.py,sha256=4hCLm2cfYmviqxBoKQkP01UB1eaTG1azhIE8zBX_KRc,17439
11
+ llmctl/hf.py,sha256=GX0RAHtCzvVgZAHNyBZFLHZ-HY0jRJpJS3t5RLXZ1kY,18416
12
+ llmctl/http_client.py,sha256=HCgcc5qV4Q4NFTiGlFh3l18WFQXWDSpRhvUtP5aWXV0,6644
13
+ llmctl/presets.py,sha256=u2pxOot2VBZ8H5h5j5-rtS44qLUCC_x042Rbd31zBXo,9724
14
+ llmctl/server_installer.py,sha256=Ug85AKtk2KO-NFhmMD4_vZf0SgssIOc_H87RdKfc2Fc,12788
15
+ llmctl/service/__init__.py,sha256=Etv2N9cq5ba_frgxy92r0YRScBw5MaMyxAAdjXfV1mc,1456
16
+ llmctl/service/base.py,sha256=gLYxl3SOrRF7Eq-RSLO2898aYKtrw1FPRB_q3AreLMQ,9152
17
+ llmctl/service/launchd.py,sha256=bek8widHLuuZLBeieD-mSAPiyzpa9eEcdLjSA8i6lgg,6446
18
+ llmctl/service/process.py,sha256=t3-KkzHWRkmMjwlWrPu1bKcevO4XeM_nO8mG3L9FEWU,10025
19
+ llmctl/service/remote.py,sha256=baAtkvoFSYlq1HHOMYBgoxG9pZFpifOB_p5wgNIQ0_0,2495
20
+ llmctl/service/systemd.py,sha256=dUZtFpv_rKVc6ZPj6bJIuhhXZBuzUfHdQRmf0kIvigU,7175
21
+ llmctl/skills.py,sha256=p64F7gGPO0zPFxTRmxWsTwSz5urJ8vaH-X5VM0L-VMc,14599
22
+ llmctl/tester.py,sha256=Kr2C950jir_ojdF5MS1z1QFtsH2CaxtGZ-m1fA14QCA,13886
23
+ llmctl/ui.py,sha256=RlN2UYLllUgh-9OLAocyKAKnEfN766cT0yXdU7IFNbM,6514
24
+ llmctl_cli-0.4.1.dist-info/licenses/LICENSE,sha256=CgzRuWJt0pSX1kiF99i3cKGaOASdO861wAhpfWUmOxI,1067
25
+ llmctl_cli-0.4.1.dist-info/WHEEL,sha256=kiPuyMTIXtn3KwIlb6zIkrxfbMkdQGyzN-kjAsvva48,81
26
+ llmctl_cli-0.4.1.dist-info/entry_points.txt,sha256=yQeyo4MmSexpEfs2jgSHI3LvqAQjwNZV-pfHwn2R1m8,121
27
+ llmctl_cli-0.4.1.dist-info/METADATA,sha256=R4CtS3ITFNIQeSI-0mq8HQ6EWo283RBG3jDwWUKV_Zc,9952
28
+ llmctl_cli-0.4.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: uv 0.13.12
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,5 @@
1
+ [console_scripts]
2
+ llmctl = llmctl.cli:main
3
+ llmctl-hf = llmctl.cli:main_add_compat
4
+ llmctl-rm = llmctl.cli:main_rm_compat
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ana Alonso
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.