ngpt 3.12.0__tar.gz → 3.12.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 (67) hide show
  1. {ngpt-3.12.0 → ngpt-3.12.2}/PKG-INFO +68 -47
  2. {ngpt-3.12.0 → ngpt-3.12.2}/README.md +67 -46
  3. {ngpt-3.12.0 → ngpt-3.12.2}/docs/configuration.md +81 -58
  4. {ngpt-3.12.0 → ngpt-3.12.2}/docs/usage/cli_usage.md +80 -58
  5. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/cli/args.py +5 -3
  6. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/cli/main.py +53 -14
  7. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/utils/cli_config.py +16 -3
  8. {ngpt-3.12.0 → ngpt-3.12.2}/pyproject.toml +1 -1
  9. {ngpt-3.12.0 → ngpt-3.12.2}/uv.lock +1 -1
  10. {ngpt-3.12.0 → ngpt-3.12.2}/.github/banner.svg +0 -0
  11. {ngpt-3.12.0 → ngpt-3.12.2}/.github/workflows/aur-publish.yml +0 -0
  12. {ngpt-3.12.0 → ngpt-3.12.2}/.github/workflows/python-publish.yml +0 -0
  13. {ngpt-3.12.0 → ngpt-3.12.2}/.github/workflows/repo-mirror.yml +0 -0
  14. {ngpt-3.12.0 → ngpt-3.12.2}/.gitignore +0 -0
  15. {ngpt-3.12.0 → ngpt-3.12.2}/.python-version +0 -0
  16. {ngpt-3.12.0 → ngpt-3.12.2}/COMMIT_GUIDELINES.md +0 -0
  17. {ngpt-3.12.0 → ngpt-3.12.2}/CONTRIBUTING.md +0 -0
  18. {ngpt-3.12.0 → ngpt-3.12.2}/LICENSE +0 -0
  19. {ngpt-3.12.0 → ngpt-3.12.2}/PKGBUILD +0 -0
  20. {ngpt-3.12.0 → ngpt-3.12.2}/docs/CONTRIBUTING.md +0 -0
  21. {ngpt-3.12.0 → ngpt-3.12.2}/docs/LICENSE.md +0 -0
  22. {ngpt-3.12.0 → ngpt-3.12.2}/docs/_config.yml +0 -0
  23. {ngpt-3.12.0 → ngpt-3.12.2}/docs/_sass/custom/custom.scss +0 -0
  24. {ngpt-3.12.0 → ngpt-3.12.2}/docs/examples/advanced.md +0 -0
  25. {ngpt-3.12.0 → ngpt-3.12.2}/docs/examples/basic.md +0 -0
  26. {ngpt-3.12.0 → ngpt-3.12.2}/docs/examples/role_gallery.md +0 -0
  27. {ngpt-3.12.0 → ngpt-3.12.2}/docs/examples/specialized_tools.md +0 -0
  28. {ngpt-3.12.0 → ngpt-3.12.2}/docs/examples.md +0 -0
  29. {ngpt-3.12.0 → ngpt-3.12.2}/docs/index.md +0 -0
  30. {ngpt-3.12.0 → ngpt-3.12.2}/docs/installation.md +0 -0
  31. {ngpt-3.12.0 → ngpt-3.12.2}/docs/overview.md +0 -0
  32. {ngpt-3.12.0 → ngpt-3.12.2}/docs/usage/cli_config.md +0 -0
  33. {ngpt-3.12.0 → ngpt-3.12.2}/docs/usage/gitcommsg.md +0 -0
  34. {ngpt-3.12.0 → ngpt-3.12.2}/docs/usage/roles.md +0 -0
  35. {ngpt-3.12.0 → ngpt-3.12.2}/docs/usage/web_search.md +0 -0
  36. {ngpt-3.12.0 → ngpt-3.12.2}/docs/usage.md +0 -0
  37. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/__init__.py +0 -0
  38. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/__main__.py +0 -0
  39. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/cli/__init__.py +0 -0
  40. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/cli/config_manager.py +0 -0
  41. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/cli/formatters.py +0 -0
  42. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/cli/modes/__init__.py +0 -0
  43. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/cli/modes/chat.py +0 -0
  44. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/cli/modes/code.py +0 -0
  45. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/cli/modes/gitcommsg.py +0 -0
  46. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/cli/modes/interactive.py +0 -0
  47. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/cli/modes/rewrite.py +0 -0
  48. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/cli/modes/shell.py +0 -0
  49. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/cli/modes/text.py +0 -0
  50. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/cli/renderers.py +0 -0
  51. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/cli/roles.py +0 -0
  52. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/cli/ui.py +0 -0
  53. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/client.py +0 -0
  54. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/utils/__init__.py +0 -0
  55. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/utils/config.py +0 -0
  56. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/utils/log.py +0 -0
  57. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/utils/pipe.py +0 -0
  58. {ngpt-3.12.0 → ngpt-3.12.2}/ngpt/utils/web_search.py +0 -0
  59. {ngpt-3.12.0 → ngpt-3.12.2}/previews/icon.png +0 -0
  60. {ngpt-3.12.0 → ngpt-3.12.2}/previews/ngpt-g.png +0 -0
  61. {ngpt-3.12.0 → ngpt-3.12.2}/previews/ngpt-i.png +0 -0
  62. {ngpt-3.12.0 → ngpt-3.12.2}/previews/ngpt-s-c.png +0 -0
  63. {ngpt-3.12.0 → ngpt-3.12.2}/previews/ngpt-sh-c-a.png +0 -0
  64. {ngpt-3.12.0 → ngpt-3.12.2}/previews/ngpt-w-self.png +0 -0
  65. {ngpt-3.12.0 → ngpt-3.12.2}/previews/ngpt-w.png +0 -0
  66. {ngpt-3.12.0 → ngpt-3.12.2}/previews/social-preview.png +0 -0
  67. {ngpt-3.12.0 → ngpt-3.12.2}/wiki.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngpt
