ngpt 3.4.5__tar.gz → 3.5.0__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-3.4.5 → ngpt-3.5.0}/CONTRIBUTING.md +2 -2
  2. {ngpt-3.4.5 → ngpt-3.5.0}/PKG-INFO +94 -124
  3. {ngpt-3.4.5 → ngpt-3.5.0}/README.md +92 -122
  4. {ngpt-3.4.5 → ngpt-3.5.0}/docs/CONTRIBUTING.md +2 -2
  5. {ngpt-3.4.5 → ngpt-3.5.0}/docs/configuration.md +74 -58
  6. {ngpt-3.4.5 → ngpt-3.5.0}/docs/index.md +8 -2
  7. {ngpt-3.4.5 → ngpt-3.5.0}/docs/installation.md +20 -3
  8. {ngpt-3.4.5 → ngpt-3.5.0}/docs/overview.md +9 -2
  9. {ngpt-3.4.5 → ngpt-3.5.0}/docs/usage/cli_usage.md +117 -58
  10. {ngpt-3.4.5 → ngpt-3.5.0}/docs/usage/gitcommsg.md +6 -9
  11. ngpt-3.5.0/docs/usage/web_search.md +115 -0
  12. {ngpt-3.4.5 → ngpt-3.5.0}/docs/usage.md +2 -1
  13. ngpt-3.5.0/ngpt/utils/web_search.py +594 -0
  14. {ngpt-3.4.5 → ngpt-3.5.0}/pyproject.toml +2 -2
  15. {ngpt-3.4.5 → ngpt-3.5.0}/uv.lock +13 -342
  16. ngpt-3.4.5/ngpt/utils/web_search.py +0 -310
  17. {ngpt-3.4.5 → ngpt-3.5.0}/.github/workflows/aur-publish.yml +0 -0
  18. {ngpt-3.4.5 → ngpt-3.5.0}/.github/workflows/python-publish.yml +0 -0
  19. {ngpt-3.4.5 → ngpt-3.5.0}/.gitignore +0 -0
  20. {ngpt-3.4.5 → ngpt-3.5.0}/.python-version +0 -0
  21. {ngpt-3.4.5 → ngpt-3.5.0}/COMMIT_GUIDELINES.md +0 -0
  22. {ngpt-3.4.5 → ngpt-3.5.0}/LICENSE +0 -0
  23. {ngpt-3.4.5 → ngpt-3.5.0}/PKGBUILD +0 -0
  24. {ngpt-3.4.5 → ngpt-3.5.0}/docs/LICENSE.md +0 -0
  25. {ngpt-3.4.5 → ngpt-3.5.0}/docs/_config.yml +0 -0
  26. {ngpt-3.4.5 → ngpt-3.5.0}/docs/_sass/custom/custom.scss +0 -0
  27. {ngpt-3.4.5 → ngpt-3.5.0}/docs/examples/advanced.md +0 -0
  28. {ngpt-3.4.5 → ngpt-3.5.0}/docs/examples/basic.md +0 -0
  29. {ngpt-3.4.5 → ngpt-3.5.0}/docs/examples.md +0 -0
  30. {ngpt-3.4.5 → ngpt-3.5.0}/docs/usage/cli_config.md +0 -0
  31. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/__init__.py +0 -0
  32. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/__main__.py +0 -0
  33. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/cli/__init__.py +0 -0
  34. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/cli/args.py +0 -0
  35. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/cli/config_manager.py +0 -0
  36. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/cli/formatters.py +0 -0
  37. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/cli/main.py +0 -0
  38. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/cli/modes/__init__.py +0 -0
  39. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/cli/modes/chat.py +0 -0
  40. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/cli/modes/code.py +0 -0
  41. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/cli/modes/gitcommsg.py +0 -0
  42. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/cli/modes/interactive.py +0 -0
  43. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/cli/modes/rewrite.py +0 -0
  44. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/cli/modes/shell.py +0 -0
  45. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/cli/modes/text.py +0 -0
  46. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/cli/renderers.py +0 -0
  47. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/cli/ui.py +0 -0
  48. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/client.py +0 -0
  49. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/utils/__init__.py +0 -0
  50. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/utils/cli_config.py +0 -0
  51. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/utils/config.py +0 -0
  52. {ngpt-3.4.5 → ngpt-3.5.0}/ngpt/utils/log.py +0 -0
  53. {ngpt-3.4.5 → ngpt-3.5.0}/wiki.md +0 -0
@@ -28,15 +28,15 @@ Thank you for your interest in contributing to NGPT! This document provides guid
28
28
  - `args.py` - Argument parsing setup
29
29
  - `config_manager.py` - CLI configuration handling
30
30
  - `formatters.py` - Output formatting logic
31
- - `interactive.py` - Interactive mode implementation
32
31
  - `modes/` - Different operational modes
33
32
  - `__init__.py` - Modes initialization
34
33
  - `chat.py` - Chat mode functionality
35
34
  - `code.py` - Code generation mode
36
35
  - `gitcommsg.py` - Git commit message generation
