lockthard-cli 0.2.7__tar.gz → 0.2.9__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.
Files changed (20) hide show
  1. {lockthard_cli-0.2.7 → lockthard_cli-0.2.9}/PKG-INFO +20 -17
  2. {lockthard_cli-0.2.7 → lockthard_cli-0.2.9}/README.md +18 -15
  3. {lockthard_cli-0.2.7 → lockthard_cli-0.2.9}/lockthard_cli.egg-info/PKG-INFO +20 -17
  4. {lockthard_cli-0.2.7 → lockthard_cli-0.2.9}/lockthard_cli.egg-info/SOURCES.txt +7 -7
  5. lockthard_cli-0.2.9/lockthard_cli.egg-info/entry_points.txt +2 -0
  6. lockthard_cli-0.2.9/lockthard_cli.egg-info/top_level.txt +3 -0
  7. {lockthard_cli-0.2.7/lockthard_cli → lockthard_cli-0.2.9/loktar_cli}/SKILL.md +32 -31
  8. {lockthard_cli-0.2.7/lockthard_cli → lockthard_cli-0.2.9/loktar_cli}/__init__.py +1 -1
  9. {lockthard_cli-0.2.7/lockthard_cli → lockthard_cli-0.2.9/loktar_cli}/cli.py +16 -16
  10. {lockthard_cli-0.2.7/lockthard_cli → lockthard_cli-0.2.9/loktar_cli}/client.py +19 -19
  11. {lockthard_cli-0.2.7/lockthard_cli → lockthard_cli-0.2.9/loktar_cli}/config.py +13 -18
  12. {lockthard_cli-0.2.7 → lockthard_cli-0.2.9}/pyproject.toml +3 -4
  13. {lockthard_cli-0.2.7 → lockthard_cli-0.2.9}/tests/test_cli.py +3 -3
  14. lockthard_cli-0.2.7/lockthard_cli.egg-info/entry_points.txt +0 -3
  15. lockthard_cli-0.2.7/lockthard_cli.egg-info/top_level.txt +0 -3
  16. {lockthard_cli-0.2.7 → lockthard_cli-0.2.9}/lockthard_cli.egg-info/dependency_links.txt +0 -0
  17. {lockthard_cli-0.2.7 → lockthard_cli-0.2.9}/lockthard_cli.egg-info/requires.txt +0 -0
  18. {lockthard_cli-0.2.7/lockthard_cli → lockthard_cli-0.2.9/loktar_cli}/auth.py +0 -0
  19. {lockthard_cli-0.2.7/lockthard_cli → lockthard_cli-0.2.9/loktar_cli}/formatters.py +0 -0
  20. {lockthard_cli-0.2.7 → lockthard_cli-0.2.9}/setup.cfg +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lockthard-cli
3
- Version: 0.2.7
3
+ Version: 0.2.9
4
4
  Summary: CLI and AI agent client for LOKTAR — query 2100+ curated AI tools across 86+ tablets
5
5
  Author-email: Loktar Team <info@loktar.cc>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://loktar.cc
8
- Keywords: cli,ai-tools,agents,mcp,loktar,lockthard
8
+ Keywords: cli,ai-tools,agents,mcp,loktar
9
9
  Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Environment :: Console
11
11
  Classifier: Intended Audience :: Developers
@@ -20,16 +20,16 @@ Requires-Dist: click>=8.1.0
20
20
  Requires-Dist: requests>=2.28.0
21
21
  Requires-Dist: rich>=13.0.0
22
22
 
23
- # LOCKTHARD CLI (`lockthard`)
23
+ # LOKTAR CLI (`loktar`)
24
24
 
