ngpt 2.11.1__tar.gz → 2.11.2__tar.gz

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.
Files changed (53) hide show
  1. {ngpt-2.11.1 → ngpt-2.11.2}/PKG-INFO +1 -1
  2. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/utils/cli_config.py +20 -10
  3. {ngpt-2.11.1 → ngpt-2.11.2}/pyproject.toml +1 -1
  4. {ngpt-2.11.1 → ngpt-2.11.2}/uv.lock +1 -1
  5. {ngpt-2.11.1 → ngpt-2.11.2}/.github/workflows/python-publish.yml +0 -0
  6. {ngpt-2.11.1 → ngpt-2.11.2}/.gitignore +0 -0
  7. {ngpt-2.11.1 → ngpt-2.11.2}/.python-version +0 -0
  8. {ngpt-2.11.1 → ngpt-2.11.2}/COMMIT_GUIDELINES.md +0 -0
  9. {ngpt-2.11.1 → ngpt-2.11.2}/CONTRIBUTING.md +0 -0
  10. {ngpt-2.11.1 → ngpt-2.11.2}/LICENSE +0 -0
  11. {ngpt-2.11.1 → ngpt-2.11.2}/README.md +0 -0
  12. {ngpt-2.11.1 → ngpt-2.11.2}/docs/CONTRIBUTING.md +0 -0
  13. {ngpt-2.11.1 → ngpt-2.11.2}/docs/LICENSE.md +0 -0
  14. {ngpt-2.11.1 → ngpt-2.11.2}/docs/README.md +0 -0
  15. {ngpt-2.11.1 → ngpt-2.11.2}/docs/_config.yml +0 -0
  16. {ngpt-2.11.1 → ngpt-2.11.2}/docs/api/README.md +0 -0
  17. {ngpt-2.11.1 → ngpt-2.11.2}/docs/api/cli.md +0 -0
  18. {ngpt-2.11.1 → ngpt-2.11.2}/docs/api/cli_config.md +0 -0
  19. {ngpt-2.11.1 → ngpt-2.11.2}/docs/api/client.md +0 -0
  20. {ngpt-2.11.1 → ngpt-2.11.2}/docs/api/config.md +0 -0
  21. {ngpt-2.11.1 → ngpt-2.11.2}/docs/assets/css/style.scss +0 -0
  22. {ngpt-2.11.1 → ngpt-2.11.2}/docs/configuration.md +0 -0
  23. {ngpt-2.11.1 → ngpt-2.11.2}/docs/examples/README.md +0 -0
  24. {ngpt-2.11.1 → ngpt-2.11.2}/docs/examples/advanced.md +0 -0
  25. {ngpt-2.11.1 → ngpt-2.11.2}/docs/examples/basic.md +0 -0
  26. {ngpt-2.11.1 → ngpt-2.11.2}/docs/examples/cli_components.md +0 -0
  27. {ngpt-2.11.1 → ngpt-2.11.2}/docs/examples/integrations.md +0 -0
  28. {ngpt-2.11.1 → ngpt-2.11.2}/docs/installation.md +0 -0
  29. {ngpt-2.11.1 → ngpt-2.11.2}/docs/overview.md +0 -0
  30. {ngpt-2.11.1 → ngpt-2.11.2}/docs/usage/README.md +0 -0
  31. {ngpt-2.11.1 → ngpt-2.11.2}/docs/usage/cli_config.md +0 -0
  32. {ngpt-2.11.1 → ngpt-2.11.2}/docs/usage/cli_framework.md +0 -0
  33. {ngpt-2.11.1 → ngpt-2.11.2}/docs/usage/cli_usage.md +0 -0
  34. {ngpt-2.11.1 → ngpt-2.11.2}/docs/usage/library_usage.md +0 -0
  35. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/__init__.py +0 -0
  36. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/cli/__init__.py +0 -0
  37. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/cli/args.py +0 -0
  38. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/cli/config_manager.py +0 -0
  39. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/cli/formatters.py +0 -0
  40. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/cli/interactive.py +0 -0
  41. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/cli/main.py +0 -0
  42. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/cli/modes/__init__.py +0 -0
  43. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/cli/modes/chat.py +0 -0
  44. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/cli/modes/code.py +0 -0
  45. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/cli/modes/shell.py +0 -0
  46. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/cli/modes/text.py +0 -0
  47. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/cli/renderers.py +0 -0
  48. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/cli/ui.py +0 -0
  49. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/cli.py +0 -0
  50. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/client.py +0 -0
  51. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/utils/__init__.py +0 -0
  52. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/utils/config.py +0 -0
  53. {ngpt-2.11.1 → ngpt-2.11.2}/ngpt/utils/log.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngpt
