Skip to content

Commit 54cee88

Browse files
committed
reinstate keep --version flag
1 parent a6d796f commit 54cee88

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

keep/thin_cli.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,16 @@ def _is_full() -> bool:
334334
return _global_full
335335

336336

337+
def _version_callback(value: bool | None):
338+
if value:
339+
from importlib.metadata import version
340+
try:
341+
typer.echo(version("keep-skill"))
342+
except Exception:
343+
typer.echo("unknown")
344+
raise typer.Exit()
345+
346+
337347
@app.callback(invoke_without_command=True)
338348
def default(
339349
ctx: typer.Context,
@@ -345,6 +355,10 @@ def default(
345355
full_output: Annotated[bool, typer.Option(
346356
"--full", "-F", help="Output full notes with context"
347357
)] = False,
358+
version: Annotated[Optional[bool], typer.Option(
359+
"--version", help="Show version and exit",
360+
callback=_version_callback, is_eager=True,
361+
)] = None,
348362
):
349363
"""keep — reflective memory for AI agents."""
350364
global _global_json, _global_ids, _global_full, _global_store

0 commit comments

Comments
 (0)