25
- A super efficient, scriptable command-line interface and AI agent client for **LOCKTHARD** (https://loktar.cc).
25
+ A super efficient, scriptable command-line interface and AI agent client for **LOKTAR** (https://loktar.cc).
26
26
 
27
- Allows both human developers and autonomous AI agents (Claude Code, Antigravity, Aider, Cursor, etc.) to query, search, and inspect 61+ tablets and 1200+ AI tools with minimum token usage and zero prompt overhead.
27
+ Allows both human developers and autonomous AI agents (Claude Code, Antigravity, Aider, Cursor, etc.) to query, search, and inspect 86+ tablets and 2100+ AI tools with minimum token usage and zero prompt overhead.
28
28
 
29
29
  ## Installation
30
30
 
31
31
  ```bash
32
- pip install lockthard-cli
32
+ pip install --upgrade lockthard-cli
33
33
  ```
34
34
 
35
35
  Or run without installing:
@@ -45,40 +45,43 @@ Get your API key from [loktar.cc](https://loktar.cc).
45
45
 
46
46
  - **For AI Agents & CI/CD:**
47
47
  ```bash
48
- export LOCKTHARD_API_KEY="lk_your_token_here"
48
+ export LOKTAR_API_KEY="lk_your_token_here"
49
49
  ```
50
50
  - **Interactive Browser Login (Humans):**
51
51
  ```bash
52
- lockthard login
52
+ loktar login
53
53
  ```
54
54
  - **Manual Login:**
55
55
  ```bash
56
- lockthard login --token "lk_your_token_here"
56
+ loktar login --token "lk_your_token_here"
57
57
  ```
58
58
 
59
59
  ### 2. Commands
60
60
 
61
61
  ```bash
62
62
  # Ping service
63
- lockthard ping
63
+ loktar ping
64
64
 
65
- # Search tools (returns concise ASCII table)
66
- lockthard search "ocr"
65
+ # Search tools (returns concise table)
66
+ loktar search "ocr"
67
67
 
68
68
  # Search tools in raw JSON (for agents / jq)
69
- lockthard search "ocr" --json
69
+ loktar -j search "ocr"
70
70
 
71
71
  # List all tablets
72
- lockthard tablets list
72
+ loktar tablets list
73
73
 
74
74
  # Inspect a specific tablet
75
- lockthard tablets get ocr
75
+ loktar tablets get ocr
76
76
 
77
77
  # Inspect tool details
78
- lockthard tools get "Chandra OCR"
78
+ loktar tools get "Chandra OCR"
79
79
 
80
80
  # Display CLI agent guide
81
- lockthard guide
81
+ loktar guide
82
+
83
+ # Display full agent skill
84
+ loktar skill
82
85
  ```
83
86
 
84
87
  ## Options
@@ -1,13 +1,13 @@
1
- # LOCKTHARD CLI (`lockthard`)
1
+ # LOKTAR CLI (`loktar`)
2
2
 
3
- A super efficient, scriptable command-line interface and AI agent client for **LOCKTHARD** (https://loktar.cc).
3
+ A super efficient, scriptable command-line interface and AI agent client for **LOKTAR** (https://loktar.cc).
4
4
 
5
- Allows both human developers and autonomous AI agents (Claude Code, Antigravity, Aider, Cursor, etc.) to query, search, and inspect 61+ tablets and 1200+ AI tools with minimum token usage and zero prompt overhead.
5
+ Allows both human developers and autonomous AI agents (Claude Code, Antigravity, Aider, Cursor, etc.) to query, search, and inspect 86+ tablets and 2100+ AI tools with minimum token usage and zero prompt overhead.
6
6
 
7
7
  ## Installation
8
8
 
9
9
  ```bash
10
- pip install lockthard-cli
10
+ pip install --upgrade lockthard-cli
11
11
  ```
12
12
 
13
13
  Or run without installing:
@@ -23,40 +23,43 @@ Get your API key from [loktar.cc](https://loktar.cc).
23
23
 
24
24
  - **For AI Agents & CI/CD:**
25
25
  ```bash
26
- export LOCKTHARD_API_KEY="lk_your_token_here"
26
+ export LOKTAR_API_KEY="lk_your_token_here"
27
27
  ```
28
28
  - **Interactive Browser Login (Humans):**
29
29
  ```bash
30
- lockthard login
30
+ loktar login
31
31
  ```
32
32
  - **Manual Login:**
33
33
  ```bash
34
- lockthard login --token "lk_your_token_here"
34
+ loktar login --token "lk_your_token_here"
35
35
  ```
36
36
 
37
37
  ### 2. Commands
38
38
 
39
39
  ```bash
40
40
  # Ping service
41
- lockthard ping
41
+ loktar ping
42
42
 
43
- # Search tools (returns concise ASCII table)
44
- lockthard search "ocr"
43
+ # Search tools (returns concise table)
44
+ loktar search "ocr"
45
45
 
46
46
  # Search tools in raw JSON (for agents / jq)
47
- lockthard search "ocr" --json
47
+ loktar -j search "ocr"
48
48
 
49
49
  # List all tablets
50
- lockthard tablets list
50
+ loktar tablets list
51
51
 
52
52
  # Inspect a specific tablet
53
- lockthard tablets get ocr
53
+ loktar tablets get ocr
54
54
 
55
55
  # Inspect tool details
56
- lockthard tools get "Chandra OCR"
56
+ loktar tools get "Chandra OCR"
57
57
 
58
58
  # Display CLI agent guide
59
- lockthard guide
59
+ loktar guide
60
+
61
+ # Display full agent skill
62
+ loktar skill
60
63
  ```
61
64
 
62
65
  ## Options
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lockthard-cli
3
- Version: 0.2.7
3
+ Version: 0.2.9
4
4
  Summary: CLI and AI agent client for LOKTAR — query 2100+ curated AI tools across 86+ tablets
5
5
  Author-email: Loktar Team <info@loktar.cc>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://loktar.cc
8
- Keywords: cli,ai-tools,agents,mcp,loktar,lockthard
8
+ Keywords: cli,ai-tools,agents,mcp,loktar
9
9
  Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Environment :: Console
11
11
  Classifier: Intended Audience :: Developers
@@ -20,16 +20,16 @@ Requires-Dist: click>=8.1.0
20
20
  Requires-Dist: requests>=2.28.0
21
21
  Requires-Dist: rich>=13.0.0
22
22
 
23
- # LOCKTHARD CLI (`lockthard`)
23
+ # LOKTAR CLI (`loktar`)
24
24
 
25
- A super efficient, scriptable command-line interface and AI agent client for **LOCKTHARD** (https://loktar.cc).
25
+ A super efficient, scriptable command-line interface and AI agent client for **LOKTAR** (https://loktar.cc).
26
26
 
27
- Allows both human developers and autonomous AI agents (Claude Code, Antigravity, Aider, Cursor, etc.) to query, search, and inspect 61+ tablets and 1200+ AI tools with minimum token usage and zero prompt overhead.
27
+ Allows both human developers and autonomous AI agents (Claude Code, Antigravity, Aider, Cursor, etc.) to query, search, and inspect 86+ tablets and 2100+ AI tools with minimum token usage and zero prompt overhead.
28
28
 
29
29
  ## Installation
30
30
 
31
31
  ```bash
32
- pip install lockthard-cli
32
+ pip install --upgrade lockthard-cli
33
33
  ```
34
34
 
35
35
  Or run without installing:
@@ -45,40 +45,43 @@ Get your API key from [loktar.cc](https://loktar.cc).
45
45
 
46
46
  - **For AI Agents & CI/CD:**
47
47
  ```bash
48
- export LOCKTHARD_API_KEY="lk_your_token_here"
48
+ export LOKTAR_API_KEY="lk_your_token_here"
49
49
  ```
50
50
  - **Interactive Browser Login (Humans):**
51
51
  ```bash
52
- lockthard login
52
+ loktar login
53
53
  ```
54
54
  - **Manual Login:**
55
55
  ```bash
56
- lockthard login --token "lk_your_token_here"
56
+ loktar login --token "lk_your_token_here"
57
57
  ```
58
58
 
59
59
  ### 2. Commands
60
60
 
61
61
  ```bash
62
62
  # Ping service
63
- lockthard ping
63
+ loktar ping
64
64
 
65
- # Search tools (returns concise ASCII table)
66
- lockthard search "ocr"
65
+ # Search tools (returns concise table)
66
+ loktar search "ocr"
67
67
 
68
68
  # Search tools in raw JSON (for agents / jq)
69
- lockthard search "ocr" --json
69
+ loktar -j search "ocr"
70
70
 
71
71
  # List all tablets
72
- lockthard tablets list
72
+ loktar tablets list
73
73
 
74
74
  # Inspect a specific tablet
75
- lockthard tablets get ocr
75
+ loktar tablets get ocr
76
76
 
77
77
  # Inspect tool details
78
- lockthard tools get "Chandra OCR"
78
+ loktar tools get "Chandra OCR"
79
79
 
80
80
  # Display CLI agent guide
81
- lockthard guide
81
+ loktar guide
82
+
83
+ # Display full agent skill
84
+ loktar skill
82
85
  ```
83
86
 
84
87
  ## Options
@@ -1,16 +1,16 @@
1
1
  README.md
2
2
  pyproject.toml
3
- lockthard_cli/SKILL.md
4
- lockthard_cli/__init__.py
5
- lockthard_cli/auth.py
6
- lockthard_cli/cli.py
7
- lockthard_cli/client.py
8
- lockthard_cli/config.py
9
- lockthard_cli/formatters.py
10
3
  lockthard_cli.egg-info/PKG-INFO
11
4
  lockthard_cli.egg-info/SOURCES.txt
12
5
  lockthard_cli.egg-info/dependency_links.txt
13
6
  lockthard_cli.egg-info/entry_points.txt
14
7
  lockthard_cli.egg-info/requires.txt
15
8
  lockthard_cli.egg-info/top_level.txt
9
+ loktar_cli/SKILL.md
10
+ loktar_cli/__init__.py
11
+ loktar_cli/auth.py
12
+ loktar_cli/cli.py
13
+ loktar_cli/client.py
14
+ loktar_cli/config.py
15
+ loktar_cli/formatters.py
16
16
  tests/test_cli.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ loktar = loktar_cli.cli:main
@@ -0,0 +1,3 @@
1
+ dist
2
+ loktar_cli
3
+ tests
@@ -1,31 +1,31 @@
1
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.6
2
+ name: loktar
3
+ description: "LOKTAR 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.8
5
5
  metadata:
6
6
  hermes:
7
- tags: [lockthard, tools, ai, search, tablets, mcp]
7
+ tags: [loktar, tools, ai, search, tablets, mcp]
8
8
  homepage: https://loktar.cc
9
9
  ---
10
10
 
11
- # LOCKTHARD CLI
11
+ # LOKTAR CLI
12
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).
13
+ CLI para consultar el directorio de herramientas IA de LOKTAR (2100+ herramientas, 86+ tablets). Diseñada para humanos (tablas Rich) y agentes IA (JSON limpio).
14
14
 
15
15
  ## Autenticación
16
16
 
17
17
  ```bash
18
18
  # Opción 1: Variable de entorno (recomendado para agentes)
19
- export LOCKTHARD_API_KEY="lk_tu_token"
19
+ export LOKTAR_API_KEY="lk_tu_token"
20
20
 
21
21
  # Opción 2: Login con token
22
- lockthard login --token lk_tu_token
22
+ loktar login --token lk_tu_token
23
23
 
24
24
  # Opción 3: Login interactivo (abre navegador)
25
- lockthard login
25
+ loktar login
26
26
  ```
27
27
 
28
- Token guardado en `~/.lockthard/credentials.json` (permisos 0600).
28
+ Token guardado en `~/.loktar/credentials.json` con permisos 0600.
29
29
 
30
30
  ## Flag JSON (`-j` / `--json`)
31
31
 
@@ -34,27 +34,28 @@ Para agentes IA: **siempre usa `-j`** para recibir JSON limpio sin formato ANSI.
34
34
  El flag funciona tanto a nivel global como en cualquier subcommand:
35
35
 
36
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 # ✅
37
+ loktar -j tablets list # ✅ global
38
+ loktar tablets list -j # ✅ en subcommand
39
+ loktar -j tablets get vector-knowledge-base # ✅
40
+ loktar tablets get vector-knowledge-base -j # ✅
41
41
  ```
42
42
 
43
43
  ## Comandos
44
44
 
45
45
  | Comando | Descripción |
46
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 |
47
+ | `loktar ping` | Verificar conexión y autenticación |
48
+ | `loktar -j search "<query>"` | Buscar herramientas por palabra clave |
49
+ | `loktar -j tablets list` | Listar todos los tablets disponibles |
50
+ | `loktar -j tablets get <tablet_id>` | Ver herramientas de un tablet |
51
+ | `loktar -j tools get "<tool_id>"` | Detalles de una herramienta específica |
52
+ | `loktar -j cli-tools` | Listar herramientas CLI dedicadas |
53
+ | `loktar guide` | Guía rápida para agentes |
54
+ | `loktar skill` | Muestra esta SKILL.md completa |
54
55
 
55
56
  ## Estructura de un Tablet
56
57
 
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
+ Cada tablet es una colección curada de herramientas agrupadas por temática. Al obtener un tablet (`loktar -j tablets get <id>`), recibes:
58
59
 
59
60
  ```json
60
61
  {
@@ -95,27 +96,27 @@ Descripción: (vacía)
95
96
 
96
97
  ## Flujo de trabajo recomendado para agentes
97
98
 
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
99
+ 1. `loktar ping` — verificar auth
100
+ 2. `loktar -j tablets list` — ver tablets disponibles
101
+ 3. `loktar -j tablets get <id>` — explorar herramientas de un tablet relevante
101
102
  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
+ 5. `loktar -j tools get "<nombre>"` — detalles específicos con snippets si se necesitan
103
104
 
104
105
  ## Ejemplos de uso
105
106
 
106
107
  ```bash
107
108
  # Buscar herramientas de OCR
108
- lockthard -j search "ocr"
109
+ loktar -j search "ocr"
109
110
 
110
111
  # Ver todo el tablet de cybersecurity
111
- lockthard -j tablets get cybersecurity
112
+ loktar -j tablets get cybersecurity
112
113
 
113
114
  # Ver detalles de una herramienta específica
114
- lockthard -j tools get "Graphify"
115
+ loktar -j tools get "Graphify"
115
116
 
116
117
  # Listar herramientas CLI
117
- lockthard -j cli-tools
118
+ loktar -j cli-tools
118
119
 
119
120
  # Verificar que todo funciona
120
- lockthard ping
121
+ loktar ping
121
122
  ```
@@ -2,4 +2,4 @@
2
2
  LOKTAR CLI - Command Line Interface and Agent Client for LOKTAR.
3
3
  """
4
4
 
5
- __version__ = "0.2.7"
5
+ __version__ = "0.2.9"
@@ -7,7 +7,7 @@ import click
7
7
  from . import __version__
8
8
  from .config import resolve_token, resolve_api_url, save_credentials, clear_credentials
9
9
  from .auth import perform_browser_login
10
- from .client import LockthardClient, LockthardError
10
+ from .client import LoktarClient, LoktarError
11
11
  from .formatters import (
12
12
  output_data,
13
13
  print_ping_result,
@@ -53,7 +53,7 @@ Primer uso: loktar skill | Para agentes: loktar -j skill
53
53
  ctx.obj["url"] = resolved_url
54
54
  ctx.obj["token"] = resolved_token
55
55
  ctx.obj["as_json"] = as_json
56
- ctx.obj["client"] = LockthardClient(base_url=resolved_url, token=resolved_token)
56
+ ctx.obj["client"] = LoktarClient(base_url=resolved_url, token=resolved_token)
57
57
 
58
58
 
59
59
  @cli.command()
@@ -62,12 +62,12 @@ Primer uso: loktar skill | Para agentes: loktar -j skill
62
62
  @click.pass_context
63
63
  def ping(ctx: click.Context, as_json_local: bool):
64
64
  """Verifica la conectividad con el servidor de LOKTAR y el estado del token."""
65
- client: LockthardClient = ctx.obj["client"]
65
+ client: LoktarClient = ctx.obj["client"]
66
66
  as_json = _get_as_json(ctx, as_json_local)
67
67
  try:
68
68
  res = client.ping()
69
69
  print_ping_result(res, as_json=as_json)
70
- except LockthardError as e:
70
+ except LoktarError as e:
71
71
  _handle_error(e)
72
72
 
73
73
 
@@ -89,7 +89,7 @@ def login(ctx: click.Context, token: Optional[str], manual: bool):
89
89
  if manual:
90
90
  token_input = click.prompt("Pega tu API Key de LOKTAR (lk_...)", hide_input=True)
91
91
  if not token_input or not token_input.strip():
92
- _handle_error(LockthardError("Token vacío."))
92
+ _handle_error(LoktarError("Token vacío."))
93
93
  save_credentials(api_key=token_input.strip(), api_url=api_url)
94
94
  click.secho("✓ API Key guardada correctamente en ~/.loktar/credentials.json", fg="green")
95
95
  return
@@ -122,12 +122,12 @@ def logout():
122
122
  @click.pass_context
123
123
  def search(ctx: click.Context, as_json_local: bool, query: str, tablet: Optional[str], limit: int):
124
124
  """Busca herramientas por palabra clave en LOKTAR."""
125
- client: LockthardClient = ctx.obj["client"]
125
+ client: LoktarClient = ctx.obj["client"]
126
126
  as_json = _get_as_json(ctx, as_json_local)
127
127
  try:
128
128
  results = client.search_tools(query=query, tablet_id=tablet, limit=limit)
129
129
  print_search_results(query, results, as_json=as_json)
130
- except LockthardError as e:
130
+ except LoktarError as e:
131
131
  _handle_error(e)
132
132
 
133
133
 
@@ -144,12 +144,12 @@ def tablets():
144
144
  @click.pass_context
145
145
  def list_tablets_cmd(ctx: click.Context, as_json_local: bool, query: Optional[str]):
146
146
  """Lista los 61+ tablets y categorías disponibles."""
147
- client: LockthardClient = ctx.obj["client"]
147
+ client: LoktarClient = ctx.obj["client"]
148
148
  as_json = _get_as_json(ctx, as_json_local)
149
149
  try:
150
150
  res = client.list_tablets(query=query)
151
151
  print_tablets_list(res, as_json=as_json)
152
- except LockthardError as e:
152
+ except LoktarError as e:
153
153
  _handle_error(e)
154
154
 
155
155
 
@@ -161,12 +161,12 @@ def list_tablets_cmd(ctx: click.Context, as_json_local: bool, query: Optional[st
161
161
  @click.pass_context
162
162
  def get_tablet_cmd(ctx: click.Context, as_json_local: bool, tablet_id: str, limit: Optional[int]):
163
163
  """Obtiene el contenido completo de un tablet por su ID (ej. ocr, open-source)."""
164
- client: LockthardClient = ctx.obj["client"]
164
+ client: LoktarClient = ctx.obj["client"]
165
165
  as_json = _get_as_json(ctx, as_json_local)
166
166
  try:
167
167
  res = client.get_tablet(tablet_id=tablet_id, limit=limit)
168
168
  print_tablet_content(res, as_json=as_json)
169
- except LockthardError as e:
169
+ except LoktarError as e:
170
170
  _handle_error(e)
171
171
 
172
172
 
@@ -183,12 +183,12 @@ def tools():
183
183
  @click.pass_context
184
184
  def get_tool_cmd(ctx: click.Context, as_json_local: bool, tool_id: str):
185
185
  """Obtiene los detalles y comandos recomendados de una herramienta específica."""
186
- client: LockthardClient = ctx.obj["client"]
186
+ client: LoktarClient = ctx.obj["client"]
187
187
  as_json = _get_as_json(ctx, as_json_local)
188
188
  try:
189
189
  res = client.get_tool_details(tool_id=tool_id)
190
190
  print_tool_details(res, as_json=as_json)
191
- except LockthardError as e:
191
+ except LoktarError as e:
192
192
  _handle_error(e)
193
193
 
194
194
 
@@ -198,12 +198,12 @@ def get_tool_cmd(ctx: click.Context, as_json_local: bool, tool_id: str):
198
198
  @click.pass_context
199
199
  def cli_tools_cmd(ctx: click.Context, as_json_local: bool):
200
200
  """Lista las herramientas especializadas de línea de comandos en LOKTAR."""
201
- client: LockthardClient = ctx.obj["client"]
201
+ client: LoktarClient = ctx.obj["client"]
202
202
  as_json = _get_as_json(ctx, as_json_local)
203
203
  try:
204
204
  res = client.get_cli_tools()
205
205
  print_cli_tools(res, as_json=as_json)
206
- except LockthardError as e:
206
+ except LoktarError as e:
207
207
  _handle_error(e)
208
208
 
209
209
 
@@ -231,7 +231,7 @@ def skill(ctx: click.Context):
231
231
  else:
232
232
  print(content)
233
233
  except Exception as e:
234
- _handle_error(LockthardError(f"No se pudo leer SKILL.md: {e}"))
234
+ _handle_error(LoktarError(f"No se pudo leer SKILL.md: {e}"))
235
235
 
236
236
 
237
237
  def main():
@@ -3,13 +3,13 @@ from typing import Any, Dict, List, Optional
3
3
  import requests
4
4
 
5
5
 
6
- class LockthardError(Exception):
7
- """Base exception for LOCKTHARD CLI client errors."""
6
+ class LoktarError(Exception):
7
+ """Base exception for LOKTAR CLI client errors."""
8
8
  pass
9
9
 
10
10
 
11
- class LockthardClient:
12
- """Pure data layer for communicating with the LOCKTHARD API backend."""
11
+ class LoktarClient:
12
+ """Pure data layer for communicating with the LOKTAR API backend."""
13
13
 
14
14
  def __init__(self, base_url: str = "https://loktar.cc", token: Optional[str] = None, timeout: int = 15):
15
15
  self.base_url = base_url.rstrip("/")
@@ -26,22 +26,22 @@ class LockthardClient:
26
26
  url = f"{self.base_url}{path}"
27
27
  resp = self._session.get(url, params=params, timeout=self.timeout)
28
28
  if resp.status_code == 401:
29
- raise LockthardError("No autorizado: Token inválido o no proporcionado.")
29
+ raise LoktarError("No autorizado: Token inválido o no proporcionado.")
30
30
  resp.raise_for_status()
31
31
  if not resp.content:
32
32
  return {}
33
33
  return resp.json()
34
34
  except requests.ConnectionError:
35
- raise LockthardError(f"No se pudo conectar con el servidor en {self.base_url}")
35
+ raise LoktarError(f"No se pudo conectar con el servidor en {self.base_url}")
36
36
  except requests.Timeout:
37
- raise LockthardError(f"Tiempo de espera agotado ({self.timeout}s) conectando a {self.base_url}")
37
+ raise LoktarError(f"Tiempo de espera agotado ({self.timeout}s) conectando a {self.base_url}")
38
38
  except requests.HTTPError as e:
39
- raise LockthardError(f"Error HTTP del servidor: {e}")
39
+ raise LoktarError(f"Error HTTP del servidor: {e}")
40
40
  except ValueError:
41
- raise LockthardError("Respuesta de servidor no válida (JSON inválido).")
41
+ raise LoktarError("Respuesta de servidor no válida (JSON inválido).")
42
42
 
43
43
  def _mcp_call(self, method: str, params: Optional[Dict[str, Any]] = None) -> Any:
44
- """Call LOCKTHARD JSON-RPC MCP endpoint at /api/mcp."""
44
+ """Call LOKTAR JSON-RPC MCP endpoint at /api/mcp."""
45
45
  self._jsonrpc_id += 1
46
46
  payload = {
47
47
  "jsonrpc": "2.0",
@@ -53,12 +53,12 @@ class LockthardClient:
53
53
  url = f"{self.base_url}/api/mcp"
54
54
  resp = self._session.post(url, json=payload, timeout=self.timeout)
55
55
  if resp.status_code == 401:
56
- raise LockthardError("No autorizado: Token inválido. Inicia sesión con 'lockthard login'.")
56
+ raise LoktarError("No autorizado: Token inválido. Inicia sesión con 'loktar login'.")
57
57
  resp.raise_for_status()
58
58
  data = resp.json()
59
59
  if "error" in data:
60
60
  err = data["error"]
61
- raise LockthardError(f"Error MCP ({err.get('code', 'unknown')}): {err.get('message', '')}")
61
+ raise LoktarError(f"Error MCP ({err.get('code', 'unknown')}): {err.get('message', '')}")
62
62
 
63
63
  result = data.get("result", {})
64
64
  # Decode MCP text content if wrapped
@@ -72,13 +72,13 @@ class LockthardClient:
72
72
  return text_val
73
73
  return result
74
74
  except requests.ConnectionError:
75
- raise LockthardError(f"No se pudo conectar con el servidor en {self.base_url}")
75
+ raise LoktarError(f"No se pudo conectar con el servidor en {self.base_url}")
76
76
  except requests.Timeout:
77
- raise LockthardError(f"Tiempo de espera agotado ({self.timeout}s) conectando a {self.base_url}")
77
+ raise LoktarError(f"Tiempo de espera agotado ({self.timeout}s) conectando a {self.base_url}")
78
78
  except requests.HTTPError as e:
79
- raise LockthardError(f"Error HTTP del servidor: {e}")
79
+ raise LoktarError(f"Error HTTP del servidor: {e}")
80
80
  except ValueError:
81
- raise LockthardError("Respuesta de servidor no válida (JSON inválido).")
81
+ raise LoktarError("Respuesta de servidor no válida (JSON inválido).")
82
82
 
83
83
  def ping(self) -> Dict[str, Any]:
84
84
  """Check API connectivity and auth status."""
@@ -86,7 +86,7 @@ class LockthardClient:
86
86
  try:
87
87
  data = self._get("/api/mcp/ping")
88
88
  return {"status": "ok", "authenticated": True, "details": data}
89
- except LockthardError as e:
89
+ except LoktarError as e:
90
90
  if "No autorizado" in str(e):
91
91
  return {"status": "unauthorized", "authenticated": False, "error": str(e)}
92
92
  raise
@@ -119,7 +119,7 @@ class LockthardClient:
119
119
  return {"tools": res if isinstance(res, list) else []}
120
120
 
121
121
  def search_tools(self, query: str, tablet_id: Optional[str] = None, limit: int = 20) -> List[Dict[str, Any]]:
122
- """Search across all tools in LOCKTHARD directory."""
122
+ """Search across all tools in LOKTAR directory."""
123
123
  args: Dict[str, Any] = {"query": query, "limit": limit}
124
124
  if tablet_id:
125
125
  args["tablet_id"] = tablet_id
@@ -158,7 +158,7 @@ class LockthardClient:
158
158
  return {}
159
159
 
160
160
  def get_cli_tools(self) -> List[Dict[str, Any]]:
161
- """Fetch all CLI specific tools from LOCKTHARD."""
161
+ """Fetch all CLI specific tools from LOKTAR."""
162
162
  try:
163
163
  res = self._mcp_call("tools/call", {
164
164
  "name": "get_cli_tools_data",
@@ -6,17 +6,13 @@ from typing import Dict, Any, Optional
6
6
 
7
7
  DEFAULT_API_URL = "https://loktar.cc"
8
8
  CONFIG_DIR_NAME = ".loktar"
9
- FALLBACK_CONFIG_DIR_NAME = ".lockthard"
10
9
  CREDENTIALS_FILE_NAME = "credentials.json"
11
10
 
12
11
 
13
12
  def get_config_dir() -> Path:
14
- """Return the configuration directory path (~/.loktar or fallback ~/.lockthard)."""
13
+ """Return the configuration directory path (~/.loktar)."""
15
14
  home = Path.home()
16
15
  primary = home / CONFIG_DIR_NAME
17
- fallback = home / FALLBACK_CONFIG_DIR_NAME
18
- if not primary.exists() and fallback.exists():
19
- return fallback
20
16
  primary.mkdir(parents=True, exist_ok=True)
21
17
  return primary
22
18
 
@@ -69,14 +65,13 @@ def clear_credentials() -> bool:
69
65
  """Remove the credentials file on logout."""
70
66
  removed = False
71
67
  home = Path.home()
72
- for dname in (CONFIG_DIR_NAME, FALLBACK_CONFIG_DIR_NAME):
73
- path = home / dname / CREDENTIALS_FILE_NAME
74
- if path.exists():
75
- try:
76
- path.unlink()
77
- removed = True
78
- except OSError:
79
- pass
68
+ path = home / CONFIG_DIR_NAME / CREDENTIALS_FILE_NAME
69
+ if path.exists():
70
+ try:
71
+ path.unlink()
72
+ removed = True
73
+ except OSError:
74
+ pass
80
75
  return removed
81
76
 
82
77
 
@@ -84,13 +79,13 @@ def resolve_token(token_flag: Optional[str] = None) -> Optional[str]:
84
79
  """
85
80
  Resolve API key token in precedence order:
86
81
  1. Direct CLI argument / flag (--token)
87
- 2. Environment variable LOKTAR_API_KEY (or LOCKTHARD_API_KEY)
88
- 3. Saved credentials (~/.loktar/credentials.json or ~/.lockthard/credentials.json)
82
+ 2. Environment variable LOKTAR_API_KEY
83
+ 3. Saved credentials (~/.loktar/credentials.json)
89
84
  """
90
85
  if token_flag and token_flag.strip():
91
86
  return token_flag.strip()
92
87
 
93
- env_token = os.environ.get("LOKTAR_API_KEY") or os.environ.get("LOCKTHARD_API_KEY")
88
+ env_token = os.environ.get("LOKTAR_API_KEY")
94
89
  if env_token and env_token.strip():
95
90
  return env_token.strip()
96
91
 
@@ -106,14 +101,14 @@ def resolve_api_url(url_flag: Optional[str] = None) -> str:
106
101
  """
107
102
  Resolve API Base URL in precedence order:
108
103
  1. Direct CLI argument / flag (--url)
109
- 2. Environment variable LOKTAR_API_URL (or LOCKTHARD_API_URL)
104
+ 2. Environment variable LOKTAR_API_URL
110
105
  3. Saved credentials api_url
111
106
  4. Default (https://loktar.cc)
112
107
  """
113
108
  if url_flag and url_flag.strip():
114
109
  return url_flag.strip().rstrip("/")
115
110
 
116
- env_url = os.environ.get("LOKTAR_API_URL") or os.environ.get("LOCKTHARD_API_URL")
111
+ env_url = os.environ.get("LOKTAR_API_URL")
117
112
  if env_url and env_url.strip():
118
113
  return env_url.strip().rstrip("/")
119
114
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "lockthard-cli"
7
- version = "0.2.7"
7
+ version = "0.2.9"
8
8
  description = "CLI and AI agent client for LOKTAR — query 2100+ curated AI tools across 86+ tablets"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -12,7 +12,7 @@ requires-python = ">=3.10"
12
12
  authors = [
13
13
  { name = "Loktar Team", email = "info@loktar.cc" }
14
14
  ]
15
- keywords = ["cli", "ai-tools", "agents", "mcp", "loktar", "lockthard"]
15
+ keywords = ["cli", "ai-tools", "agents", "mcp", "loktar"]
16
16
  classifiers = [
17
17
  "Development Status :: 4 - Beta",
18
18
  "Environment :: Console",
@@ -33,8 +33,7 @@ dependencies = [
33
33
  Homepage = "https://loktar.cc"
34
34
 
35
35
  [project.scripts]
36
- loktar = "lockthard_cli.cli:main"
37
- lockthard = "lockthard_cli.cli:main"
36
+ loktar = "loktar_cli.cli:main"
38
37
 
39
38
  [tool.setuptools.packages.find]
40
39
  where = ["."]
@@ -1,7 +1,7 @@
1
1
  import pytest
2
2
  from click.testing import CliRunner
3
- from lockthard_cli.cli import cli
4
- from lockthard_cli import __version__
3
+ from loktar_cli.cli import cli
4
+ from loktar_cli import __version__
5
5
 
6
6
 
7
7
  def test_cli_version():
@@ -15,4 +15,4 @@ def test_cli_guide():
15
15
  runner = CliRunner()
16
16
  result = runner.invoke(cli, ["guide"])
17
17
  assert result.exit_code == 0
18
- assert "Guía para Agentes de IA" in result.output or "LOCKTHARD CLI" in result.output
18
+ assert "Guía para Agentes de IA" in result.output or "LOKTAR CLI" in result.output
@@ -1,3 +0,0 @@
1
- [console_scripts]
2
- lockthard = lockthard_cli.cli:main
3
- loktar = lockthard_cli.cli:main
@@ -1,3 +0,0 @@
1
- dist
2
- lockthard_cli
3
- tests
File without changes