3
- Version: 2.11.1
3
+ Version: 2.11.2
4
4
  Summary: A lightweight Python CLI and library for interacting with OpenAI-compatible APIs, supporting both official and self-hosted LLM endpoints.
5
5
  Project-URL: Homepage, https://github.com/nazdridoy/ngpt
6
6
  Project-URL: Repository, https://github.com/nazdridoy/ngpt
@@ -212,7 +212,13 @@ def apply_cli_config(args: Any, mode: str) -> Any:
212
212
  # Keep track of applied exclusive options
213
213
  applied_exclusives = set()
214
214
 
215
- # For each option in CLI config, check if it should be applied
215
+ # First pass: Check explicitly set args and track their exclusive options
216
+ for option in CLI_CONFIG_OPTIONS:
217
+ cli_option = f"--{option}"
218
+ if cli_option in explicit_args and "exclusive" in CLI_CONFIG_OPTIONS[option]:
219
+ applied_exclusives.update(CLI_CONFIG_OPTIONS[option]["exclusive"])
220
+
221
+ # Second pass: Apply CLI config options
216
222
  for option, value in cli_config.items():
217
223
  # Skip if not a valid option
218
224
  if option not in CLI_CONFIG_OPTIONS:
@@ -227,12 +233,8 @@ def apply_cli_config(args: Any, mode: str) -> Any:
227
233
  arg_name = option.replace("-", "_")
228
234
 
229
235
  # Skip if explicitly set via command line
230
- # Check common variants like --option
231
236
  cli_option = f"--{option}"
232
237
  if cli_option in explicit_args:
233
- # Add to applied_exclusives if this option has exclusivity constraints
234
- if "exclusive" in CLI_CONFIG_OPTIONS[option]:
235
- applied_exclusives.update(CLI_CONFIG_OPTIONS[option]["exclusive"])
236
238
  continue
237
239
 
238
240
  # Skip if an exclusive option has already been applied
@@ -240,7 +242,6 @@ def apply_cli_config(args: Any, mode: str) -> Any:
240
242
  continue
241
243
 
242
244
  # Check exclusivity constraints against *explicitly set* args
243
- # Don't apply a CLI config option if an exclusive option was explicitly set
244
245
  if "exclusive" in CLI_CONFIG_OPTIONS[option]:
245
246
  skip = False
246
247
  for excl_option in CLI_CONFIG_OPTIONS[option]["exclusive"]:
@@ -250,14 +251,23 @@ def apply_cli_config(args: Any, mode: str) -> Any:
250
251
  break # Skip applying this CLI config value
251
252
  if skip:
252
253
  continue
253
-
254
- # If we're applying this option, add its exclusives to the tracking set
255
- applied_exclusives.update(CLI_CONFIG_OPTIONS[option]["exclusive"])
256
-
254
+
257
255
  # Apply the value from CLI config
258
256
  # Ensure the attribute exists on args before setting
259
257
  if hasattr(args, arg_name):
260
258
  setattr(args, arg_name, value)
259
+
260
+ # For boolean options that are True, explicitly disable their exclusive options
261
+ option_type = CLI_CONFIG_OPTIONS[option]["type"]
262
+ if option_type == "bool" and value is True and "exclusive" in CLI_CONFIG_OPTIONS[option]:
263
+ for excl_option in CLI_CONFIG_OPTIONS[option]["exclusive"]:
264
+ # Convert to argparse naming and set to False if the attribute exists
265
+ excl_arg_name = excl_option.replace("-", "_")
266
+ if hasattr(args, excl_arg_name):
267
+ setattr(args, excl_arg_name, False)
268
+
269
+ # Add exclusives to tracking set to prevent them from being applied
270
+ applied_exclusives.update(CLI_CONFIG_OPTIONS[option]["exclusive"])
261
271
 
262
272
  return args
263
273
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ngpt"
3
- version = "2.11.1"
3
+ version = "2.11.2"
4
4
  description = "A lightweight Python CLI and library for interacting with OpenAI-compatible APIs, supporting both official and self-hosted LLM endpoints."
5
5
  authors = [
6
6
  {name = "nazDridoy", email = "nazdridoy399@gmail.com"},
@@ -134,7 +134,7 @@ wheels = [
134
134
 
135
135
  [[package]]
136
136
  name = "ngpt"
137
- version = "2.11.1"
137
+ version = "2.11.2"
138
138
  source = { editable = "." }
139
139
  dependencies = [
140
140
  { name = "prompt-toolkit" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes