terminal-sherpa 0.2.0__py3-none-any.whl → 0.3.0__py3-none-any.whl

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.
ask/config.py CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import os
4
4
  from pathlib import Path
5
- from typing import Any
5
+ from typing import Any, Optional
6
6
 
7
7
  import toml
8
8
 
@@ -16,7 +16,7 @@ SYSTEM_PROMPT = (
16
16
  )
17
17
 
18
18
 
19
- def get_config_path() -> Path | None:
19
+ def get_config_path() -> Optional[Path]:
20
20
  """Find config file using XDG standard."""
21
21
  # Primary location: $XDG_CONFIG_HOME/ask/config.toml
22
22
  xdg_config_home = os.environ.get("XDG_CONFIG_HOME")
@@ -77,13 +77,13 @@ def get_provider_config(
77
77
  return provider_name, merged_config
78
78
 
79
79
 
80
- def get_default_model(config: dict[str, Any]) -> str | None:
80
+ def get_default_model(config: dict[str, Any]) -> Optional[str]:
81
81
  """Get default model from configuration."""
82
82
  global_config = config.get("ask", {})
83
83
  return global_config.get("default_model")
84
84
 
85
85
 
86
- def get_default_provider() -> str | None:
86
+ def get_default_provider() -> Optional[str]:
87
87
  """Determine fallback provider from environment variables."""
88
88
  # Check for API keys in order of preference: claude -> openai
89
89
  if os.environ.get("ANTHROPIC_API_KEY"):
@@ -1,7 +1,7 @@
1
1
  """Anthropic provider implementation."""
2
2
 
3
3
  import os
4
- from typing import Any
4
+ from typing import Any, Optional
5
5
 
6
6
  import anthropic
7
7
 
@@ -16,7 +16,7 @@ class AnthropicProvider(ProviderInterface):
16
16
  def __init__(self, config: dict[str, Any]):
17
17
  """Initialize Anthropic provider with configuration."""
18
18
  super().__init__(config)
19
- self.client: anthropic.Anthropic | None = None
19
+ self.client: Optional[anthropic.Anthropic] = None
20
20
 
21
21
  def get_bash_command(self, prompt: str) -> str:
22
22
  """Generate bash command from natural language prompt."""
ask/providers/gemini.py CHANGED
@@ -1,7 +1,7 @@
1
1
  """Anthropic provider implementation."""
2
2
 
3
3
  import os
4
- from typing import Any
4
+ from typing import Any, Optional
5
5
 
6
6
  from google import genai
7
7
  from google.genai.types import GenerateContentConfig, GenerateContentResponse
@@ -17,7 +17,7 @@ class GeminiProvider(ProviderInterface):
17
17
  def __init__(self, config: dict[str, Any]):
18
18
  """Initialize Gemini provider with configuration."""
19
19
  super().__init__(config)
20
- self.client: genai.Client | None = None
20
+ self.client: Optional[genai.Client] = None
21
21
 
22
22
  def _parse_response(self, response: GenerateContentResponse) -> str:
23
23
  """Parse response from Gemini API."""
ask/providers/openai.py CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import os
4
4
  import re
5
- from typing import Any, NoReturn
5
+ from typing import Any, NoReturn, Optional
6
6
 
7
7
  import openai
8
8
 
@@ -21,7 +21,7 @@ class OpenAIProvider(ProviderInterface):
21
21
  config: The configuration for the OpenAI provider
22
22
  """
23
23
  super().__init__(config)
24
- self.client: openai.OpenAI | None = None
24
+ self.client: Optional[openai.OpenAI] = None
25
25
 
26
26
  def get_bash_command(self, prompt: str) -> str:
27
27
  """Generate bash command from natural language prompt.
@@ -1,23 +1,32 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: terminal-sherpa
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: AI-powered bash command generator
5
- Requires-Python: >=3.13
5
+ Project-URL: Homepage, https://github.com/lcford2/terminal-sherpa
6
+ Project-URL: Issues, https://github.com/lcford2/terminal-sherpa/issues
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Environment :: Console
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3 :: Only
20
+ Classifier: Topic :: Utilities
21
+ Classifier: Topic :: Software Development :: Libraries
22
+ Requires-Python: >=3.9
6
23
  Description-Content-Type: text/markdown
7
24
  License-File: LICENSE
8
25
  Requires-Dist: anthropic>=0.7.0
9
- Requires-Dist: black>=25.1.0
10
- Requires-Dist: cosmic-ray>=8.3.4
11
26
  Requires-Dist: google-genai>=1.26.0
12
27
  Requires-Dist: loguru>=0.7.0
13
- Requires-Dist: mutatest>=3.1.0
14
28
  Requires-Dist: openai>=1.0.0
15
- Requires-Dist: pytest>=8.0.0
16
- Requires-Dist: pytest-cov>=4.0.0
17
- Requires-Dist: pytest-mock>=3.12.0
18
- Requires-Dist: ruff>=0.12.3
19
29
  Requires-Dist: setuptools>=80.9.0
20
- Requires-Dist: taskipy>=1.14.1
21
30
  Requires-Dist: toml>=0.10.0
22
31
  Dynamic: license-file
23
32
 
@@ -28,6 +37,10 @@ A lightweight AI chat interface for fellow terminal dwellers.
28
37
  Turn natural language into bash commands instantly.
29
38
  Stop googling syntax and start asking.
30
39
 
40
+ [![PyPI - Version](https://img.shields.io/pypi/v/terminal-sherpa)](https://pypi.python.org/pypi/terminal-sherpa)
41
+ [![GitHub License](https://img.shields.io/github/license/lcford2/terminal-sherpa)](https://github.com/lcford2/terminal-sherpa/blob/main/LICENSE)
42
+ [![Python Versions](https://img.shields.io/pypi/pyversions/terminal-sherpa)](https://pypi.python.org/pypi/terminal-sherpa)
43
+ [![Actions status](https://github.com/lcford2/terminal-sherpa/actions/workflows/main.yml/badge.svg)](https://github.com/lcford2/terminal-sherpa/actions)
31
44
  [![codecov](https://codecov.io/github/lcford2/terminal-sherpa/graph/badge.svg?token=2MXHNL3RHE)](https://codecov.io/github/lcford2/terminal-sherpa)
32
45
 
33
46
  ## 🚀 Getting Started
@@ -63,7 +76,7 @@ find . -name "*.py" -mtime -7
63
76
 
64
77
  ### Requirements
65
78
 
66
- - Python 3.13+
79
+ - Python 3.9+
67
80
  - API key for Anthropic or OpenAI
68
81
 
69
82
  ### Install Methods
@@ -1,13 +1,13 @@
1
1
  ask/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- ask/config.py,sha256=iHIiMKePia80Sno_XlARqa7pEyW3eZm_Bf5SlUMidiQ,2880
2
+ ask/config.py,sha256=12YKck6Q9vaSESfuI7kKFbs1hkxzts2FOsxR9eK96MY,2899
3
3
  ask/exceptions.py,sha256=0RLMSbw6j49BEhJN7C8MYaKpuhVeitsBhTGjZmaiHis,434
4
4
  ask/main.py,sha256=9mVXwncU2P4OQxE7Oxcqi376A06xluC76kiIoCCqNSc,3936
5
5
  ask/providers/__init__.py,sha256=Y0NswA6O8PpE_PDWa-GZ1FNmSXrwReZ9-roUoTOksXU,1184
6
- ask/providers/anthropic.py,sha256=3bB335ZxRu4a_j7U0tox_6sQxTf4X287GhU2-gr5ctU,2725
6
+ ask/providers/anthropic.py,sha256=M6bcOxDbbWQrJ6kWWtYqsVk6NsZOqX7PzxyiI_yji1Q,2738
7
7
  ask/providers/base.py,sha256=91ZbVORYWckSHNwNPiTmgfqQN0FLO9AgV6mptuAkIU0,769
8
- ask/providers/gemini.py,sha256=c1uQg6ShNkw2AkwDJhjfki7hTBl4vOkT9v1O4ewRfbg,3408
9
- ask/providers/openai.py,sha256=9PS1AgMr6Nb-OcYYiNYNrG384wNUS8m2lVT04K3hFV8,3683
10
- terminal_sherpa-0.2.0.dist-info/licenses/LICENSE,sha256=xLe81eIrf0X6CnEDDJXmoXuDzkdMYM3Eq1BgHUpG1JQ,1067
8
+ ask/providers/gemini.py,sha256=taFZYEygiEf05XCm4AKSKL2F_BQwLrU4Y5Ac-WN5owk,3421
9
+ ask/providers/openai.py,sha256=jVyRH4FRdF_91iuK5Tga4as9zbyGKPPFW90ewGG5s5k,3696
10
+ terminal_sherpa-0.3.0.dist-info/licenses/LICENSE,sha256=xLe81eIrf0X6CnEDDJXmoXuDzkdMYM3Eq1BgHUpG1JQ,1067
11
11
  test/conftest.py,sha256=pjDI0SbIhHxDqJW-BdL7s6lTqM2f8hItxWY8EjC-dL8,1548
12
12
  test/test_anthropic.py,sha256=S5OQ67qIZ4VO38eJwAAwJa4JBylJhKCtmcGjCWA8WLY,5687
13
13
  test/test_config.py,sha256=FrJ6bsZ6mK46e-8fQfkFGx9GgwHrNfnoI8211R0V9K8,5565
@@ -16,8 +16,8 @@ test/test_gemini.py,sha256=sV8FkaU5rLfuu3lGeQdxsa-ZmNnLUYpODaKhayrasSo,8000
16
16
  test/test_main.py,sha256=3gZ83nVHMSEmgHSF2UJoELfK028a4vgxLpIk2P1cH1Y,7745
17
17
  test/test_openai.py,sha256=KAGQWFrXeu4P9umij7XDoxnKQ2cApv6ImuL8EiG_5W8,8388
18
18
  test/test_providers.py,sha256=SejQvCZSEQ5RAfVTCtPZ-39fXnfV17n4gaSxjiHA5UM,2140
19
- terminal_sherpa-0.2.0.dist-info/METADATA,sha256=V3EAri2cVmsjv3zxWnJxhpEK_2kXnBLxWa5QsNUALc4,6392
20
- terminal_sherpa-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
- terminal_sherpa-0.2.0.dist-info/entry_points.txt,sha256=LxG9-J__nMGmeEIi47WVGYC1LLJo1GaADH21hfxEK70,38
22
- terminal_sherpa-0.2.0.dist-info/top_level.txt,sha256=Y7k5b2NSCkKiA_XPU-4fT_GYangD6JVDug5xwfXvmuQ,9
23
- terminal_sherpa-0.2.0.dist-info/RECORD,,
19
+ terminal_sherpa-0.3.0.dist-info/METADATA,sha256=r0ARy4RTO3vnlxn6tizVE-aEDLj79MyXLTl5ZxLp0Yk,7521
20
+ terminal_sherpa-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
+ terminal_sherpa-0.3.0.dist-info/entry_points.txt,sha256=LxG9-J__nMGmeEIi47WVGYC1LLJo1GaADH21hfxEK70,38
22
+ terminal_sherpa-0.3.0.dist-info/top_level.txt,sha256=Y7k5b2NSCkKiA_XPU-4fT_GYangD6JVDug5xwfXvmuQ,9
23
+ terminal_sherpa-0.3.0.dist-info/RECORD,,