lockthard-cli 0.2.0__tar.gz → 0.2.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lockthard-cli
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: CLI and AI agent client for LOCKTHARD — query 2100+ curated AI tools across 86+ tablets
5
5
  Author-email: Lockthard Team <info@lockthard.es>
6
6
  License: MIT
@@ -2,4 +2,4 @@
2
2
  LOCKTHARD CLI - Command Line Interface and Agent Client for LOCKTHARD.
3
3
  """
4
4
 
5
- __version__ = "0.2.0"
5
+ __version__ = "0.2.1"
@@ -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,36 @@ 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
+ import importlib.resources
217
+ try:
218
+ # Try to read SKILL.md bundled with the package
219
+ pkg_dir = Path(__file__).parent.parent
220
+ skill_path = pkg_dir / "SKILL.md"
221
+ if not skill_path.exists():
222
+ # Fallback: try importlib.resources
223
+ try:
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")
230
+
231
+ if ctx.obj.get("as_json"):
232
+ print(json.dumps({"skill": content}, ensure_ascii=False))
233
+ else:
234
+ if HAS_RICH and console:
235
+ console.print(Markdown(content))
236
+ else:
237
+ print(content)
238
+ except Exception as e:
239
+ _handle_error(LockthardError(f"No se pudo leer SKILL.md: {e}"))
240
+
241
+
207
242
  def main():
208
243
  cli(obj={})
209
244
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lockthard-cli
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: CLI and AI agent client for LOCKTHARD — query 2100+ curated AI tools across 86+ tablets
5
5
  Author-email: Lockthard Team <info@lockthard.es>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "lockthard-cli"
7
- version = "0.2.0"
7
+ version = "0.2.1"
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