ngpt 3.9.0__py3-none-any.whl → 3.9.1__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.
ngpt/cli/roles.py CHANGED
@@ -10,11 +10,20 @@ ROLE_DIR_NAME = "ngpt_roles"
10
10
 
11
11
  def get_role_directory():
12
12
  """Get the path to the role directory, creating it if it doesn't exist."""
13
- # Use XDG Base Directory specification if possible
14
- if os.environ.get("XDG_CONFIG_HOME"):
15
- config_dir = Path(os.environ["XDG_CONFIG_HOME"]) / "ngpt"
13
+ # Use OS-specific paths
14
+ if sys.platform == "win32":
15
+ # Windows
16
+ config_dir = Path(os.environ.get("APPDATA", "")) / "ngpt"
17
+ elif sys.platform == "darwin":
18
+ # macOS
19
+ config_dir = Path.home() / "Library" / "Application Support" / "ngpt"
16
20
  else:
17
- config_dir = Path.home() / ".config" / "ngpt"
21
+ # Linux and other Unix-like systems
22
+ xdg_config_home = os.environ.get("XDG_CONFIG_HOME")
23
+ if xdg_config_home:
24
+ config_dir = Path(xdg_config_home) / "ngpt"
25
+ else:
26
+ config_dir = Path.home() / ".config" / "ngpt"
18
27
 
19
28
  # Create role directory if it doesn't exist
20
29
  role_dir = config_dir / ROLE_DIR_NAME
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngpt
3
- Version: 3.9.0
3
+ Version: 3.9.1
4
4
  Summary: Swiss army knife for LLMs: powerful CLI and interactive chatbot in one package. Seamlessly work with OpenAI, Ollama, Groq, Claude, Gemini, or any OpenAI-compatible API to generate code, craft git commits, rewrite text, and execute shell commands.
5
5
  Project-URL: Homepage, https://github.com/nazdridoy/ngpt
6
6
  Project-URL: Repository, https://github.com/nazdridoy/ngpt
@@ -171,6 +171,11 @@ ngpt --role-config create json_generator
171
171
  # Use a custom role for specific tasks
172
172
  ngpt --role json_generator "Generate user data with name, email, and address"
173
173
 
174
+ # Use a role from the Role Gallery (first create it, then use it)
175
+ ngpt --role-config create sql_expert
176
+ # Paste the SQL Expert role from https://nazdridoy.github.io/ngpt/examples/role-gallery/
177
+ ngpt --role sql_expert "Write a query to find all users who made a purchase in the last 30 days"
178
+
174
179
  # Rewrite text to improve quality while preserving tone and meaning
175
180
  echo "your text" | ngpt -r
176
181
 