36
+ - `interactive.py` - Interactive mode implementation
37
+ - `rewrite.py` - Text rewriting mode
37
38
  - `shell.py` - Shell command generation
38
39
  - `text.py` - Text generation mode
39
- - `rewrite.py` - Text rewriting mode
40
40
  - `renderers.py` - Output rendering logic (e.g., markdown)
41
41
  - `ui.py` - User interface elements (e.g., prompts, spinners)
42
42
  - `utils/` - Utility modules
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngpt
3
- Version: 3.4.5
3
+ Version: 3.5.0
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
@@ -28,12 +28,12 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
28
28
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
29
29
  Classifier: Topic :: Utilities
30
30
  Requires-Python: >=3.8
31
+ Requires-Dist: beautifulsoup4>=4.12.0
31
32
  Requires-Dist: duckduckgo-search>=3.0.0
32
33
  Requires-Dist: prompt-toolkit>=3.0.0
33
34
  Requires-Dist: pyperclip>=1.8.0
34
35
  Requires-Dist: requests>=2.31.0
35
36
  Requires-Dist: rich>=10.0.0
36
- Requires-Dist: trafilatura>=1.6.0
37
37
  Description-Content-Type: text/markdown
38
38
 
39
39
  # nGPT
@@ -62,10 +62,10 @@ Description-Content-Type: text/markdown
62
62
 
63
63
  - ✅ **Versatile**: Powerful and easy-to-use CLI tool for various AI tasks
64
64
  - 🪶 **Lightweight**: Minimal dependencies with everything you need included
65
- - 🔄 **API Flexibility**: Works with OpenAI, Ollama, Groq, Claude, Gemini, and any compatible endpoint
65
+ - 🔄 **API Flexibility**: Works with OpenAI, Ollama, Groq, Claude, Gemini, and any OpenAI-compatible endpoint
66
66
  - 💬 **Interactive Chat**: Continuous conversation with memory in modern UI
67
67
  - 📊 **Streaming Responses**: Real-time output for better user experience
68
- - 🔍 **Web Search**: Enhance any model with contextual information from the web
68
+ - 🔍 **Web Search**: Enhance any model with contextual information from the web, using advanced content extraction to identify the most relevant information from web pages
69
69
  - 📥 **Stdin Processing**: Process piped content by using `{}` placeholder in prompts
70
70
  - 🎨 **Markdown Rendering**: Beautiful formatting of markdown and code with syntax highlighting
71
71
  - ⚡ **Real-time Markdown**: Stream responses with live updating syntax highlighting and formatting
