File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 )
338348def 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
You can’t perform that action at this time.
0 commit comments