ngpt 3.12.1__py3-none-any.whl → 3.12.2__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/main.py +53 -14
- ngpt/utils/cli_config.py +16 -3
- {ngpt-3.12.1.dist-info → ngpt-3.12.2.dist-info}/METADATA +28 -26
- {ngpt-3.12.1.dist-info → ngpt-3.12.2.dist-info}/RECORD +7 -7
- {ngpt-3.12.1.dist-info → ngpt-3.12.2.dist-info}/WHEEL +0 -0
- {ngpt-3.12.1.dist-info → ngpt-3.12.2.dist-info}/entry_points.txt +0 -0
- {ngpt-3.12.1.dist-info → ngpt-3.12.2.dist-info}/licenses/LICENSE +0 -0
ngpt/cli/main.py
CHANGED
@@ -37,7 +37,7 @@ def show_cli_config_help():
|
|
37
37
|
print(f" {COLORS['yellow']}ngpt --cli-config get OPTION{COLORS['reset']} - Get the current value of OPTION")
|
38
38
|
print(f" {COLORS['yellow']}ngpt --cli-config get{COLORS['reset']} - Show all CLI configuration settings")
|
39
39
|
print(f" {COLORS['yellow']}ngpt --cli-config unset OPTION{COLORS['reset']} - Remove OPTION from configuration")
|
40
|
-
print(f" {COLORS['yellow']}ngpt --cli-config list{COLORS['reset']} - List all available options")
|
40
|
+
print(f" {COLORS['yellow']}ngpt --cli-config list{COLORS['reset']} - List all available options with types and defaults")
|
41
41
|
|
42
42
|
print(f"\n {COLORS['cyan']}Available options:{COLORS['reset']}")
|
43
43
|
|
@@ -51,8 +51,10 @@ def show_cli_config_help():
|
|
51
51
|
"gitcommsg": [] # Add gitcommsg context
|
52
52
|
}
|
53
53
|
|
54
|
-
|
55
|
-
|
54
|
+
# Get option details from list_cli_config_options instead of CLI_CONFIG_OPTIONS
|
55
|
+
for option_details in list_cli_config_options():
|
56
|
+
option = option_details["name"]
|
57
|
+
for context in option_details["context"]:
|
56
58
|
if context in context_groups:
|
57
59
|
if context == "all":
|
58
60
|
context_groups[context].append(option)
|
@@ -63,25 +65,57 @@ def show_cli_config_help():
|
|
63
65
|
# Print general options (available in all contexts)
|
64
66
|
print(f" {COLORS['yellow']}General options (all modes):{COLORS['reset']}")
|
65
67
|
for option in sorted(context_groups["all"]):
|
66
|
-
|
68
|
+
# Get option details
|
69
|
+
option_detail = next((o for o in list_cli_config_options() if o["name"] == option), None)
|
70
|
+
if option_detail:
|
71
|
+
option_type = option_detail["type"]
|
72
|
+
default = option_detail["default"]
|
73
|
+
default_str = f"(default: {default})" if default is not None else "(default: None)"
|
74
|
+
print(f" {option} - {COLORS['cyan']}Type: {option_type}{COLORS['reset']} {default_str}")
|
75
|
+
else:
|
76
|
+
print(f" {option}")
|
67
77
|
|
68
78
|
# Print code options
|
69
79
|
if context_groups["code"]:
|
70
80
|
print(f"\n {COLORS['yellow']}Code mode options (-c/--code):{COLORS['reset']}")
|
71
81
|
for option in sorted(context_groups["code"]):
|
72
|
-
|
82
|
+
# Get option details
|
83
|
+
option_detail = next((o for o in list_cli_config_options() if o["name"] == option), None)
|
84
|
+
if option_detail:
|
85
|
+
option_type = option_detail["type"]
|
86
|
+
default = option_detail["default"]
|
87
|
+
default_str = f"(default: {default})" if default is not None else "(default: None)"
|
88
|
+
print(f" {option} - {COLORS['cyan']}Type: {option_type}{COLORS['reset']} {default_str}")
|
89
|
+
else:
|
90
|
+
print(f" {option}")
|
73
91
|
|
74
92
|
# Print interactive mode options
|
75
93
|
if context_groups["interactive"]:
|
76
94
|
print(f"\n {COLORS['yellow']}Interactive mode options (-i/--interactive):{COLORS['reset']}")
|
77
95
|
for option in sorted(context_groups["interactive"]):
|
78
|
-
|
96
|
+
# Get option details
|
97
|
+
option_detail = next((o for o in list_cli_config_options() if o["name"] == option), None)
|
98
|
+
if option_detail:
|
99
|
+
option_type = option_detail["type"]
|
100
|
+
default = option_detail["default"]
|
101
|
+
default_str = f"(default: {default})" if default is not None else "(default: None)"
|
102
|
+
print(f" {option} - {COLORS['cyan']}Type: {option_type}{COLORS['reset']} {default_str}")
|
103
|
+
else:
|
104
|
+
print(f" {option}")
|
79
105
|
|
80
106
|
# Print gitcommsg options
|
81
107
|
if context_groups["gitcommsg"]:
|
82
108
|
print(f"\n {COLORS['yellow']}Git commit message options (-g/--gitcommsg):{COLORS['reset']}")
|
83
109
|
for option in sorted(context_groups["gitcommsg"]):
|
84
|
-
|
110
|
+
# Get option details
|
111
|
+
option_detail = next((o for o in list_cli_config_options() if o["name"] == option), None)
|
112
|
+
if option_detail:
|
113
|
+
option_type = option_detail["type"]
|
114
|
+
default = option_detail["default"]
|
115
|
+
default_str = f"(default: {default})" if default is not None else "(default: None)"
|
116
|
+
print(f" {option} - {COLORS['cyan']}Type: {option_type}{COLORS['reset']} {default_str}")
|
117
|
+
else:
|
118
|
+
print(f" {option}")
|
85
119
|
|
86
120
|
print(f"\n {COLORS['cyan']}Example usage:{COLORS['reset']}")
|
87
121
|
print(f" {COLORS['yellow']}ngpt --cli-config set language java{COLORS['reset']} - Set default language to java for code generation")
|
@@ -111,13 +145,18 @@ def handle_cli_config(action, option=None, value=None):
|
|
111
145
|
if action == "list":
|
112
146
|
# List all available options
|
113
147
|
print(f"{COLORS['green']}{COLORS['bold']}Available CLI configuration options:{COLORS['reset']}")
|
114
|
-
for
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
148
|
+
for option_details in list_cli_config_options():
|
149
|
+
option = option_details["name"]
|
150
|
+
option_type = option_details["type"]
|
151
|
+
default = option_details["default"]
|
152
|
+
contexts = option_details["context"]
|
153
|
+
|
154
|
+
default_str = f"(default: {default})" if default is not None else "(default: None)"
|
155
|
+
contexts_str = ', '.join(contexts)
|
156
|
+
if "all" in contexts:
|
157
|
+
contexts_str = "all modes"
|
158
|
+
|
159
|
+
print(f" {COLORS['cyan']}{option}{COLORS['reset']} - {COLORS['yellow']}Type: {option_type}{COLORS['reset']} {default_str} - Available in: {contexts_str}")
|
121
160
|
return
|
122
161
|
|
123
162
|
if action == "get":
|
ngpt/utils/cli_config.py
CHANGED
@@ -288,6 +288,19 @@ def apply_cli_config(args: Any, mode: str) -> Any:
|
|
288
288
|
|
289
289
|
return args
|
290
290
|
|
291
|
-
def list_cli_config_options() -> List[str]:
|
292
|
-
"""List all available CLI configuration options.
|
293
|
-
|
291
|
+
def list_cli_config_options() -> List[Dict[str, Any]]:
|
292
|
+
"""List all available CLI configuration options with their types and default values.
|
293
|
+
|
294
|
+
Returns:
|
295
|
+
List of dictionaries containing option details
|
296
|
+
"""
|
297
|
+
options_list = []
|
298
|
+
for option, details in sorted(CLI_CONFIG_OPTIONS.items()):
|
299
|
+
options_list.append({
|
300
|
+
"name": option,
|
301
|
+
"type": details["type"],
|
302
|
+
"default": details["default"],
|
303
|
+
"context": details["context"],
|
304
|
+
"exclusive": details.get("exclusive", [])
|
305
|
+
})
|
306
|
+
return options_list
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ngpt
|
3
|
-
Version: 3.12.
|
3
|
+
Version: 3.12.2
|
4
4
|
Summary: A Swiss army knife for LLMs: A fast, lightweight CLI and interactive chat tool that brings the power of any OpenAI-compatible LLM (OpenAI, Ollama, Groq, Claude, Gemini, etc.) straight to your terminal. rewrite texts or refine code, craft git commit messages, generate and run OS-aware shell commands.
|
5
5
|
Project-URL: Homepage, https://github.com/nazdridoy/ngpt
|
6
6
|
Project-URL: Repository, https://github.com/nazdridoy/ngpt
|
@@ -455,37 +455,39 @@ CLI Configuration Help:
|
|
455
455
|
ngpt --cli-config get OPTION - Get the current value of OPTION
|
456
456
|
ngpt --cli-config get - Show all CLI configuration settings
|
457
457
|
ngpt --cli-config unset OPTION - Remove OPTION from configuration
|
458
|
-
ngpt --cli-config list - List all available options
|
458
|
+
ngpt --cli-config list - List all available options with types and defaults
|
459
459
|
|
460
460
|
Available options:
|
461
461
|
General options (all modes):
|
462
|
-
config-index - int (default: 0)
|
463
|
-
log - str
|
464
|
-
max_tokens - int
|
465
|
-
no-stream - bool (default: False)
|
466
|
-
preprompt - str
|
467
|
-
prettify - bool (default: False)
|
468
|
-
provider - str
|
469
|
-
renderer - str (default: auto)
|
470
|
-
stream-prettify - bool (default:
|
471
|
-
temperature - float (default: 0.7)
|
472
|
-
top_p - float (default: 1.0)
|
473
|
-
web-search - bool (default: False)
|
474
|
-
|
475
|
-
|
476
|
-
language - str (default: python)
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
462
|
+
config-index - Type: int (default: 0)
|
463
|
+
log - Type: str (default: None)
|
464
|
+
max_tokens - Type: int (default: None)
|
465
|
+
no-stream - Type: bool (default: False)
|
466
|
+
preprompt - Type: str (default: None)
|
467
|
+
prettify - Type: bool (default: False)
|
468
|
+
provider - Type: str (default: None)
|
469
|
+
renderer - Type: str (default: auto)
|
470
|
+
stream-prettify - Type: bool (default: True)
|
471
|
+
temperature - Type: float (default: 0.7)
|
472
|
+
top_p - Type: float (default: 1.0)
|
473
|
+
web-search - Type: bool (default: False)
|
474
|
+
|
475
|
+
Code mode options (-c/--code):
|
476
|
+
language - Type: str (default: python)
|
477
|
+
|
478
|
+
Interactive mode options (-i/--interactive):
|
479
|
+
interactive-multiline - Type: bool (default: False)
|
480
|
+
|
481
|
+
Git commit message options (-g/--gitcommsg):
|
482
|
+
analyses-chunk-size - Type: int (default: 200)
|
483
|
+
chunk-size - Type: int (default: 200)
|
484
|
+
diff - Type: str (default: None)
|
485
|
+
max-msg-lines - Type: int (default: 20)
|
486
|
+
max-recursion-depth - Type: int (default: 3)
|
487
|
+
rec-chunk - Type: bool (default: False)
|
485
488
|
|
486
489
|
Example usage:
|
487
490
|
ngpt --cli-config set language java - Set default language to java for code generation
|
488
|
-
ngpt --cli-config set provider Gemini - Set Gemini as your default provider
|
489
491
|
ngpt --cli-config set temperature 0.9 - Set default temperature to 0.9
|
490
492
|
ngpt --cli-config set no-stream true - Disable streaming by default
|
491
493
|
ngpt --cli-config set recursive-chunk true - Enable recursive chunking for git commit messages
|
@@ -5,7 +5,7 @@ ngpt/cli/__init__.py,sha256=hebbDSMGiOd43YNnQP67uzr67Ue6rZPwm2czynr5iZY,43
|
|
5
5
|
ngpt/cli/args.py,sha256=LYz4MhJUg_4G0qps1QR22vp1_3riMbz6TdA85jL9aKQ,15400
|
6
6
|
ngpt/cli/config_manager.py,sha256=NQQcWnjUppAAd0s0p9YAf8EyKS1ex5-0EB4DvKdB4dk,3662
|
7
7
|
ngpt/cli/formatters.py,sha256=HBYGlx_7eoAKyzfy0Vq5L0yn8yVKjngqYBukMmXCcz0,9401
|
8
|
-
ngpt/cli/main.py,sha256=
|
8
|
+
ngpt/cli/main.py,sha256=hMcxW3-pxfmdPj3Qmcr3Hi2Se0fATpP0egaSfFih1Vw,31161
|
9
9
|
ngpt/cli/renderers.py,sha256=vAoDkpvgG2Fl81zkJDk_-zM1Fsw8E4Uv6m1AI81Fawo,17049
|
10
10
|
ngpt/cli/roles.py,sha256=jtARS_XgZ1_UW8eAdLLMe7trpYhDnzEyCH9PYAiH-Og,9675
|
11
11
|
ngpt/cli/ui.py,sha256=8-WyPMwgQiqLXWO0mGfBhKTRnIDDtPUtm_XCvOnqBJA,11334
|
@@ -18,13 +18,13 @@ ngpt/cli/modes/rewrite.py,sha256=RaN4NOItKrGy5ilRrTa2amK4zmNo59j6K7plUf5SJPM,202
|
|
18
18
|
ngpt/cli/modes/shell.py,sha256=it1Brq1-LGeNfPKYBeVAwF-a78g9UP-KscofBZQkbr4,41589
|
19
19
|
ngpt/cli/modes/text.py,sha256=NOikaU9YVCBgyaCl6pwy9EVt-YY5Q4jBx0l47izpVTA,6986
|
20
20
|
ngpt/utils/__init__.py,sha256=_92f8eGMMOtQQA3uwgSRVwUEl1EIRFjWPUjcfGgI-eI,1244
|
21
|
-
ngpt/utils/cli_config.py,sha256=
|
21
|
+
ngpt/utils/cli_config.py,sha256=669EpFX87uZdjZuxEZ1KXrPEpds9czcLI00OaGSZKyQ,11926
|
22
22
|
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.12.
|
27
|
-
ngpt-3.12.
|
28
|
-
ngpt-3.12.
|
29
|
-
ngpt-3.12.
|
30
|
-
ngpt-3.12.
|
26
|
+
ngpt-3.12.2.dist-info/METADATA,sha256=oX-MMj4L-SftqRvWxvDIA5P4Jod0cYH-2p-jw9fFU6I,31990
|
27
|
+
ngpt-3.12.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
28
|
+
ngpt-3.12.2.dist-info/entry_points.txt,sha256=SqAAvLhMrsEpkIr4YFRdUeyuXQ9o0IBCeYgE6AVojoI,44
|
29
|
+
ngpt-3.12.2.dist-info/licenses/LICENSE,sha256=mQkpWoADxbHqE0HRefYLJdm7OpdrXBr3vNv5bZ8w72M,1065
|
30
|
+
ngpt-3.12.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|