3
- Version: 3.12.0
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
@@ -281,14 +281,14 @@ For more examples and detailed usage, visit the [CLI Usage Guide](https://nazdri
281
281
  ```console
282
282
  ❯ ngpt -h
283
283
 
284
- usage: ngpt [-h] [-v] [--language LANGUAGE] [--config [CONFIG]] [--config-index CONFIG_INDEX] [--provider PROVIDER]
285
- [--remove] [--show-config] [--all] [--list-models] [--list-renderers] [--cli-config [COMMAND ...]]
286
- [--role-config [ACTION ...]] [--api-key API_KEY] [--base-url BASE_URL] [--model MODEL] [--web-search]
287
- [--pipe] [--temperature TEMPERATURE] [--top_p TOP_P] [--max_tokens MAX_TOKENS] [--log [FILE]]
284
+ usage: ngpt [-h] [-v] [--config [CONFIG]] [--config-index CONFIG_INDEX] [--provider PROVIDER] [--remove] [--show-config]
285
+ [--all] [--list-models] [--list-renderers] [--cli-config [COMMAND ...]] [--role-config [ACTION ...]]
286
+ [--api-key API_KEY] [--base-url BASE_URL] [--model MODEL] [--web-search] [--pipe]
287
+ [--temperature TEMPERATURE] [--top_p TOP_P] [--max_tokens MAX_TOKENS] [--log [FILE]]
288
288
  [--preprompt PREPROMPT | --role ROLE] [--no-stream | --prettify | --stream-prettify]
289
- [--renderer {auto,rich,glow}] [--rec-chunk] [--diff [FILE]] [--chunk-size CHUNK_SIZE]
289
+ [--renderer {auto,rich,glow}] [--language LANGUAGE] [--rec-chunk] [--diff [FILE]] [--chunk-size CHUNK_SIZE]
290
290
  [--analyses-chunk-size ANALYSES_CHUNK_SIZE] [--max-msg-lines MAX_MSG_LINES]
291
- [--max-recursion-depth MAX_RECURSION_DEPTH] [-i | -s | -c | -t | -r | -g] [--humanize]
291
+ [--max-recursion-depth MAX_RECURSION_DEPTH] [--humanize] [--multiline] [-i | -s | -c | -t | -r | -g]
292
292
  [prompt]
293
293
 
294
294
  nGPT - Interact with AI language models via OpenAI-compatible APIs
@@ -301,14 +301,15 @@ options::
301
301
 
302
302
  -h, --help show this help message and exit
303
303
  -v, --version Show version information and exit
304
- --language LANGUAGE Programming language to generate code in (for code mode)
305
304
 
306
305
  Configuration Options::
307
306
 
308
- --config [CONFIG] Path to a custom config file or, if no value provided, enter interactive configuration mode to create a new config
307
+ --config [CONFIG] Path to a custom config file or, if no value provided, enter interactive
308
+ configuration mode to create a new config
309
309
  --config-index CONFIG_INDEX Index of the configuration to use or edit (default: 0)
310
310
  --provider PROVIDER Provider name to identify the configuration to use
311
- --remove Remove the configuration at the specified index (requires --config and --config-index or --provider)
311
+ --remove Remove the configuration at the specified index (requires --config and
312
+ --config-index or --provider)
312
313
  --show-config Show the current configuration(s) and exit
313
314
  --all Show details for all configurations (requires --show-config)
314
315
  --list-models List all available models for the current configuration and exit
@@ -321,15 +322,21 @@ Global Options::
321
322
  --api-key API_KEY API key for the service
322
323
  --base-url BASE_URL Base URL for the API
323
324
  --model MODEL Model to use
324
- --web-search Enable web search capability using DuckDuckGo to enhance prompts with relevant information
325
- --pipe Read from stdin and use content with prompt. Use {} in prompt as placeholder for stdin content. Can be used with any mode option except --text and --interactive
325
+ --web-search Enable web search capability using DuckDuckGo to enhance prompts with relevant
326
+ information
327
+ --pipe Read from stdin and use content with prompt. Use {} in prompt as placeholder
328
+ for stdin content. Can be used with any mode option except --text and
329
+ --interactive
326
330
  --temperature TEMPERATURE Set temperature (controls randomness, default: 0.7)
327
331
  --top_p TOP_P Set top_p (controls diversity, default: 1.0)
328
332
  --max_tokens MAX_TOKENS Set max response length in tokens
329
- --log [FILE] Set filepath to log conversation to, or create a temporary log file if no path provided
333
+ --log [FILE] Set filepath to log conversation to, or create a temporary log file if no path
334
+ provided
330
335
  --preprompt PREPROMPT Set custom system prompt to control AI behavior
331
- --role ROLE Use a predefined role to set system prompt (mutually exclusive with --preprompt)
332
- --renderer {auto,rich,glow} Select which markdown renderer to use with --prettify or --stream-prettify (auto, rich, or glow)
336
+ --role ROLE Use a predefined role to set system prompt (mutually exclusive with
337
+ --preprompt)
338
+ --renderer {auto,rich,glow} Select which markdown renderer to use with --prettify or --stream-prettify
339
+ (auto, rich, or glow)
333
340
 
334
341
  Output Display Options (mutually exclusive)::
335
342
 
@@ -337,14 +344,30 @@ Output Display Options (mutually exclusive)::
337
344
  --prettify Render complete response with markdown and code formatting (non-streaming)
338
345
  --stream-prettify Stream response with real-time markdown rendering (default)
339
346
 
347
+ Code Mode Options::
348
+
349
+ --language LANGUAGE Programming language to generate code in (for code mode)
350
+
340
351
  Git Commit Message Options::
341
352
 
342
353
  --rec-chunk Process large diffs in chunks with recursive analysis if needed
343
- --diff [FILE] Use diff from specified file instead of staged changes. If used without a path, uses the path from CLI config.
354
+ --diff [FILE] Use diff from specified file instead of staged changes. If used without a path,
355
+ uses the path from CLI config.
344
356
  --chunk-size CHUNK_SIZE Number of lines per chunk when chunking is enabled (default: 200)
345
- --analyses-chunk-size ANALYSES_CHUNK_SIZE Number of lines per chunk when recursively chunking analyses (default: 200)
357
+ --analyses-chunk-size ANALYSES_CHUNK_SIZE
358
+ Number of lines per chunk when recursively chunking analyses (default: 200)
346
359
  --max-msg-lines MAX_MSG_LINES Maximum number of lines in commit message before condensing (default: 20)
347
- --max-recursion-depth MAX_RECURSION_DEPTH Maximum recursion depth for commit message condensing (default: 3)
360
+ --max-recursion-depth MAX_RECURSION_DEPTH
361
+ Maximum recursion depth for commit message condensing (default: 3)
362
+
363
+ Rewrite Mode Options::
364
+
365
+ --humanize Transform AI-generated text into human-like content that passes AI detection
366
+ tools
367
+
368
+ Interactive Mode Options::
369
+
370
+ --multiline Enable multiline text input with the "ml" command in interactive mode
348
371
 
349
372
  Modes (mutually exclusive)::
350
373
 
@@ -355,10 +378,6 @@ Modes (mutually exclusive)::
355
378
  -r, --rewrite Rewrite text from stdin to be more natural while preserving tone and meaning
356
379
  -g, --gitcommsg Generate AI-powered git commit messages from staged changes or diff file
357
380
 
358
- Rewrite Mode Options::
359
-
360
- --humanize Transform AI-generated text into human-like content that passes AI detection tools
361
-
362
381
  ```
363
382
 
364
383
  > **Note**: For better visualization of conventional commit messages on GitHub, you can use the [GitHub Commit Labels](https://greasyfork.org/en/scripts/526153-github-commit-labels) userscript, which adds colorful labels to your commits.
@@ -436,37 +455,39 @@ CLI Configuration Help:
436
455
  ngpt --cli-config get OPTION - Get the current value of OPTION
437
456
  ngpt --cli-config get - Show all CLI configuration settings
438
457
  ngpt --cli-config unset OPTION - Remove OPTION from configuration
439
- ngpt --cli-config list - List all available options
458
+ ngpt --cli-config list - List all available options with types and defaults
440
459
 
441
460
  Available options:
442
461
  General options (all modes):
443
- config-index - int (default: 0) [exclusive with: provider]
444
- log - str
445
- max_tokens - int
446
- no-stream - bool (default: False) [exclusive with: prettify, stream-prettify]
447
- preprompt - str
448
- prettify - bool (default: False) [exclusive with: no-stream, stream-prettify]
449
- provider - str [exclusive with: config-index]
450
- renderer - str (default: auto)
451
- stream-prettify - bool (default: False) [exclusive with: no-stream, prettify]
452
- temperature - float (default: 0.7)
453
- top_p - float (default: 1.0)
454
- web-search - bool (default: False)
455
-
456
- Options for Code generation mode:
457
- language - str (default: python)
458
-
459
- Options for Git commit message mode:
460
- analyses-chunk-size - int (default: 200)
461
- chunk-size - int (default: 200)
462
- diff - str
463
- max-msg-lines - int (default: 20)
464
- max-recursion-depth - int (default: 3)
465
- rec-chunk - bool (default: False)
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)
466
488
 
467
489
  Example usage:
468
490
  ngpt --cli-config set language java - Set default language to java for code generation
469
- ngpt --cli-config set provider Gemini - Set Gemini as your default provider
470
491
  ngpt --cli-config set temperature 0.9 - Set default temperature to 0.9
471
492
  ngpt --cli-config set no-stream true - Disable streaming by default
472
493
  ngpt --cli-config set recursive-chunk true - Enable recursive chunking for git commit messages
@@ -244,14 +244,14 @@ For more examples and detailed usage, visit the [CLI Usage Guide](https://nazdri
244
244
  ```console
245
245
  ❯ ngpt -h
246
246
 
247
- usage: ngpt [-h] [-v] [--language LANGUAGE] [--config [CONFIG]] [--config-index CONFIG_INDEX] [--provider PROVIDER]
248
- [--remove] [--show-config] [--all] [--list-models] [--list-renderers] [--cli-config [COMMAND ...]]
249
- [--role-config [ACTION ...]] [--api-key API_KEY] [--base-url BASE_URL] [--model MODEL] [--web-search]
250
- [--pipe] [--temperature TEMPERATURE] [--top_p TOP_P] [--max_tokens MAX_TOKENS] [--log [FILE]]
247
+ usage: ngpt [-h] [-v] [--config [CONFIG]] [--config-index CONFIG_INDEX] [--provider PROVIDER] [--remove] [--show-config]
248
+ [--all] [--list-models] [--list-renderers] [--cli-config [COMMAND ...]] [--role-config [ACTION ...]]
249
+ [--api-key API_KEY] [--base-url BASE_URL] [--model MODEL] [--web-search] [--pipe]
250
+ [--temperature TEMPERATURE] [--top_p TOP_P] [--max_tokens MAX_TOKENS] [--log [FILE]]
251
251
  [--preprompt PREPROMPT | --role ROLE] [--no-stream | --prettify | --stream-prettify]
252
- [--renderer {auto,rich,glow}] [--rec-chunk] [--diff [FILE]] [--chunk-size CHUNK_SIZE]
252
+ [--renderer {auto,rich,glow}] [--language LANGUAGE] [--rec-chunk] [--diff [FILE]] [--chunk-size CHUNK_SIZE]
253
253
  [--analyses-chunk-size ANALYSES_CHUNK_SIZE] [--max-msg-lines MAX_MSG_LINES]
254
- [--max-recursion-depth MAX_RECURSION_DEPTH] [-i | -s | -c | -t | -r | -g] [--humanize]
254
+ [--max-recursion-depth MAX_RECURSION_DEPTH] [--humanize] [--multiline] [-i | -s | -c | -t | -r | -g]
255
255
  [prompt]
256
256
 
257
257
  nGPT - Interact with AI language models via OpenAI-compatible APIs
@@ -264,14 +264,15 @@ options::
264
264
 
265
265
  -h, --help show this help message and exit
266
266
  -v, --version Show version information and exit
267
- --language LANGUAGE Programming language to generate code in (for code mode)
268
267
 
269
268
  Configuration Options::
270
269
 
271
- --config [CONFIG] Path to a custom config file or, if no value provided, enter interactive configuration mode to create a new config
270
+ --config [CONFIG] Path to a custom config file or, if no value provided, enter interactive
271
+ configuration mode to create a new config
272
272
  --config-index CONFIG_INDEX Index of the configuration to use or edit (default: 0)
273
273
  --provider PROVIDER Provider name to identify the configuration to use
274
- --remove Remove the configuration at the specified index (requires --config and --config-index or --provider)
274
+ --remove Remove the configuration at the specified index (requires --config and
275
+ --config-index or --provider)
275
276
  --show-config Show the current configuration(s) and exit
276
277
  --all Show details for all configurations (requires --show-config)
277
278
  --list-models List all available models for the current configuration and exit
@@ -284,15 +285,21 @@ Global Options::
284
285
  --api-key API_KEY API key for the service
285
286
  --base-url BASE_URL Base URL for the API
286
287
  --model MODEL Model to use
287
- --web-search Enable web search capability using DuckDuckGo to enhance prompts with relevant information
288
- --pipe Read from stdin and use content with prompt. Use {} in prompt as placeholder for stdin content. Can be used with any mode option except --text and --interactive
288
+ --web-search Enable web search capability using DuckDuckGo to enhance prompts with relevant
289
+ information
290
+ --pipe Read from stdin and use content with prompt. Use {} in prompt as placeholder
291
+ for stdin content. Can be used with any mode option except --text and
292
+ --interactive
289
293
  --temperature TEMPERATURE Set temperature (controls randomness, default: 0.7)
290
294
  --top_p TOP_P Set top_p (controls diversity, default: 1.0)
291
295
  --max_tokens MAX_TOKENS Set max response length in tokens
292
- --log [FILE] Set filepath to log conversation to, or create a temporary log file if no path provided
296
+ --log [FILE] Set filepath to log conversation to, or create a temporary log file if no path
297
+ provided
293
298
  --preprompt PREPROMPT Set custom system prompt to control AI behavior
294
- --role ROLE Use a predefined role to set system prompt (mutually exclusive with --preprompt)
295
- --renderer {auto,rich,glow} Select which markdown renderer to use with --prettify or --stream-prettify (auto, rich, or glow)
299
+ --role ROLE Use a predefined role to set system prompt (mutually exclusive with
300
+ --preprompt)
301
+ --renderer {auto,rich,glow} Select which markdown renderer to use with --prettify or --stream-prettify
302
+ (auto, rich, or glow)
296
303
 
297
304
  Output Display Options (mutually exclusive)::
298
305
 
@@ -300,14 +307,30 @@ Output Display Options (mutually exclusive)::
300
307
  --prettify Render complete response with markdown and code formatting (non-streaming)
301
308
  --stream-prettify Stream response with real-time markdown rendering (default)
302
309
 
310
+ Code Mode Options::
311
+
312
+ --language LANGUAGE Programming language to generate code in (for code mode)
313
+
303
314
  Git Commit Message Options::
304
315
 
305
316
  --rec-chunk Process large diffs in chunks with recursive analysis if needed
306
- --diff [FILE] Use diff from specified file instead of staged changes. If used without a path, uses the path from CLI config.
317
+ --diff [FILE] Use diff from specified file instead of staged changes. If used without a path,
318
+ uses the path from CLI config.
307
319
  --chunk-size CHUNK_SIZE Number of lines per chunk when chunking is enabled (default: 200)
308
- --analyses-chunk-size ANALYSES_CHUNK_SIZE Number of lines per chunk when recursively chunking analyses (default: 200)
320
+ --analyses-chunk-size ANALYSES_CHUNK_SIZE
321
+ Number of lines per chunk when recursively chunking analyses (default: 200)
309
322
  --max-msg-lines MAX_MSG_LINES Maximum number of lines in commit message before condensing (default: 20)
310
- --max-recursion-depth MAX_RECURSION_DEPTH Maximum recursion depth for commit message condensing (default: 3)
323
+ --max-recursion-depth MAX_RECURSION_DEPTH
324
+ Maximum recursion depth for commit message condensing (default: 3)
325
+
326
+ Rewrite Mode Options::
327
+
328
+ --humanize Transform AI-generated text into human-like content that passes AI detection
329
+ tools
330
+
331
+ Interactive Mode Options::
332
+
333
+ --multiline Enable multiline text input with the "ml" command in interactive mode
311
334
 
312
335
  Modes (mutually exclusive)::
313
336
 
@@ -318,10 +341,6 @@ Modes (mutually exclusive)::
318
341
  -r, --rewrite Rewrite text from stdin to be more natural while preserving tone and meaning
319
342
  -g, --gitcommsg Generate AI-powered git commit messages from staged changes or diff file
320
343
 
321
- Rewrite Mode Options::
322
-
323
- --humanize Transform AI-generated text into human-like content that passes AI detection tools
324
-
325
344
  ```
326
345
 
327
346
  > **Note**: For better visualization of conventional commit messages on GitHub, you can use the [GitHub Commit Labels](https://greasyfork.org/en/scripts/526153-github-commit-labels) userscript, which adds colorful labels to your commits.
@@ -399,37 +418,39 @@ CLI Configuration Help:
399
418
  ngpt --cli-config get OPTION - Get the current value of OPTION
400
419
  ngpt --cli-config get - Show all CLI configuration settings
401
420
  ngpt --cli-config unset OPTION - Remove OPTION from configuration
402
- ngpt --cli-config list - List all available options
421
+ ngpt --cli-config list - List all available options with types and defaults
403
422
 
404
423
  Available options:
405
424
  General options (all modes):
406
- config-index - int (default: 0) [exclusive with: provider]
407
- log - str
408
- max_tokens - int
409
- no-stream - bool (default: False) [exclusive with: prettify, stream-prettify]
410
- preprompt - str
411
- prettify - bool (default: False) [exclusive with: no-stream, stream-prettify]
412
- provider - str [exclusive with: config-index]
413
- renderer - str (default: auto)
414
- stream-prettify - bool (default: False) [exclusive with: no-stream, prettify]
415
- temperature - float (default: 0.7)
416
- top_p - float (default: 1.0)
417
- web-search - bool (default: False)
418
-
419
- Options for Code generation mode:
420
- language - str (default: python)
421
-
422
- Options for Git commit message mode:
423
- analyses-chunk-size - int (default: 200)
424
- chunk-size - int (default: 200)
425
- diff - str
426
- max-msg-lines - int (default: 20)
427
- max-recursion-depth - int (default: 3)
428
- rec-chunk - bool (default: False)
425
+ config-index - Type: int (default: 0)
426
+ log - Type: str (default: None)
427
+ max_tokens - Type: int (default: None)
428
+ no-stream - Type: bool (default: False)
429
+ preprompt - Type: str (default: None)
430
+ prettify - Type: bool (default: False)
431
+ provider - Type: str (default: None)
432
+ renderer - Type: str (default: auto)
433
+ stream-prettify - Type: bool (default: True)
434
+ temperature - Type: float (default: 0.7)
435
+ top_p - Type: float (default: 1.0)
436
+ web-search - Type: bool (default: False)
437
+
438
+ Code mode options (-c/--code):
439
+ language - Type: str (default: python)
440
+
441
+ Interactive mode options (-i/--interactive):
442
+ interactive-multiline - Type: bool (default: False)
443
+
444
+ Git commit message options (-g/--gitcommsg):
445
+ analyses-chunk-size - Type: int (default: 200)
446
+ chunk-size - Type: int (default: 200)
447
+ diff - Type: str (default: None)
448
+ max-msg-lines - Type: int (default: 20)
449
+ max-recursion-depth - Type: int (default: 3)
450
+ rec-chunk - Type: bool (default: False)
429
451
 
430
452
  Example usage:
431
453
  ngpt --cli-config set language java - Set default language to java for code generation
432
- ngpt --cli-config set provider Gemini - Set Gemini as your default provider
433
454
  ngpt --cli-config set temperature 0.9 - Set default temperature to 0.9
434
455
  ngpt --cli-config set no-stream true - Disable streaming by default
435
456
  ngpt --cli-config set recursive-chunk true - Enable recursive chunking for git commit messages
@@ -144,85 +144,108 @@ The interactive configuration will prompt you for values and guide you through t
144
144
 
145
145
  You can set configuration options directly via command-line arguments:
146
146
 
147
- ```
148
- usage: ngpt [-h] [-v] [--language LANGUAGE] [--config [CONFIG]] [--config-index CONFIG_INDEX] [--provider PROVIDER]
149
- [--remove] [--show-config] [--all] [--list-models] [--list-renderers] [--cli-config [COMMAND ...]]
150
- [--role-config [ACTION ...]] [--api-key API_KEY] [--base-url BASE_URL] [--model MODEL] [--web-search]
151
- [--pipe] [--temperature TEMPERATURE] [--top_p TOP_P] [--max_tokens MAX_TOKENS] [--log [FILE]]
147
+
148
+ ```console
149
+ ngpt -h
150
+
151
+ usage: ngpt [-h] [-v] [--config [CONFIG]] [--config-index CONFIG_INDEX] [--provider PROVIDER] [--remove] [--show-config]
152
+ [--all] [--list-models] [--list-renderers] [--cli-config [COMMAND ...]] [--role-config [ACTION ...]]
153
+ [--api-key API_KEY] [--base-url BASE_URL] [--model MODEL] [--web-search] [--pipe]
154
+ [--temperature TEMPERATURE] [--top_p TOP_P] [--max_tokens MAX_TOKENS] [--log [FILE]]
152
155
  [--preprompt PREPROMPT | --role ROLE] [--no-stream | --prettify | --stream-prettify]
153
- [--renderer {auto,rich,glow}] [--rec-chunk] [--diff [FILE]] [--chunk-size CHUNK_SIZE]
156
+ [--renderer {auto,rich,glow}] [--language LANGUAGE] [--rec-chunk] [--diff [FILE]] [--chunk-size CHUNK_SIZE]
154
157
  [--analyses-chunk-size ANALYSES_CHUNK_SIZE] [--max-msg-lines MAX_MSG_LINES]
155
- [--max-recursion-depth MAX_RECURSION_DEPTH] [-i | -s | -c | -t | -r | -g] [--humanize]
158
+ [--max-recursion-depth MAX_RECURSION_DEPTH] [--humanize] [--multiline] [-i | -s | -c | -t | -r | -g]
156
159
  [prompt]
157
160
 
158
161
  nGPT - Interact with AI language models via OpenAI-compatible APIs
159
- ```
160
162
 
161
- ### Positional Arguments
163
+ positional arguments::
164
+
165
+ [PROMPT] The prompt to send
162
166
 
163
- - `[PROMPT]`: The prompt to send
167
+ options::
164
168
 
165
- ### General Options
169
+ -h, --help show this help message and exit
170
+ -v, --version Show version information and exit
166
171
 
167
- - `-h, --help`: Show help message and exit
168
- - `-v, --version`: Show version information and exit
169
- - `--language <LANGUAGE>`: Programming language to generate code in (for code mode)
172
+ Configuration Options::
170
173
 
171
- ### Configuration Options
174
+ --config [CONFIG] Path to a custom config file or, if no value provided, enter interactive
175
+ configuration mode to create a new config
176
+ --config-index CONFIG_INDEX Index of the configuration to use or edit (default: 0)
177
+ --provider PROVIDER Provider name to identify the configuration to use
178
+ --remove Remove the configuration at the specified index (requires --config and
179
+ --config-index or --provider)
180
+ --show-config Show the current configuration(s) and exit
181
+ --all Show details for all configurations (requires --show-config)
182
+ --list-models List all available models for the current configuration and exit
183
+ --list-renderers Show available markdown renderers for use with --prettify
184
+ --cli-config [COMMAND ...] Manage CLI configuration (set, get, unset, list, help)
185
+ --role-config [ACTION ...] Manage custom roles (help, create, show, edit, list, remove) [role_name]
172
186
 
173
- - `--config <[CONFIG]>`: Path to a custom config file or, if no value provided, enter interactive configuration mode to create a new config
174
- - `--config-index <CONFIG_INDEX>`: Index of the configuration to use or edit (default: 0)
175
- - `--provider <PROVIDER>`: Provider name to identify the configuration to use
176
- - `--remove`: Remove the configuration at the specified index (requires --config and --config-index or --provider)
177
- - `--show-config`: Show the current configuration(s) and exit
178
- - `--all`: Show details for all configurations (requires --show-config)
179
- - `--list-models`: List all available models for the current configuration and exit
180
- - `--list-renderers`: Show available markdown renderers for use with --prettify
181
- - `--cli-config <[COMMAND ...]>`: Manage CLI configuration (set, get, unset, list, help)
182
- - `--role-config <[ACTION ...]>`: Manage custom roles (help, create, show, edit, list, remove) [role_name]
187
+ Global Options::
183
188
 
184
- ### Global Options
189
+ --api-key API_KEY API key for the service
190
+ --base-url BASE_URL Base URL for the API
191
+ --model MODEL Model to use
192
+ --web-search Enable web search capability using DuckDuckGo to enhance prompts with relevant
193
+ information
194
+ --pipe Read from stdin and use content with prompt. Use {} in prompt as placeholder
195
+ for stdin content. Can be used with any mode option except --text and
196
+ --interactive
197
+ --temperature TEMPERATURE Set temperature (controls randomness, default: 0.7)
198
+ --top_p TOP_P Set top_p (controls diversity, default: 1.0)
199
+ --max_tokens MAX_TOKENS Set max response length in tokens
200
+ --log [FILE] Set filepath to log conversation to, or create a temporary log file if no path
201
+ provided
202
+ --preprompt PREPROMPT Set custom system prompt to control AI behavior
203
+ --role ROLE Use a predefined role to set system prompt (mutually exclusive with
204
+ --preprompt)
205
+ --renderer {auto,rich,glow} Select which markdown renderer to use with --prettify or --stream-prettify
206
+ (auto, rich, or glow)
185
207
 
186
- - `--api-key <API_KEY>`: API key for the service
187
- - `--base-url <BASE_URL>`: Base URL for the API
188
- - `--model <MODEL>`: Model to use
189
- - `--web-search`: Enable web search capability using DuckDuckGo to enhance prompts with relevant information
190
- - `--pipe`: Read from stdin and use content with prompt. Use {} in prompt as placeholder for stdin content. Can be used with any mode option except --text and --interactive
191
- - `--temperature <TEMPERATURE>`: Set temperature (controls randomness, default: 0.7)
192
- - `--top_p <TOP_P>`: Set top_p (controls diversity, default: 1.0)
193
- - `--max_tokens <MAX_TOKENS>`: Set max response length in tokens
194
- - `--log <[FILE]>`: Set filepath to log conversation to, or create a temporary log file if no path provided
195
- - `--preprompt <PREPROMPT>`: Set custom system prompt to control AI behavior
196
- - `--role <ROLE>`: Use a predefined role to set system prompt (mutually exclusive with --preprompt)
197
- - `--renderer <{auto,rich,glow}>`: Select which markdown renderer to use with --prettify or --stream-prettify (auto, rich, or glow)
208
+ Output Display Options (mutually exclusive)::
198
209
 
199
- ### Output Display Options (mutually exclusive)
210
+ --no-stream Return the whole response without streaming or formatting
211
+ --prettify Render complete response with markdown and code formatting (non-streaming)
212
+ --stream-prettify Stream response with real-time markdown rendering (default)
200
213
 
201
- - `--no-stream`: Return the whole response without streaming or formatting
202
- - `--prettify`: Render complete response with markdown and code formatting (non-streaming)
203
- - `--stream-prettify`: Stream response with real-time markdown rendering (default)
214
+ Code Mode Options::
204
215
 
205
- ### Git Commit Message Options
216
+ --language LANGUAGE Programming language to generate code in (for code mode)
206
217
 
207
- - `--rec-chunk`: Process large diffs in chunks with recursive analysis if needed
208
- - `--diff <[FILE]>`: Use diff from specified file instead of staged changes. If used without a path, uses the path from CLI config.
209
- - `--chunk-size <CHUNK_SIZE>`: Number of lines per chunk when chunking is enabled (default: 200)
210
- - `--analyses-chunk-size <ANALYSES_CHUNK_SIZE>`: Number of lines per chunk when recursively chunking analyses (default: 200)
211
- - `--max-msg-lines <MAX_MSG_LINES>`: Maximum number of lines in commit message before condensing (default: 20)
212
- - `--max-recursion-depth <MAX_RECURSION_DEPTH>`: Maximum recursion depth for commit message condensing (default: 3)
218
+ Git Commit Message Options::
213
219
 
214
- ### Modes (mutually exclusive)
220
+ --rec-chunk Process large diffs in chunks with recursive analysis if needed
221
+ --diff [FILE] Use diff from specified file instead of staged changes. If used without a path,
222
+ uses the path from CLI config.
223
+ --chunk-size CHUNK_SIZE Number of lines per chunk when chunking is enabled (default: 200)
224
+ --analyses-chunk-size ANALYSES_CHUNK_SIZE
225
+ Number of lines per chunk when recursively chunking analyses (default: 200)
226
+ --max-msg-lines MAX_MSG_LINES Maximum number of lines in commit message before condensing (default: 20)
227
+ --max-recursion-depth MAX_RECURSION_DEPTH
228
+ Maximum recursion depth for commit message condensing (default: 3)
215
229
 
216
- - `-i, --interactive`: Start an interactive chat session
217
- - `-s, --shell`: Generate and execute shell commands
218
- - `-c, --code`: Generate code
219
- - `-t, --text`: Enter multi-line text input (submit with Ctrl+D)
220
- - `-r, --rewrite`: Rewrite text from stdin to be more natural while preserving tone and meaning
221
- - `-g, --gitcommsg`: Generate AI-powered git commit messages from staged changes or diff file
230
+ Rewrite Mode Options::
222
231
 
223
- ### Rewrite Mode Options
232
+ --humanize Transform AI-generated text into human-like content that passes AI detection
233
+ tools
224
234
 
225
- - `--humanize`: Transform AI-generated text into human-like content that passes AI detection tools
235
+ Interactive Mode Options::
236
+
237
+ --multiline Enable multiline text input with the "ml" command in interactive mode
238
+
239
+ Modes (mutually exclusive)::
240
+
241
+ -i, --interactive Start an interactive chat session
242
+ -s, --shell Generate and execute shell commands
243
+ -c, --code Generate code
244
+ -t, --text Enter multi-line text input (submit with Ctrl+D)
245
+ -r, --rewrite Rewrite text from stdin to be more natural while preserving tone and meaning
246
+ -g, --gitcommsg Generate AI-powered git commit messages from staged changes or diff file
247
+
248
+ ```
226
249
 
227
250
  ### Command Examples
228
251
 
@@ -36,85 +36,107 @@ Where:
36
36
 
37
37
  You can set configuration options directly via command-line arguments:
38
38
 
39
- ```
40
- usage: ngpt [-h] [-v] [--language LANGUAGE] [--config [CONFIG]] [--config-index CONFIG_INDEX] [--provider PROVIDER]
41
- [--remove] [--show-config] [--all] [--list-models] [--list-renderers] [--cli-config [COMMAND ...]]
42
- [--role-config [ACTION ...]] [--api-key API_KEY] [--base-url BASE_URL] [--model MODEL] [--web-search]
43
- [--pipe] [--temperature TEMPERATURE] [--top_p TOP_P] [--max_tokens MAX_TOKENS] [--log [FILE]]
39
+ ```console
40
+ ngpt -h
41
+
42
+ usage: ngpt [-h] [-v] [--config [CONFIG]] [--config-index CONFIG_INDEX] [--provider PROVIDER] [--remove] [--show-config]
43
+ [--all] [--list-models] [--list-renderers] [--cli-config [COMMAND ...]] [--role-config [ACTION ...]]
44
+ [--api-key API_KEY] [--base-url BASE_URL] [--model MODEL] [--web-search] [--pipe]
45
+ [--temperature TEMPERATURE] [--top_p TOP_P] [--max_tokens MAX_TOKENS] [--log [FILE]]
44
46
  [--preprompt PREPROMPT | --role ROLE] [--no-stream | --prettify | --stream-prettify]
45
- [--renderer {auto,rich,glow}] [--rec-chunk] [--diff [FILE]] [--chunk-size CHUNK_SIZE]
47
+ [--renderer {auto,rich,glow}] [--language LANGUAGE] [--rec-chunk] [--diff [FILE]] [--chunk-size CHUNK_SIZE]
46
48
  [--analyses-chunk-size ANALYSES_CHUNK_SIZE] [--max-msg-lines MAX_MSG_LINES]
47
- [--max-recursion-depth MAX_RECURSION_DEPTH] [-i | -s | -c | -t | -r | -g] [--humanize]
49
+ [--max-recursion-depth MAX_RECURSION_DEPTH] [--humanize] [--multiline] [-i | -s | -c | -t | -r | -g]
48
50
  [prompt]
49
51
 
50
52
  nGPT - Interact with AI language models via OpenAI-compatible APIs
51
- ```
52
53
 
53
- ### Positional Arguments
54
+ positional arguments::
55
+
56
+ [PROMPT] The prompt to send
57
+
58
+ options::
54
59
 
55
- - `[PROMPT]`: The prompt to send
60
+ -h, --help show this help message and exit
61
+ -v, --version Show version information and exit
56
62
 
57
- ### General Options
63
+ Configuration Options::
58
64
 
59
- - `-h, --help`: Show help message and exit
60
- - `-v, --version`: Show version information and exit
61
- - `--language <LANGUAGE>`: Programming language to generate code in (for code mode)
65
+ --config [CONFIG] Path to a custom config file or, if no value provided, enter interactive
66
+ configuration mode to create a new config
67
+ --config-index CONFIG_INDEX Index of the configuration to use or edit (default: 0)
68
+ --provider PROVIDER Provider name to identify the configuration to use
69
+ --remove Remove the configuration at the specified index (requires --config and
70
+ --config-index or --provider)
71
+ --show-config Show the current configuration(s) and exit
72
+ --all Show details for all configurations (requires --show-config)
73
+ --list-models List all available models for the current configuration and exit
74
+ --list-renderers Show available markdown renderers for use with --prettify
75
+ --cli-config [COMMAND ...] Manage CLI configuration (set, get, unset, list, help)
76
+ --role-config [ACTION ...] Manage custom roles (help, create, show, edit, list, remove) [role_name]
62
77
 
63
- ### Configuration Options
78
+ Global Options::
64
79
 
65
- - `--config <[CONFIG]>`: Path to a custom config file or, if no value provided, enter interactive configuration mode to create a new config
66
- - `--config-index <CONFIG_INDEX>`: Index of the configuration to use or edit (default: 0)
67
- - `--provider <PROVIDER>`: Provider name to identify the configuration to use
68
- - `--remove`: Remove the configuration at the specified index (requires --config and --config-index or --provider)
69
- - `--show-config`: Show the current configuration(s) and exit
70
- - `--all`: Show details for all configurations (requires --show-config)
71
- - `--list-models`: List all available models for the current configuration and exit
72
- - `--list-renderers`: Show available markdown renderers for use with --prettify
73
- - `--cli-config <[COMMAND ...]>`: Manage CLI configuration (set, get, unset, list, help)
74
- - `--role-config <[ACTION ...]>`: Manage custom roles (help, create, show, edit, list, remove) [role_name]
80
+ --api-key API_KEY API key for the service
81
+ --base-url BASE_URL Base URL for the API
82
+ --model MODEL Model to use
83
+ --web-search Enable web search capability using DuckDuckGo to enhance prompts with relevant
84
+ information
85
+ --pipe Read from stdin and use content with prompt. Use {} in prompt as placeholder
86
+ for stdin content. Can be used with any mode option except --text and
87
+ --interactive
88
+ --temperature TEMPERATURE Set temperature (controls randomness, default: 0.7)
89
+ --top_p TOP_P Set top_p (controls diversity, default: 1.0)
90
+ --max_tokens MAX_TOKENS Set max response length in tokens
91
+ --log [FILE] Set filepath to log conversation to, or create a temporary log file if no path
92
+ provided
93
+ --preprompt PREPROMPT Set custom system prompt to control AI behavior
94
+ --role ROLE Use a predefined role to set system prompt (mutually exclusive with
95
+ --preprompt)
96
+ --renderer {auto,rich,glow} Select which markdown renderer to use with --prettify or --stream-prettify
97
+ (auto, rich, or glow)
75
98
 
76
- ### Global Options
99
+ Output Display Options (mutually exclusive)::
77
100
 
78
- - `--api-key <API_KEY>`: API key for the service
79
- - `--base-url <BASE_URL>`: Base URL for the API
80
- - `--model <MODEL>`: Model to use
81
- - `--web-search`: Enable web search capability using DuckDuckGo to enhance prompts with relevant information
82
- - `--pipe`: Read from stdin and use content with prompt. Use {} in prompt as placeholder for stdin content. Can be used with any mode option except --text and --interactive
83
- - `--temperature <TEMPERATURE>`: Set temperature (controls randomness, default: 0.7)
84
- - `--top_p <TOP_P>`: Set top_p (controls diversity, default: 1.0)
85
- - `--max_tokens <MAX_TOKENS>`: Set max response length in tokens
86
- - `--log <[FILE]>`: Set filepath to log conversation to, or create a temporary log file if no path provided
87
- - `--preprompt <PREPROMPT>`: Set custom system prompt to control AI behavior
88
- - `--role <ROLE>`: Use a predefined role to set system prompt (mutually exclusive with --preprompt)
89
- - `--renderer <{auto,rich,glow}>`: Select which markdown renderer to use with --prettify or --stream-prettify (auto, rich, or glow)
101
+ --no-stream Return the whole response without streaming or formatting
102
+ --prettify Render complete response with markdown and code formatting (non-streaming)
103
+ --stream-prettify Stream response with real-time markdown rendering (default)
90
104
 
91
- ### Output Display Options (mutually exclusive)
105
+ Code Mode Options::
92
106
 
93
- - `--no-stream`: Return the whole response without streaming or formatting
94
- - `--prettify`: Render complete response with markdown and code formatting (non-streaming)
95
- - `--stream-prettify`: Stream response with real-time markdown rendering (default)
107
+ --language LANGUAGE Programming language to generate code in (for code mode)
96
108
 
97
- ### Git Commit Message Options
109
+ Git Commit Message Options::
98
110
 
99
- - `--rec-chunk`: Process large diffs in chunks with recursive analysis if needed
100
- - `--diff <[FILE]>`: Use diff from specified file instead of staged changes. If used without a path, uses the path from CLI config.
101
- - `--chunk-size <CHUNK_SIZE>`: Number of lines per chunk when chunking is enabled (default: 200)
102
- - `--analyses-chunk-size <ANALYSES_CHUNK_SIZE>`: Number of lines per chunk when recursively chunking analyses (default: 200)
103
- - `--max-msg-lines <MAX_MSG_LINES>`: Maximum number of lines in commit message before condensing (default: 20)
104
- - `--max-recursion-depth <MAX_RECURSION_DEPTH>`: Maximum recursion depth for commit message condensing (default: 3)
111
+ --rec-chunk Process large diffs in chunks with recursive analysis if needed
112
+ --diff [FILE] Use diff from specified file instead of staged changes. If used without a path,
113
+ uses the path from CLI config.
114
+ --chunk-size CHUNK_SIZE Number of lines per chunk when chunking is enabled (default: 200)
115
+ --analyses-chunk-size ANALYSES_CHUNK_SIZE
116
+ Number of lines per chunk when recursively chunking analyses (default: 200)
117
+ --max-msg-lines MAX_MSG_LINES Maximum number of lines in commit message before condensing (default: 20)
118
+ --max-recursion-depth MAX_RECURSION_DEPTH
119
+ Maximum recursion depth for commit message condensing (default: 3)
105
120
 
106
- ### Modes (mutually exclusive)
121
+ Rewrite Mode Options::
107
122
 
108
- - `-i, --interactive`: Start an interactive chat session
109
- - `-s, --shell`: Generate and execute shell commands
110
- - `-c, --code`: Generate code
111
- - `-t, --text`: Enter multi-line text input (submit with Ctrl+D)
112
- - `-r, --rewrite`: Rewrite text from stdin to be more natural while preserving tone and meaning
113
- - `-g, --gitcommsg`: Generate AI-powered git commit messages from staged changes or diff file
123
+ --humanize Transform AI-generated text into human-like content that passes AI detection
124
+ tools
114
125
 
115
- ### Rewrite Mode Options
126
+ Interactive Mode Options::
116
127
 
117
- - `--humanize`: Transform AI-generated text into human-like content that passes AI detection tools
128
+ --multiline Enable multiline text input with the "ml" command in interactive mode
129
+
130
+ Modes (mutually exclusive)::
131
+
132
+ -i, --interactive Start an interactive chat session
133
+ -s, --shell Generate and execute shell commands
134
+ -c, --code Generate code
135
+ -t, --text Enter multi-line text input (submit with Ctrl+D)
136
+ -r, --rewrite Rewrite text from stdin to be more natural while preserving tone and meaning
137
+ -g, --gitcommsg Generate AI-powered git commit messages from staged changes or diff file
138
+
139
+ ```
118
140
 
119
141
  ## Mode Details
120
142
 
@@ -30,9 +30,6 @@ def setup_argument_parser():
30
30
  # Version flag
31
31
  parser.add_argument('-v', '--version', action=ColoredVersionAction, nargs=0,
32
32
  help='Show version information and exit')
33
- # Language option for code mode
34
- parser.add_argument('--language', default="python",
35
- help='Programming language to generate code in (for code mode)')
36
33
 
37
34
  # Prompt argument
38
35
  parser.add_argument('prompt', nargs='?', default=None,
@@ -104,6 +101,11 @@ def setup_argument_parser():
104
101
  global_group.add_argument('--renderer', choices=['auto', 'rich', 'glow'], default='auto',
105
102
  help='Select which markdown renderer to use with --prettify or --stream-prettify (auto, rich, or glow)')
106
103
 
104
+ # Code Mode Options
105
+ code_group = parser.add_argument_group('Code Mode Options')
106
+ code_group.add_argument('--language', default="python",
107
+ help='Programming language to generate code in (for code mode)')
108
+
107
109
  # GitCommit message options
108
110
  gitcommsg_group = parser.add_argument_group('Git Commit Message Options')
109
111
  gitcommsg_group.add_argument('--rec-chunk', action='store_true',
@@ -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
- for option, meta in CLI_CONFIG_OPTIONS.items():
55
- for context in meta["context"]:
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
- print(f" {option}")
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
- print(f" {option}")
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
- print(f" {option}")
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
- print(f" {option}")
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 option in list_cli_config_options():
115
- meta = CLI_CONFIG_OPTIONS[option]
116
- default = f"(default: {meta['default']})" if meta['default'] is not None else ""
117
- contexts = ', '.join(meta['context'])
118
- if "all" in meta['context']:
119
- contexts = "all modes"
120
- print(f" {COLORS['cyan']}{option}{COLORS['reset']} - {meta['type']} {default} - Available in: {contexts}")
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":
@@ -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
- return sorted(CLI_CONFIG_OPTIONS.keys())
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
  [project]
2
2
  name = "ngpt"
3
- version = "3.12.0"
3
+ version = "3.12.2"
4
4
  description = "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
  authors = [
6
6
  {name = "nazDridoy", email = "nazdridoy399@gmail.com"},
@@ -148,7 +148,7 @@ wheels = [
148
148
 
149
149
  [[package]]
150
150
  name = "ngpt"
151
- version = "3.12.0"
151
+ version = "3.12.2"
152
152
  source = { editable = "." }
153
153
  dependencies = [
154
154
  { name = "beautifulsoup4" },
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
File without changes
File without changes
File without changes
File without changes
File without changes