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.
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/PKG-INFO +1 -1
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/lockthard_cli/__init__.py +1 -1
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/lockthard_cli/cli.py +35 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/lockthard_cli.egg-info/PKG-INFO +1 -1
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/pyproject.toml +1 -1
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/README.md +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/lockthard_cli/auth.py +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/lockthard_cli/client.py +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/lockthard_cli/config.py +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/lockthard_cli/formatters.py +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/lockthard_cli.egg-info/SOURCES.txt +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/lockthard_cli.egg-info/dependency_links.txt +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/lockthard_cli.egg-info/entry_points.txt +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/lockthard_cli.egg-info/requires.txt +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/lockthard_cli.egg-info/top_level.txt +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/setup.cfg +0 -0
- {lockthard_cli-0.2.0 → lockthard_cli-0.2.1}/tests/test_cli.py +0 -0
|
@@ -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
|
|
|
@@ -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.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
|
|
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
|