lockthard-cli 0.2.1__tar.gz → 0.2.3__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.1 → lockthard_cli-0.2.3}/PKG-INFO +1 -1
- lockthard_cli-0.2.3/lockthard_cli/SKILL.md +121 -0
- {lockthard_cli-0.2.1 → lockthard_cli-0.2.3}/lockthard_cli/__init__.py +1 -1
- {lockthard_cli-0.2.1 → lockthard_cli-0.2.3}/lockthard_cli/cli.py +5 -13
- {lockthard_cli-0.2.1 → lockthard_cli-0.2.3}/lockthard_cli/formatters.py +14 -3
- {lockthard_cli-0.2.1 → lockthard_cli-0.2.3}/lockthard_cli.egg-info/PKG-INFO +1 -1
- {lockthard_cli-0.2.1 → lockthard_cli-0.2.3}/lockthard_cli.egg-info/SOURCES.txt +1 -0
- {lockthard_cli-0.2.1 → lockthard_cli-0.2.3}/pyproject.toml +1 -1
- {lockthard_cli-0.2.1 → lockthard_cli-0.2.3}/README.md +0 -0
- {lockthard_cli-0.2.1 → lockthard_cli-0.2.3}/lockthard_cli/auth.py +0 -0
- {lockthard_cli-0.2.1 → lockthard_cli-0.2.3}/lockthard_cli/client.py +0 -0
- {lockthard_cli-0.2.1 → lockthard_cli-0.2.3}/lockthard_cli/config.py +0 -0
- {lockthard_cli-0.2.1 → lockthard_cli-0.2.3}/lockthard_cli.egg-info/dependency_links.txt +0 -0
- {lockthard_cli-0.2.1 → lockthard_cli-0.2.3}/lockthard_cli.egg-info/entry_points.txt +0 -0
- {lockthard_cli-0.2.1 → lockthard_cli-0.2.3}/lockthard_cli.egg-info/requires.txt +0 -0
- {lockthard_cli-0.2.1 → lockthard_cli-0.2.3}/lockthard_cli.egg-info/top_level.txt +0 -0
- {lockthard_cli-0.2.1 → lockthard_cli-0.2.3}/setup.cfg +0 -0
- {lockthard_cli-0.2.1 → lockthard_cli-0.2.3}/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
|
+
```
|
|
@@ -34,7 +34,8 @@ def _get_as_json(ctx: click.Context, local_flag: bool) -> bool:
|
|
|
34
34
|
return ctx.obj.get("as_json", False) or local_flag
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
@click.group(invoke_without_command=False
|
|
37
|
+
@click.group(invoke_without_command=False,
|
|
38
|
+
epilog="Primer uso: lockthard skill | Para agentes: lockthard -j skill")
|
|
38
39
|
@click.option("--url", "-u", default=None, help="Base URL del servidor LOCKTHARD (default: https://lockthard.es).")
|
|
39
40
|
@click.option("--token", "-t", default=None, help="API Key / Token de autenticación (lk_...).")
|
|
40
41
|
@click.option("--json", "-j", "as_json", is_flag=True, help="Salida en JSON bruto (ideal para scripts y agentes).")
|
|
@@ -213,20 +214,11 @@ def guide():
|
|
|
213
214
|
@click.pass_context
|
|
214
215
|
def skill(ctx: click.Context):
|
|
215
216
|
"""Muestra la SKILL.md integrada del paquete para que un Agente de IA la importe."""
|
|
216
|
-
import importlib.resources
|
|
217
217
|
try:
|
|
218
|
-
|
|
219
|
-
pkg_dir = Path(__file__).parent.parent
|
|
220
|
-
skill_path = pkg_dir / "SKILL.md"
|
|
218
|
+
skill_path = Path(__file__).parent / "SKILL.md"
|
|
221
219
|
if not skill_path.exists():
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
ref = importlib.resources.files("lockthard_cli").parent.joinpath("SKILL.md")
|
|
225
|
-
content = ref.read_text(encoding="utf-8")
|
|
226
|
-
except Exception:
|
|
227
|
-
raise FileNotFoundError("SKILL.md no encontrada en el paquete.")
|
|
228
|
-
else:
|
|
229
|
-
content = skill_path.read_text(encoding="utf-8")
|
|
220
|
+
raise FileNotFoundError(f"SKILL.md no encontrada en {skill_path}")
|
|
221
|
+
content = skill_path.read_text(encoding="utf-8")
|
|
230
222
|
|
|
231
223
|
if ctx.obj.get("as_json"):
|
|
232
224
|
print(json.dumps({"skill": content}, ensure_ascii=False))
|
|
@@ -220,12 +220,23 @@ def print_agent_guide():
|
|
|
220
220
|
|
|
221
221
|
Bienvenido a la CLI de **LOCKTHARD**. Esta interfaz permite a Agentes de IA (Claude Code, Antigravity, Aider, Cursor) consultar la base de datos de 1200+ herramientas IA con mínimo consumo de tokens.
|
|
222
222
|
|
|
223
|
+
## SKILL Completa
|
|
224
|
+
|
|
225
|
+
Para obtener la guía completa optimizada para agentes, ejecuta:
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
lockthard skill
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Esto imprime la SKILL.md con toda la referencia: comandos, estructura de tablets, flujo de trabajo y ejemplos.
|
|
232
|
+
|
|
223
233
|
## Buenas Prácticas para Agentes
|
|
224
234
|
|
|
225
|
-
1. **Usa el flag
|
|
226
|
-
Devuelve datos limpios y estructurados en JSON
|
|
235
|
+
1. **Usa el flag `-j` (posicion global o en subcommand):**
|
|
236
|
+
Devuelve datos limpios y estructurados en JSON.
|
|
227
237
|
```bash
|
|
228
|
-
lockthard search "ocr"
|
|
238
|
+
lockthard -j search "ocr"
|
|
239
|
+
lockthard tablets list -j
|
|
229
240
|
```
|
|
230
241
|
|
|
231
242
|
2. **Flujo de Trabajo Recomendado:**
|
|
@@ -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.3"
|
|
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
|