@@ -363,6 +368,8 @@ Key documentation sections:
363
368
  - [Installation Guide](https://nazdridoy.github.io/ngpt/installation/)
364
369
  - [CLI Usage Guide](https://nazdridoy.github.io/ngpt/usage/cli_usage/)
365
370
  - [Configuration Guide](https://nazdridoy.github.io/ngpt/configuration/)
371
+ - [Custom Roles Guide](https://nazdridoy.github.io/ngpt/usage/roles/)
372
+ - [Role Gallery](https://nazdridoy.github.io/ngpt/examples/role-gallery/)
366
373
  - [Examples & Tutorials](https://nazdridoy.github.io/ngpt/examples/basic/)
367
374
  - [Git Commit Message Guide](https://nazdridoy.github.io/ngpt/usage/gitcommsg/)
368
375
 
@@ -643,7 +650,7 @@ ngpt --role json_generator "Generate random user profile data"
643
650
  }
644
651
  ```
645
652
 
646
- Custom roles let you define specialized AI personas that you can reuse across different prompts, making it easy to get consistent responses for specific tasks.
653
+ Custom roles allow you to create reusable AI personas for consistent responses across various prompts. For more details, see the [Custom Roles Guide](https://nazdridoy.github.io/ngpt/usage/roles/) and check out the [Role Gallery](https://nazdridoy.github.io/ngpt/examples/role-gallery/) for ready-to-use roles.
647
654
 
648
655
  #### Web Search Integration
649
656
 
@@ -7,7 +7,7 @@ ngpt/cli/config_manager.py,sha256=NQQcWnjUppAAd0s0p9YAf8EyKS1ex5-0EB4DvKdB4dk,36
7
7
  ngpt/cli/formatters.py,sha256=HBYGlx_7eoAKyzfy0Vq5L0yn8yVKjngqYBukMmXCcz0,9401
8
8
  ngpt/cli/main.py,sha256=36mi8uYDcl56IhTkt-TJTRRhwHeF157xMAYgufLRAMo,29256
9
9
  ngpt/cli/renderers.py,sha256=vAoDkpvgG2Fl81zkJDk_-zM1Fsw8E4Uv6m1AI81Fawo,17049
10
- ngpt/cli/roles.py,sha256=YDBlmMtgw1gooeHVBiEUHwKn1V3E9dJKO8cpKoXu8uo,9359
10
+ ngpt/cli/roles.py,sha256=jtARS_XgZ1_UW8eAdLLMe7trpYhDnzEyCH9PYAiH-Og,9675
11
11
  ngpt/cli/ui.py,sha256=8-WyPMwgQiqLXWO0mGfBhKTRnIDDtPUtm_XCvOnqBJA,11334
12
12
  ngpt/cli/modes/__init__.py,sha256=KP7VR6Xw9k1p5Jcu0F38RDxSFvFIzH3j1ThDLNwznUI,363
13
13
  ngpt/cli/modes/chat.py,sha256=x1leClKq7UupA_CdW4tym0AivY2o_II123-I5IcAkxQ,7091
@@ -23,8 +23,8 @@ ngpt/utils/config.py,sha256=wsArA4osnh8fKqOvtsPqqBxAz3DpdjtaWUFaRtnUdyc,10452
23
23
  ngpt/utils/log.py,sha256=f1jg2iFo35PAmsarH8FVL_62plq4VXH0Mu2QiP6RJGw,15934
24
24
  ngpt/utils/pipe.py,sha256=qRHF-Ma7bbU0cOcb1Yhe4S-kBavivtnnvLA3EYS4FY4,2162
25
25
  ngpt/utils/web_search.py,sha256=w5ke4KJMRxq7r5jtbUXvspja6XhjoPZloVkZ0IvBXIE,30731
26
- ngpt-3.9.0.dist-info/METADATA,sha256=wf1tVRaKH7xODB9yrI1eO4STYMskdwq-VhYl0edL5N0,30309
27
- ngpt-3.9.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
28
- ngpt-3.9.0.dist-info/entry_points.txt,sha256=SqAAvLhMrsEpkIr4YFRdUeyuXQ9o0IBCeYgE6AVojoI,44
29
- ngpt-3.9.0.dist-info/licenses/LICENSE,sha256=mQkpWoADxbHqE0HRefYLJdm7OpdrXBr3vNv5bZ8w72M,1065
30
- ngpt-3.9.0.dist-info/RECORD,,
26
+ ngpt-3.9.1.dist-info/METADATA,sha256=g5ESNkkas9Iz9Yr3uylXhUMPcl9pLATkYaC2_qZJ8Sg,30894
27
+ ngpt-3.9.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
28
+ ngpt-3.9.1.dist-info/entry_points.txt,sha256=SqAAvLhMrsEpkIr4YFRdUeyuXQ9o0IBCeYgE6AVojoI,44
29
+ ngpt-3.9.1.dist-info/licenses/LICENSE,sha256=mQkpWoADxbHqE0HRefYLJdm7OpdrXBr3vNv5bZ8w72M,1065
30
+ ngpt-3.9.1.dist-info/RECORD,,
File without changes