@@ -85,37 +85,47 @@ See the [Feature Overview](https://nazdridoy.github.io/ngpt/overview/) for more
85
85
 
86
86
 
87
87
  ## Table of Contents
88
- - [Quick Start](#quick-start)
89
88
  - [Features](#features)
90
- - [Documentation](#documentation)
91
89
  - [Installation](#installation)
90
+ - [Quick Start](#quick-start)
92
91
  - [Usage](#usage)
92
+ - [Command Line Options](#command-line-options)
93
93
  - [Documentation](https://nazdridoy.github.io/ngpt/)
94
- - [CLI Tool](#as-a-cli-tool)
94
+ - [Documentation](#documentation)
95
95
  - [Configuration](#configuration)
96
- - [Command Line Options](#command-line-options)
96
+ - [API Key Setup](#api-key-setup)
97
+ - [OpenAI API Key](#openai-api-key)
98
+ - [Google Gemini API Key](#google-gemini-api-key)
97
99
  - [CLI Configuration](#cli-configuration)
98
100
  - [Interactive Configuration](#interactive-configuration)
99
101
  - [Configuration File](#configuration-file)
100
102
  - [Configuration Priority](#configuration-priority)
101
- - [API Key Setup](#api-key-setup)
102
- - [OpenAI API Key](#openai-api-key)
103
- - [Google Gemini API Key](#google-gemini-api-key)
104
103
  - [Contributing](#contributing)
105
104
  - [License](#license)
106
105
 
107
- ## Quick Start
106
+ ## Installation
108
107
 
109
108
  ```bash
110
- # Install with pip
109
+ # Installation with pip
111
110
  pip install ngpt
112
111
 
113
- # Or install with uv (faster)
112
+ # Or install with uv (faster installation)
114
113
  uv pip install ngpt
115
114
 
116
- # Or install globally as a CLI tool (recommended)
115
+ # Or install globally as a CLI tool (recommended for command-line usage)
117
116
  uv tool install ngpt
118
117
 
118
+ # Arch Linux: install from AUR
119
+ paru -S ngpt
120
+ ```
121
+
122
+ Requires Python 3.8 or newer.
123
+
124
+ For detailed installation instructions, see the [Installation Guide](https://nazdridoy.github.io/ngpt/installation/).
125
+
126
+ ## Quick Start
127
+
128
+ ```bash
119
129
  # Chat with default settings
120
130
  ngpt "Tell me about quantum computing"
121
131
 
@@ -200,58 +210,6 @@ ngpt --provider Groq "Explain quantum computing"
200
210
  # Compare outputs from different providers
201
211
  ngpt --provider OpenAI "Explain quantum physics" > openai_response.txt
202
212
  ngpt --provider Ollama "Explain quantum physics" > ollama_response.txt
203
- ```
204
-
205
- For more examples and detailed usage, visit the [CLI Usage Guide](https://nazdridoy.github.io/ngpt/usage/cli_usage/).
206
-
207
- ## Documentation
208
-
209
- Comprehensive documentation, including usage guides and examples, is available at:
210
-
211
- **[https://nazdridoy.github.io/ngpt/](https://nazdridoy.github.io/ngpt/)**
212
-
213
- Key documentation sections:
214
- - [Installation Guide](https://nazdridoy.github.io/ngpt/installation/)
215
- - [CLI Usage Guide](https://nazdridoy.github.io/ngpt/usage/cli_usage/)
216
- - [Configuration Guide](https://nazdridoy.github.io/ngpt/configuration/)
217
- - [Examples & Tutorials](https://nazdridoy.github.io/ngpt/examples/basic/)
218
-
219
- ## Installation
220
-
221
- ```bash
222
- # Installation with pip
223
- pip install ngpt
224
-
225
- # Or install with uv (faster installation)
226
- uv pip install ngpt
227
-
228
- # Or install globally as a CLI tool (recommended for command-line usage)
229
- uv tool install ngpt
230
-
231
- # Arch Linux: install from AUR
232
- paru -S ngpt
233
- ```
234
-
235
- Requires Python 3.8 or newer.
236
-
237
- For detailed installation instructions, see the [Installation Guide](https://nazdridoy.github.io/ngpt/installation/).
238
-
239
- ## Usage
240
-
241
- ### As a CLI Tool
242
-
243
- ```bash
244
- # Basic chat (default mode)
245
- ngpt "Hello, how are you?"
246
-
247
- # Interactive chat session with conversation history
248
- ngpt -i
249
-
250
- # Log conversation to a file
251
- ngpt --interactive --log conversation.log
252
-
253
- # Use custom system prompt to guide AI behavior
254
- ngpt --preprompt "You are a Python programming tutor" "Explain decorators"
255
213
 
256
214
  # Show all API configurations
257
215
  ngpt --show-config --all
@@ -277,47 +235,16 @@ ngpt -s "list all files in current directory"
277
235
  # On Windows generates: dir
278
236
  # On Linux/macOS generates: ls -la
279
237
 
280
- # Generate clean code (using -c or --code flag)
281
- # Returns only code without markdown formatting or explanations
238
+ # Generate code (using -c or --code flag)
282
239
  ngpt -c "create a python function that calculates fibonacci numbers"
283
240
 
284
241
  # Use multiline text editor for complex prompts (using -t or --text flag)
285
- # Opens an interactive editor with syntax highlighting and intuitive controls
286
242
  ngpt -t
287
243
  ```
288
244
 
289
- For more CLI examples and detailed usage information, see the [CLI Usage Guide](https://nazdridoy.github.io/ngpt/usage/cli_usage/).
290
-
291
- ## Configuration
292
-
293
- ### API Key Setup
294
-
295
- #### OpenAI API Key
296
- 1. Create an account at [OpenAI](https://platform.openai.com/)
297
- 2. Navigate to API keys: https://platform.openai.com/api-keys
298
- 3. Click "Create new secret key" and copy your API key
299
- 4. Configure nGPT with your key:
300
- ```bash
301
- ngpt --config
302
- # Enter provider: OpenAI
303
- # Enter API key: your-openai-api-key
304
- # Enter base URL: https://api.openai.com/v1/
305
- # Enter model: gpt-3.5-turbo (or other model)
306
- ```
245
+ For more examples and detailed usage, visit the [CLI Usage Guide](https://nazdridoy.github.io/ngpt/usage/cli_usage/).
307
246
 
308
- #### Google Gemini API Key
309
- 1. Create or use an existing Google account
310
- 2. Go to [Google AI Studio](https://aistudio.google.com/)
311
- 3. Navigate to API keys in the left sidebar (or visit https://aistudio.google.com/app/apikey)
312
- 4. Create an API key and copy it
313
- 5. Configure nGPT with your key:
314
- ```bash
315
- ngpt --config
316
- # Enter provider: Gemini
317
- # Enter API key: your-gemini-api-key
318
- # Enter base URL: https://generativelanguage.googleapis.com/v1beta/openai
319
- # Enter model: gemini-2.0-flash
320
- ```
247
+ ## Usage
321
248
 
322
249
  ### Command Line Options
323
250
 
@@ -326,8 +253,8 @@ For more CLI examples and detailed usage information, see the [CLI Usage Guide](
326
253
  usage: ngpt [-h] [-v] [--language LANGUAGE] [--config [CONFIG]] [--config-index CONFIG_INDEX] [--provider PROVIDER]
327
254
  [--remove] [--show-config] [--all] [--list-models] [--list-renderers] [--cli-config [COMMAND ...]]
328
255
  [--api-key API_KEY] [--base-url BASE_URL] [--model MODEL] [--web-search] [--temperature TEMPERATURE]
329
- [--top_p TOP_P] [--max_tokens MAX_TOKENS] [--log [FILE]] [--preprompt PREPROMPT] [--no-stream] [--prettify]
330
- [--stream-prettify] [--renderer {auto,rich,glow}] [--rec-chunk] [--diff [FILE]] [--chunk-size CHUNK_SIZE]
256
+ [--top_p TOP_P] [--max_tokens MAX_TOKENS] [--log [FILE]] [--preprompt PREPROMPT] [--no-stream | --prettify |
257
+ --stream-prettify] [--renderer {auto,rich,glow}] [--rec-chunk] [--diff [FILE]] [--chunk-size CHUNK_SIZE]
331
258
  [--analyses-chunk-size ANALYSES_CHUNK_SIZE] [--max-msg-lines MAX_MSG_LINES]
332
259
  [--max-recursion-depth MAX_RECURSION_DEPTH] [-i | -s | -c | -t | -p | -r | -g]
333
260
  [prompt]
@@ -346,12 +273,10 @@ options::
346
273
 
347
274
  Configuration Options::
348
275
 
349
- --config [CONFIG] Path to a custom config file or, if no value provided, enter interactive
350
- configuration mode to create a new config
276
+ --config [CONFIG] Path to a custom config file or, if no value provided, enter interactive configuration mode to create a new config
351
277
  --config-index CONFIG_INDEX Index of the configuration to use or edit (default: 0)
352
278
  --provider PROVIDER Provider name to identify the configuration to use
353
- --remove Remove the configuration at the specified index (requires --config and
354
- --config-index or --provider)
279
+ --remove Remove the configuration at the specified index (requires --config and --config-index or --provider)
355
280
  --show-config Show the current configuration(s) and exit
356
281
  --all Show details for all configurations (requires --show-config)
357
282
  --list-models List all available models for the current configuration and exit
@@ -363,30 +288,28 @@ Global Options::
363
288
  --api-key API_KEY API key for the service
364
289
  --base-url BASE_URL Base URL for the API
365
290
  --model MODEL Model to use
366
- --web-search Enable web search capability (Note: Your API endpoint must support this
367
- feature)
291
+ --web-search Enable web search capability using DuckDuckGo to enhance prompts with relevant information
368
292
  --temperature TEMPERATURE Set temperature (controls randomness, default: 0.7)
369
293
  --top_p TOP_P Set top_p (controls diversity, default: 1.0)
370
294
  --max_tokens MAX_TOKENS Set max response length in tokens
371
- --log [FILE] Set filepath to log conversation to, or create a temporary log file if no path
372
- provided
295
+ --log [FILE] Set filepath to log conversation to, or create a temporary log file if no path provided
373
296
  --preprompt PREPROMPT Set custom system prompt to control AI behavior
374
- --no-stream Return the whole response without streaming
375
- --prettify Render markdown responses and code with syntax highlighting and formatting
376
- --stream-prettify Enable streaming with markdown rendering (automatically uses Rich renderer)
377
- --renderer {auto,rich,glow} Select which markdown renderer to use with --prettify (auto, rich, or glow)
297
+ --renderer {auto,rich,glow} Select which markdown renderer to use with --prettify or --stream-prettify (auto, rich, or glow)
298
+
299
+ Output Display Options (mutually exclusive)::
300
+
301
+ --no-stream Return the whole response without streaming or formatting
302
+ --prettify Render complete response with markdown and code formatting (non-streaming)
303
+ --stream-prettify Stream response with real-time markdown rendering (default)
378
304
 
379
305
  Git Commit Message Options::
380
306
 
381
307
  --rec-chunk Process large diffs in chunks with recursive analysis if needed
382
- --diff [FILE] Use diff from specified file instead of staged changes. If used without a path,
383
- uses the path from CLI config.
308
+ --diff [FILE] Use diff from specified file instead of staged changes. If used without a path, uses the path from CLI config.
384
309
  --chunk-size CHUNK_SIZE Number of lines per chunk when chunking is enabled (default: 200)
385
- --analyses-chunk-size ANALYSES_CHUNK_SIZE
386
- Number of lines per chunk when recursively chunking analyses (default: 200)
310
+ --analyses-chunk-size ANALYSES_CHUNK_SIZE Number of lines per chunk when recursively chunking analyses (default: 200)
387
311
  --max-msg-lines MAX_MSG_LINES Maximum number of lines in commit message before condensing (default: 20)
388
- --max-recursion-depth MAX_RECURSION_DEPTH
389
- Maximum recursion depth for commit message condensing (default: 3)
312
+ --max-recursion-depth MAX_RECURSION_DEPTH Maximum recursion depth for commit message condensing (default: 3)
390
313
 
391
314
  Modes (mutually exclusive)::
392
315
 
@@ -394,15 +317,62 @@ Modes (mutually exclusive)::
394
317
  -s, --shell Generate and execute shell commands
395
318
  -c, --code Generate code
396
319
  -t, --text Enter multi-line text input (submit with Ctrl+D)
397
- -p, --pipe Read from stdin and use content with prompt. Use {} in prompt as placeholder
398
- for stdin content
320
+ -p, --pipe Read from stdin and use content with prompt. Use {} in prompt as placeholder for stdin content
399
321
  -r, --rewrite Rewrite text from stdin to be more natural while preserving tone and meaning
400
322
  -g, --gitcommsg Generate AI-powered git commit messages from staged changes or diff file
401
323
  ```
402
324
 
403
325
  > **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.
404
326
 
405
- For a complete reference of all available options, see the [CLI Usage Guide](https://nazdridoy.github.io/ngpt/usage/cli_usage/).
327
+ For a complete reference of all available options, detailed CLI examples and usage information, see the [CLI Usage Guide](https://nazdridoy.github.io/ngpt/usage/cli_usage/).
328
+
329
+
330
+ ## Documentation
331
+
332
+ Comprehensive documentation, including usage guides and examples, is available at:
333
+
334
+ **[https://nazdridoy.github.io/ngpt/](https://nazdridoy.github.io/ngpt/)**
335
+
336
+ Key documentation sections:
337
+ - [Installation Guide](https://nazdridoy.github.io/ngpt/installation/)
338
+ - [CLI Usage Guide](https://nazdridoy.github.io/ngpt/usage/cli_usage/)
339
+ - [Configuration Guide](https://nazdridoy.github.io/ngpt/configuration/)
340
+ - [Examples & Tutorials](https://nazdridoy.github.io/ngpt/examples/basic/)
341
+ - [Git Commit Message Guide](https://nazdridoy.github.io/ngpt/usage/gitcommsg/)
342
+
343
+
344
+ ## Configuration
345
+
346
+ ### API Key Setup
347
+
348
+ #### OpenAI API Key
349
+ 1. Create an account at [OpenAI](https://platform.openai.com/)
350
+ 2. Navigate to API keys: https://platform.openai.com/api-keys
351
+ 3. Click "Create new secret key" and copy your API key
352
+ 4. Configure nGPT with your key:
353
+ ```bash
354
+ ngpt --config
355
+ # Enter provider: OpenAI
356
+ # Enter API key: your-openai-api-key
357
+ # Enter base URL: https://api.openai.com/v1/
358
+ # Enter model: gpt-3.5-turbo (or other model)
359
+ ```
360
+
361
+ #### Google Gemini API Key
362
+ 1. Create or use an existing Google account
363
+ 2. Go to [Google AI Studio](https://aistudio.google.com/)
364
+ 3. Navigate to API keys in the left sidebar (or visit https://aistudio.google.com/app/apikey)
365
+ 4. Create an API key and copy it
366
+ 5. Configure nGPT with your key:
367
+ ```bash
368
+ ngpt --config
369
+ # Enter provider: Gemini
370
+ # Enter API key: your-gemini-api-key
371
+ # Enter base URL: https://generativelanguage.googleapis.com/v1beta/openai
372
+ # Enter model: gemini-2.0-flash
373
+ ```
374
+
375
+ For more detailed information, refer to the [API Key Setup documentation](https://nazdridoy.github.io/ngpt/configuration/#api-key-setup).
406
376
 
407
377
  ### CLI Configuration
408
378
 
@@ -24,10 +24,10 @@
24
24
 
25
25
  - ✅ **Versatile**: Powerful and easy-to-use CLI tool for various AI tasks
26
26
  - 🪶 **Lightweight**: Minimal dependencies with everything you need included
27
- - 🔄 **API Flexibility**: Works with OpenAI, Ollama, Groq, Claude, Gemini, and any compatible endpoint
27
+ - 🔄 **API Flexibility**: Works with OpenAI, Ollama, Groq, Claude, Gemini, and any OpenAI-compatible endpoint
28
28
  - 💬 **Interactive Chat**: Continuous conversation with memory in modern UI
29
29
  - 📊 **Streaming Responses**: Real-time output for better user experience
30
- - 🔍 **Web Search**: Enhance any model with contextual information from the web
30
+ - 🔍 **Web Search**: Enhance any model with contextual information from the web, using advanced content extraction to identify the most relevant information from web pages
31
31
  - 📥 **Stdin Processing**: Process piped content by using `{}` placeholder in prompts
32
32
  - 🎨 **Markdown Rendering**: Beautiful formatting of markdown and code with syntax highlighting
33
33
  - ⚡ **Real-time Markdown**: Stream responses with live updating syntax highlighting and formatting
@@ -47,37 +47,47 @@ See the [Feature Overview](https://nazdridoy.github.io/ngpt/overview/) for more
47
47
 
48
48
 
49
49
  ## Table of Contents
50
- - [Quick Start](#quick-start)
51
50
  - [Features](#features)
52
- - [Documentation](#documentation)
53
51
  - [Installation](#installation)
52
+ - [Quick Start](#quick-start)
54
53
  - [Usage](#usage)
54
+ - [Command Line Options](#command-line-options)
55
55
  - [Documentation](https://nazdridoy.github.io/ngpt/)
56
- - [CLI Tool](#as-a-cli-tool)
56
+ - [Documentation](#documentation)
57
57
  - [Configuration](#configuration)
58
- - [Command Line Options](#command-line-options)
58
+ - [API Key Setup](#api-key-setup)
59
+ - [OpenAI API Key](#openai-api-key)
60
+ - [Google Gemini API Key](#google-gemini-api-key)
59
61
  - [CLI Configuration](#cli-configuration)
60
62
  - [Interactive Configuration](#interactive-configuration)
61
63
  - [Configuration File](#configuration-file)
62
64
  - [Configuration Priority](#configuration-priority)
63
- - [API Key Setup](#api-key-setup)
64
- - [OpenAI API Key](#openai-api-key)
65
- - [Google Gemini API Key](#google-gemini-api-key)
66
65
  - [Contributing](#contributing)
67
66
  - [License](#license)
68
67
 
69
- ## Quick Start
68
+ ## Installation
70
69
 
71
70
  ```bash
72
- # Install with pip
71
+ # Installation with pip
73
72
  pip install ngpt
74
73
 
75
- # Or install with uv (faster)
74
+ # Or install with uv (faster installation)
76
75
  uv pip install ngpt
77
76
 
78
- # Or install globally as a CLI tool (recommended)
77
+ # Or install globally as a CLI tool (recommended for command-line usage)
79
78
  uv tool install ngpt
80
79
 
80
+ # Arch Linux: install from AUR
81
+ paru -S ngpt
82
+ ```
83
+
84
+ Requires Python 3.8 or newer.
85
+
86
+ For detailed installation instructions, see the [Installation Guide](https://nazdridoy.github.io/ngpt/installation/).
87
+
88
+ ## Quick Start
89
+
90
+ ```bash
81
91
  # Chat with default settings
82
92
  ngpt "Tell me about quantum computing"
83
93
 
@@ -162,58 +172,6 @@ ngpt --provider Groq "Explain quantum computing"
162
172
  # Compare outputs from different providers
163
173
  ngpt --provider OpenAI "Explain quantum physics" > openai_response.txt
164
174
  ngpt --provider Ollama "Explain quantum physics" > ollama_response.txt
165
- ```
166
-
167
- For more examples and detailed usage, visit the [CLI Usage Guide](https://nazdridoy.github.io/ngpt/usage/cli_usage/).
168
-
169
- ## Documentation
170
-
171
- Comprehensive documentation, including usage guides and examples, is available at:
172
-
173
- **[https://nazdridoy.github.io/ngpt/](https://nazdridoy.github.io/ngpt/)**
174
-
175
- Key documentation sections:
176
- - [Installation Guide](https://nazdridoy.github.io/ngpt/installation/)
177
- - [CLI Usage Guide](https://nazdridoy.github.io/ngpt/usage/cli_usage/)
178
- - [Configuration Guide](https://nazdridoy.github.io/ngpt/configuration/)
179
- - [Examples & Tutorials](https://nazdridoy.github.io/ngpt/examples/basic/)
180
-
181
- ## Installation
182
-
183
- ```bash
184
- # Installation with pip
185
- pip install ngpt
186
-
187
- # Or install with uv (faster installation)
188
- uv pip install ngpt
189
-
190
- # Or install globally as a CLI tool (recommended for command-line usage)
191
- uv tool install ngpt
192
-
193
- # Arch Linux: install from AUR
194
- paru -S ngpt
195
- ```
196
-
197
- Requires Python 3.8 or newer.
198
-
199
- For detailed installation instructions, see the [Installation Guide](https://nazdridoy.github.io/ngpt/installation/).
200
-
201
- ## Usage
202
-
203
- ### As a CLI Tool
204
-
205
- ```bash
206
- # Basic chat (default mode)
207
- ngpt "Hello, how are you?"
208
-
209
- # Interactive chat session with conversation history
210
- ngpt -i
211
-
212
- # Log conversation to a file
213
- ngpt --interactive --log conversation.log
214
-
215
- # Use custom system prompt to guide AI behavior
216
- ngpt --preprompt "You are a Python programming tutor" "Explain decorators"
217
175
 
218
176
  # Show all API configurations
219
177
  ngpt --show-config --all
@@ -239,47 +197,16 @@ ngpt -s "list all files in current directory"
239
197
  # On Windows generates: dir
240
198
  # On Linux/macOS generates: ls -la
241
199
 
242
- # Generate clean code (using -c or --code flag)
243
- # Returns only code without markdown formatting or explanations
200
+ # Generate code (using -c or --code flag)
244
201
  ngpt -c "create a python function that calculates fibonacci numbers"
245
202
 
246
203
  # Use multiline text editor for complex prompts (using -t or --text flag)
247
- # Opens an interactive editor with syntax highlighting and intuitive controls
248
204
  ngpt -t
249
205
  ```
250
206
 
251
- For more CLI examples and detailed usage information, see the [CLI Usage Guide](https://nazdridoy.github.io/ngpt/usage/cli_usage/).
252
-
253
- ## Configuration
254
-
255
- ### API Key Setup
256
-
257
- #### OpenAI API Key
258
- 1. Create an account at [OpenAI](https://platform.openai.com/)
259
- 2. Navigate to API keys: https://platform.openai.com/api-keys
260
- 3. Click "Create new secret key" and copy your API key
261
- 4. Configure nGPT with your key:
262
- ```bash
263
- ngpt --config
264
- # Enter provider: OpenAI
265
- # Enter API key: your-openai-api-key
266
- # Enter base URL: https://api.openai.com/v1/
267
- # Enter model: gpt-3.5-turbo (or other model)
268
- ```
207
+ For more examples and detailed usage, visit the [CLI Usage Guide](https://nazdridoy.github.io/ngpt/usage/cli_usage/).
269
208
 
270
- #### Google Gemini API Key
271
- 1. Create or use an existing Google account
272
- 2. Go to [Google AI Studio](https://aistudio.google.com/)
273
- 3. Navigate to API keys in the left sidebar (or visit https://aistudio.google.com/app/apikey)
274
- 4. Create an API key and copy it
275
- 5. Configure nGPT with your key:
276
- ```bash
277
- ngpt --config
278
- # Enter provider: Gemini
279
- # Enter API key: your-gemini-api-key
280
- # Enter base URL: https://generativelanguage.googleapis.com/v1beta/openai
281
- # Enter model: gemini-2.0-flash
282
- ```
209
+ ## Usage
283
210
 
284
211
  ### Command Line Options
285
212
 
@@ -288,8 +215,8 @@ For more CLI examples and detailed usage information, see the [CLI Usage Guide](
288
215
  usage: ngpt [-h] [-v] [--language LANGUAGE] [--config [CONFIG]] [--config-index CONFIG_INDEX] [--provider PROVIDER]
289
216
  [--remove] [--show-config] [--all] [--list-models] [--list-renderers] [--cli-config [COMMAND ...]]
290
217
  [--api-key API_KEY] [--base-url BASE_URL] [--model MODEL] [--web-search] [--temperature TEMPERATURE]
291
- [--top_p TOP_P] [--max_tokens MAX_TOKENS] [--log [FILE]] [--preprompt PREPROMPT] [--no-stream] [--prettify]
292
- [--stream-prettify] [--renderer {auto,rich,glow}] [--rec-chunk] [--diff [FILE]] [--chunk-size CHUNK_SIZE]
218
+ [--top_p TOP_P] [--max_tokens MAX_TOKENS] [--log [FILE]] [--preprompt PREPROMPT] [--no-stream | --prettify |
219
+ --stream-prettify] [--renderer {auto,rich,glow}] [--rec-chunk] [--diff [FILE]] [--chunk-size CHUNK_SIZE]
293
220
  [--analyses-chunk-size ANALYSES_CHUNK_SIZE] [--max-msg-lines MAX_MSG_LINES]
294
221
  [--max-recursion-depth MAX_RECURSION_DEPTH] [-i | -s | -c | -t | -p | -r | -g]
295
222
  [prompt]
@@ -308,12 +235,10 @@ options::
308
235
 
309
236
  Configuration Options::
310
237
 
311
- --config [CONFIG] Path to a custom config file or, if no value provided, enter interactive
312
- configuration mode to create a new config
238
+ --config [CONFIG] Path to a custom config file or, if no value provided, enter interactive configuration mode to create a new config
313
239
  --config-index CONFIG_INDEX Index of the configuration to use or edit (default: 0)
314
240
  --provider PROVIDER Provider name to identify the configuration to use
315
- --remove Remove the configuration at the specified index (requires --config and
316
- --config-index or --provider)
241
+ --remove Remove the configuration at the specified index (requires --config and --config-index or --provider)
317
242
  --show-config Show the current configuration(s) and exit
318
243
  --all Show details for all configurations (requires --show-config)
319
244
  --list-models List all available models for the current configuration and exit
@@ -325,30 +250,28 @@ Global Options::
325
250
  --api-key API_KEY API key for the service
326
251
  --base-url BASE_URL Base URL for the API
327
252
  --model MODEL Model to use
328
- --web-search Enable web search capability (Note: Your API endpoint must support this
329
- feature)
253
+ --web-search Enable web search capability using DuckDuckGo to enhance prompts with relevant information
330
254
  --temperature TEMPERATURE Set temperature (controls randomness, default: 0.7)
331
255
  --top_p TOP_P Set top_p (controls diversity, default: 1.0)
332
256
  --max_tokens MAX_TOKENS Set max response length in tokens
333
- --log [FILE] Set filepath to log conversation to, or create a temporary log file if no path
334
- provided
257
+ --log [FILE] Set filepath to log conversation to, or create a temporary log file if no path provided
335
258
  --preprompt PREPROMPT Set custom system prompt to control AI behavior
336
- --no-stream Return the whole response without streaming
337
- --prettify Render markdown responses and code with syntax highlighting and formatting
338
- --stream-prettify Enable streaming with markdown rendering (automatically uses Rich renderer)
339
- --renderer {auto,rich,glow} Select which markdown renderer to use with --prettify (auto, rich, or glow)
259
+ --renderer {auto,rich,glow} Select which markdown renderer to use with --prettify or --stream-prettify (auto, rich, or glow)
260
+
261
+ Output Display Options (mutually exclusive)::
262
+
263
+ --no-stream Return the whole response without streaming or formatting
264
+ --prettify Render complete response with markdown and code formatting (non-streaming)
265
+ --stream-prettify Stream response with real-time markdown rendering (default)
340
266
 
341
267
  Git Commit Message Options::
342
268
 
343
269
  --rec-chunk Process large diffs in chunks with recursive analysis if needed
344
- --diff [FILE] Use diff from specified file instead of staged changes. If used without a path,
345
- uses the path from CLI config.
270
+ --diff [FILE] Use diff from specified file instead of staged changes. If used without a path, uses the path from CLI config.
346
271
  --chunk-size CHUNK_SIZE Number of lines per chunk when chunking is enabled (default: 200)
347
- --analyses-chunk-size ANALYSES_CHUNK_SIZE
348
- Number of lines per chunk when recursively chunking analyses (default: 200)
272
+ --analyses-chunk-size ANALYSES_CHUNK_SIZE Number of lines per chunk when recursively chunking analyses (default: 200)
349
273
  --max-msg-lines MAX_MSG_LINES Maximum number of lines in commit message before condensing (default: 20)
350
- --max-recursion-depth MAX_RECURSION_DEPTH
351
- Maximum recursion depth for commit message condensing (default: 3)
274
+ --max-recursion-depth MAX_RECURSION_DEPTH Maximum recursion depth for commit message condensing (default: 3)
352
275
 
353
276
  Modes (mutually exclusive)::
354
277
 
@@ -356,15 +279,62 @@ Modes (mutually exclusive)::
356
279
  -s, --shell Generate and execute shell commands
357
280
  -c, --code Generate code
358
281
  -t, --text Enter multi-line text input (submit with Ctrl+D)
359
- -p, --pipe Read from stdin and use content with prompt. Use {} in prompt as placeholder
360
- for stdin content
282
+ -p, --pipe Read from stdin and use content with prompt. Use {} in prompt as placeholder for stdin content
361
283
  -r, --rewrite Rewrite text from stdin to be more natural while preserving tone and meaning
362
284
  -g, --gitcommsg Generate AI-powered git commit messages from staged changes or diff file
363
285
  ```
364
286
 
365
287
  > **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.
366
288
 
367
- For a complete reference of all available options, see the [CLI Usage Guide](https://nazdridoy.github.io/ngpt/usage/cli_usage/).
289
+ For a complete reference of all available options, detailed CLI examples and usage information, see the [CLI Usage Guide](https://nazdridoy.github.io/ngpt/usage/cli_usage/).
290
+
291
+
292
+ ## Documentation
293
+
294
+ Comprehensive documentation, including usage guides and examples, is available at:
295
+
296
+ **[https://nazdridoy.github.io/ngpt/](https://nazdridoy.github.io/ngpt/)**
297
+
298
+ Key documentation sections:
299
+ - [Installation Guide](https://nazdridoy.github.io/ngpt/installation/)
300
+ - [CLI Usage Guide](https://nazdridoy.github.io/ngpt/usage/cli_usage/)
301
+ - [Configuration Guide](https://nazdridoy.github.io/ngpt/configuration/)
302
+ - [Examples & Tutorials](https://nazdridoy.github.io/ngpt/examples/basic/)
303
+ - [Git Commit Message Guide](https://nazdridoy.github.io/ngpt/usage/gitcommsg/)
304
+
305
+
306
+ ## Configuration
307
+
308
+ ### API Key Setup
309
+
310
+ #### OpenAI API Key
311
+ 1. Create an account at [OpenAI](https://platform.openai.com/)
312
+ 2. Navigate to API keys: https://platform.openai.com/api-keys
313
+ 3. Click "Create new secret key" and copy your API key
314
+ 4. Configure nGPT with your key:
315
+ ```bash
316
+ ngpt --config
317
+ # Enter provider: OpenAI
318
+ # Enter API key: your-openai-api-key
319
+ # Enter base URL: https://api.openai.com/v1/
320
+ # Enter model: gpt-3.5-turbo (or other model)
321
+ ```
322
+
323
+ #### Google Gemini API Key
324
+ 1. Create or use an existing Google account
325
+ 2. Go to [Google AI Studio](https://aistudio.google.com/)
326
+ 3. Navigate to API keys in the left sidebar (or visit https://aistudio.google.com/app/apikey)
327
+ 4. Create an API key and copy it
328
+ 5. Configure nGPT with your key:
329
+ ```bash
330
+ ngpt --config
331
+ # Enter provider: Gemini
332
+ # Enter API key: your-gemini-api-key
333
+ # Enter base URL: https://generativelanguage.googleapis.com/v1beta/openai
334
+ # Enter model: gemini-2.0-flash
335
+ ```
336
+
337
+ For more detailed information, refer to the [API Key Setup documentation](https://nazdridoy.github.io/ngpt/configuration/#api-key-setup).
368
338
 
369
339
  ### CLI Configuration
370
340