lockthard-cli 0.2.0__tar.gz → 0.2.2__tar.gz
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.
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/PKG-INFO +1 -1
- lockthard_cli-0.2.2/lockthard_cli/SKILL.md +121 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/lockthard_cli/__init__.py +1 -1
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/lockthard_cli/cli.py +26 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/lockthard_cli.egg-info/PKG-INFO +1 -1
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/lockthard_cli.egg-info/SOURCES.txt +1 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/pyproject.toml +1 -1
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/README.md +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/lockthard_cli/auth.py +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/lockthard_cli/client.py +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/lockthard_cli/config.py +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/lockthard_cli/formatters.py +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/lockthard_cli.egg-info/dependency_links.txt +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/lockthard_cli.egg-info/entry_points.txt +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/lockthard_cli.egg-info/requires.txt +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/lockthard_cli.egg-info/top_level.txt +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/setup.cfg +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.2}/tests/test_cli.py +0 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lockthard
|
|
3
|
+
description: "LOCKTHARD CLI — query 2100+ curated AI tools across 86+ tablets. Search, browse tablets, get tool details, and investigate repos. Designed for both humans and AI agents."
|
|
4
|
+
version: 0.2.0
|
|
5
|
+
metadata:
|
|
6
|
+
hermes:
|
|
7
|
+
tags: [lockthard, tools, ai, search, tablets, mcp]
|
|
8
|
+
homepage: https://lockthard.es
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# LOCKTHARD CLI
|
|
12
|
+
|
|
13
|
+
CLI para consultar el directorio de herramientas IA de LOCKTHARD (2100+ herramientas, 86+ tablets). Diseñada para humanos (tablas Rich) y agentes IA (JSON limpio).
|
|
14
|
+
|
|
15
|
+
## Autenticación
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Opción 1: Variable de entorno (recomendado para agentes)
|
|
19
|
+
export LOCKTHARD_API_KEY="lk_tu_token"
|
|
20
|
+
|
|
21
|
+
# Opción 2: Login con token
|
|
22
|
+
lockthard login --token lk_tu_token
|
|
23
|
+
|
|
24
|
+
# Opción 3: Login interactivo (abre navegador)
|
|
25
|
+
lockthard login
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Token guardado en `~/.lockthard/credentials.json` (permisos 0600).
|
|
29
|
+
|
|
30
|
+
## Flag JSON (`-j` / `--json`)
|
|
31
|
+
|
|
32
|
+
Para agentes IA: **siempre usa `-j`** para recibir JSON limpio sin formato ANSI.
|
|
33
|
+
|
|
34
|
+
El flag funciona tanto a nivel global como en cualquier subcommand:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
lockthard -j tablets list # ✅ global
|
|
38
|
+
lockthard tablets list -j # ✅ en subcommand
|
|
39
|
+
lockthard -j tablets get vector-knowledge-base # ✅
|
|
40
|
+
lockthard tablets get vector-knowledge-base -j # ✅
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Comandos
|
|
44
|
+
|
|
45
|
+
| Comando | Descripción |
|
|
46
|
+
|---|---|
|
|
47
|
+
| `lockthard ping` | Verificar conexión y autenticación |
|
|
48
|
+
| `lockthard -j search "<query>"` | Buscar herramientas por palabra clave |
|
|
49
|
+
| `lockthard -j tablets list` | Listar todos los tablets disponibles |
|
|
50
|
+
| `lockthard -j tablets get <tablet_id>` | Ver herramientas de un tablet |
|
|
51
|
+
| `lockthard -j tools get "<tool_id>"` | Detalles de una herramienta específica |
|
|
52
|
+
| `lockthard -j cli-tools` | Listar herramientas CLI dedicadas |
|
|
53
|
+
| `lockthard guide` | Guía rápida para agentes |
|
|
54
|
+
|
|
55
|
+
## Estructura de un Tablet
|
|
56
|
+
|
|
57
|
+
Cada tablet es una colección curada de herramientas agrupadas por temática. Al obtener un tablet (`lockthard -j tablets get <id>`), recibes:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"id": "vector-knowledge-base",
|
|
62
|
+
"title": "Vector Knowledge Base",
|
|
63
|
+
"toolCount": 41,
|
|
64
|
+
"tools": [
|
|
65
|
+
{
|
|
66
|
+
"name": "Graphify",
|
|
67
|
+
"description": "Transforma un proyecto en un knowledge graph...",
|
|
68
|
+
"url": "https://github.com/safishamsi/graphify",
|
|
69
|
+
"section": "General",
|
|
70
|
+
"snippetsCount": 1
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Cómo interpretar las herramientas
|
|
77
|
+
|
|
78
|
+
- **`section`**: Categoría que agrupa la herramienta. **La sección YA es contexto** — si una herramienta está en "Memoria Y Contexto Para Agentes", eso ya indica su dominio.
|
|
79
|
+
- **`description`**: Descripción textual (puede estar vacía si el nombre + sección + URL son suficientes).
|
|
80
|
+
- **`url`**: Enlace al repositorio o sitio web. **El agente debe investigar esta URL** para obtener más detalles (leer README, verificar instalación, etc.).
|
|
81
|
+
- **`snippetsCount`**: Número de snippets de código o instrucciones adicionales disponibles vía `tools get`.
|
|
82
|
+
|
|
83
|
+
### Ejemplo: interpretación correcta
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
Herramienta: "LightRAG"
|
|
87
|
+
Sección: "RAG" (o "General")
|
|
88
|
+
URL: https://github.com/HKUDS/LightRAG
|
|
89
|
+
Descripción: (vacía)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Interpretación correcta:** Es un sistema RAG. La sección indica que es de la categoría RAG. La URL apunta a GitHub donde el agente puede leer el README para entender qué hace.
|
|
93
|
+
|
|
94
|
+
**Interpretación incorrecta:** ❌ "Herramienta sin descripción, está incompleta."
|
|
95
|
+
|
|
96
|
+
## Flujo de trabajo recomendado para agentes
|
|
97
|
+
|
|
98
|
+
1. `lockthard ping` — verificar auth
|
|
99
|
+
2. `lockthard -j tablets list` — ver tablets disponibles
|
|
100
|
+
3. `lockthard -j tablets get <id>` — explorar herramientas de un tablet relevante
|
|
101
|
+
4. Para cada herramienta interesante: **ir al repo/URL y leer documentación**
|
|
102
|
+
5. `lockthard -j tools get "<nombre>"` — detalles específicos con snippets si se necesitan
|
|
103
|
+
|
|
104
|
+
## Ejemplos de uso
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Buscar herramientas de OCR
|
|
108
|
+
lockthard -j search "ocr"
|
|
109
|
+
|
|
110
|
+
# Ver todo el tablet de cybersecurity
|
|
111
|
+
lockthard -j tablets get cybersecurity
|
|
112
|
+
|
|
113
|
+
# Ver detalles de una herramienta específica
|
|
114
|
+
lockthard -j tools get "Graphify"
|
|
115
|
+
|
|
116
|
+
# Listar herramientas CLI
|
|
117
|
+
lockthard -j cli-tools
|
|
118
|
+
|
|
119
|
+
# Verificar que todo funciona
|
|
120
|
+
lockthard ping
|
|
121
|
+
```
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import json
|
|
1
2
|
import sys
|
|
3
|
+
from pathlib import Path
|
|
2
4
|
from typing import Optional
|
|
3
5
|
import click
|
|
4
6
|
|
|
@@ -15,7 +17,10 @@ from .formatters import (
|
|
|
15
17
|
print_tool_details,
|
|
16
18
|
print_cli_tools,
|
|
17
19
|
print_agent_guide,
|
|
20
|
+
HAS_RICH,
|
|
21
|
+
console,
|
|
18
22
|
)
|
|
23
|
+
from rich.markdown import Markdown
|
|
19
24
|
|
|
20
25
|
|
|
21
26
|
def _handle_error(err: Exception):
|
|
@@ -204,6 +209,27 @@ def guide():
|
|
|
204
209
|
print_agent_guide()
|
|
205
210
|
|
|
206
211
|
|
|
212
|
+
@cli.command()
|
|
213
|
+
@click.pass_context
|
|
214
|
+
def skill(ctx: click.Context):
|
|
215
|
+
"""Muestra la SKILL.md integrada del paquete para que un Agente de IA la importe."""
|
|
216
|
+
try:
|
|
217
|
+
skill_path = Path(__file__).parent / "SKILL.md"
|
|
218
|
+
if not skill_path.exists():
|
|
219
|
+
raise FileNotFoundError(f"SKILL.md no encontrada en {skill_path}")
|
|
220
|
+
content = skill_path.read_text(encoding="utf-8")
|
|
221
|
+
|
|
222
|
+
if ctx.obj.get("as_json"):
|
|
223
|
+
print(json.dumps({"skill": content}, ensure_ascii=False))
|
|
224
|
+
else:
|
|
225
|
+
if HAS_RICH and console:
|
|
226
|
+
console.print(Markdown(content))
|
|
227
|
+
else:
|
|
228
|
+
print(content)
|
|
229
|
+
except Exception as e:
|
|
230
|
+
_handle_error(LockthardError(f"No se pudo leer SKILL.md: {e}"))
|
|
231
|
+
|
|
232
|
+
|
|
207
233
|
def main():
|
|
208
234
|
cli(obj={})
|
|
209
235
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "lockthard-cli"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description = "CLI and AI agent client for LOCKTHARD — query 2100+ curated AI tools across 86+ tablets"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|