Skip to content

Commit d4f920c

Browse files
authored
Merge pull request #29 from AnswerDotAI/version
feat: add version flag to CLI. Resolves #28
2 parents 7de3c48 + c1ec717 commit d4f920c

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

nbs/00_core.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,7 @@
869869
"@call_parse\n",
870870
"def main(\n",
871871
" query: Param('The query to send to the LLM', str, nargs='+'),\n",
872+
" v: Param(\"Print version\", action='version') = '%(prog)s ' + __version__,\n",
872873
" pid: str = 'current', # `current`, `all` or tmux pane_id (e.g. %0) for context\n",
873874
" skip_system: bool = False, # Whether to skip system information in the AI's context\n",
874875
" history_lines: int = None, # Number of history lines. Defaults to tmux scrollback history length\n",

settings.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ keywords = nbdev jupyter notebook python
2626
language = English
2727
status = 3
2828
user = AnswerDotAI
29-
requirements = claudette cosette fastcore>=1.7.28 msglm rich
29+
requirements = claudette cosette fastcore>=1.7.29 msglm rich
3030
console_scripts = ssage=shell_sage.core:main
3131
readme_nb = index.ipynb
3232
allowed_metadata_keys =

shell_sage/core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ def get_res(sage, q, provider, is_command=False):
202202
@call_parse
203203
def main(
204204
query: Param('The query to send to the LLM', str, nargs='+'),
205+
v: Param("Print version", action='version') = '%(prog)s ' + __version__,
205206
pid: str = 'current', # `current`, `all` or tmux pane_id (e.g. %0) for context
206207
skip_system: bool = False, # Whether to skip system information in the AI's context
207208
history_lines: int = None, # Number of history lines. Defaults to tmux scrollback history length

0 commit comments

Comments
 (0)