ngpt 2.12.0__py3-none-any.whl → 2.14.0__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/args.py +17 -0
- ngpt/cli/formatters.py +1 -0
- ngpt/cli/main.py +28 -10
- ngpt/cli/modes/__init__.py +3 -1
- ngpt/cli/modes/gitcommsg.py +730 -0
- ngpt/cli/modes/rewrite.py +209 -0
- ngpt/utils/cli_config.py +6 -0
- ngpt/utils/log.py +305 -5
- {ngpt-2.12.0.dist-info → ngpt-2.14.0.dist-info}/METADATA +73 -28
- {ngpt-2.12.0.dist-info → ngpt-2.14.0.dist-info}/RECORD +13 -11
- {ngpt-2.12.0.dist-info → ngpt-2.14.0.dist-info}/WHEEL +0 -0
- {ngpt-2.12.0.dist-info → ngpt-2.14.0.dist-info}/entry_points.txt +0 -0
- {ngpt-2.12.0.dist-info → ngpt-2.14.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ngpt
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.14.0
|
4
4
|
Summary: A lightweight Python CLI and library for interacting with OpenAI-compatible APIs, supporting both official and self-hosted LLM endpoints.
|
5
5
|
Project-URL: Homepage, https://github.com/nazdridoy/ngpt
|
6
6
|
Project-URL: Repository, https://github.com/nazdridoy/ngpt
|
@@ -29,6 +29,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
29
29
|
Classifier: Topic :: Utilities
|
30
30
|
Requires-Python: >=3.8
|
31
31
|
Requires-Dist: prompt-toolkit>=3.0.0
|
32
|
+
Requires-Dist: pyperclip>=1.8.0
|
32
33
|
Requires-Dist: requests>=2.31.0
|
33
34
|
Requires-Dist: rich>=10.0.0
|
34
35
|
Description-Content-Type: text/markdown
|
@@ -103,6 +104,33 @@ ngpt --shell "list all files in the current directory"
|
|
103
104
|
# Read from stdin and use the content in your prompt
|
104
105
|
echo "What is this text about?" | ngpt --stdin "Analyze the following text: {}"
|
105
106
|
|
107
|
+
# Rewrite text to improve quality while preserving tone and meaning
|
108
|
+
echo "your text" | ngpt --rewrite
|
109
|
+
|
110
|
+
# Rewrite text from a command-line argument
|
111
|
+
ngpt --rewrite "your text to rewrite"
|
112
|
+
|
113
|
+
# Rewrite text from a file
|
114
|
+
cat file.txt | ngpt --rewrite
|
115
|
+
|
116
|
+
# Generate AI-powered git commit messages for staged changes
|
117
|
+
ngpt --gitcommsg
|
118
|
+
|
119
|
+
# Generate commit message with context
|
120
|
+
ngpt --gitcommsg -m "type:feat"
|
121
|
+
|
122
|
+
# Process large diffs in chunks with recursive analysis
|
123
|
+
ngpt --gitcommsg -r
|
124
|
+
|
125
|
+
# Process a diff file instead of staged changes
|
126
|
+
ngpt --gitcommsg --diff /path/to/changes.diff
|
127
|
+
|
128
|
+
# Generate a commit message with logging for debugging
|
129
|
+
ngpt --gitcommsg --log commit_log.txt
|
130
|
+
|
131
|
+
# Use interactive multiline editor to enter text to rewrite
|
132
|
+
ngpt --rewrite
|
133
|
+
|
106
134
|
# Display markdown responses with beautiful formatting
|
107
135
|
ngpt --prettify "Explain markdown syntax with examples"
|
108
136
|
|
@@ -138,12 +166,15 @@ For more examples and detailed usage, visit the [CLI Usage Guide](https://nazdri
|
|
138
166
|
- 💬 **Interactive Chat**: Continuous conversation with memory in modern UI
|
139
167
|
- 📊 **Streaming Responses**: Real-time output for better user experience
|
140
168
|
- 🔍 **Web Search**: Integrated with compatible API endpoints
|
169
|
+
- 📥 **Stdin Processing**: Process piped content by using `{}` placeholder in prompts
|
141
170
|
- 🎨 **Markdown Rendering**: Beautiful formatting of markdown and code with syntax highlighting
|
142
171
|
- ⚡ **Real-time Markdown**: Stream responses with live updating syntax highlighting and formatting
|
143
172
|
- ⚙️ **Multiple Configurations**: Cross-platform config system supporting different profiles
|
144
173
|
- 💻 **Shell Command Generation**: OS-aware command execution
|
174
|
+
- 🧠 **Text Rewriting**: Improve text quality while maintaining original tone and meaning
|
145
175
|
- 🧩 **Clean Code Generation**: Output code without markdown or explanations
|
146
176
|
- 📝 **Rich Multiline Editor**: Interactive multiline text input with syntax highlighting and intuitive controls
|
177
|
+
- 📑 **Git Commit Messages**: AI-powered generation of conventional, detailed commit messages from git diffs
|
147
178
|
- 🎭 **System Prompts**: Customize model behavior with custom system prompts
|
148
179
|
- 📃 **Conversation Logging**: Save your conversations to text files for later reference
|
149
180
|
- 🧰 **CLI Components**: Reusable components for building custom AI-powered command-line tools
|
@@ -349,38 +380,52 @@ For detailed information about building CLI tools with nGPT, see the [CLI Framew
|
|
349
380
|
|
350
381
|
### Command Line Options
|
351
382
|
|
352
|
-
You can configure
|
383
|
+
You can configure nGPT using the following options:
|
384
|
+
|
385
|
+
#### Mode Options (Mutually Exclusive)
|
353
386
|
|
354
387
|
| Option | Description |
|
355
388
|
|--------|-------------|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
| `--
|
389
|
+
| `-i, --interactive` | Start an interactive chat session with conversation memory and special commands |
|
390
|
+
| `-s, --shell` | Generate and execute shell commands appropriate for your operating system |
|
391
|
+
| `-c, --code` | Generate clean code without markdown formatting or explanations |
|
392
|
+
| `-t, --text` | Open interactive multiline editor for complex prompts with syntax highlighting |
|
393
|
+
| `--stdin` | Read from stdin and use content with prompt. Use {} in prompt as placeholder for stdin content |
|
394
|
+
| `--rewrite` | Rewrite text to improve quality while preserving original tone and meaning |
|
395
|
+
|
396
|
+
#### Global Options
|
397
|
+
|
398
|
+
| Option | Description |
|
399
|
+
|--------|-------------|
|
400
|
+
| `--api-key KEY` | API key for the service |
|
401
|
+
| `--base-url URL` | Base URL for the API |
|
402
|
+
| `--model MODEL` | Model to use |
|
403
|
+
| `--web-search` | Enable web search capability (if your API endpoint supports it) |
|
404
|
+
| `--temperature VALUE` | Set temperature (controls randomness, default: 0.7) |
|
405
|
+
| `--top_p VALUE` | Set top_p (controls diversity, default: 1.0) |
|
406
|
+
| `--max_tokens NUMBER` | Set maximum response length in tokens |
|
407
|
+
| `--preprompt TEXT` | Set custom system prompt to control AI behavior |
|
408
|
+
| `--language LANG` | Programming language to generate code in (for code mode, default: python) |
|
361
409
|
| `--no-stream` | Return the whole response without streaming |
|
362
|
-
| `--
|
363
|
-
| `--
|
364
|
-
| `--
|
365
|
-
| `--
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
|
370
|
-
|
371
|
-
| `--config` | Path to a custom
|
372
|
-
| `--config-index` | Index of the configuration to use (default: 0) |
|
373
|
-
| `--provider` | Provider name to identify the configuration to use
|
410
|
+
| `--prettify` | Render markdown responses and code with syntax highlighting and formatting |
|
411
|
+
| `--stream-prettify` | Enable streaming with markdown rendering (automatically uses Rich renderer) |
|
412
|
+
| `--renderer {auto,rich,glow}` | Select which markdown renderer to use with --prettify (default: auto) |
|
413
|
+
| `--log [FILE]` | Set filepath to log conversation to, or create a temporary log file if no path provided |
|
414
|
+
|
415
|
+
#### Configuration Options
|
416
|
+
|
417
|
+
| Option | Description |
|
418
|
+
|--------|-------------|
|
419
|
+
| `--config [PATH]` | Path to a custom config file or, if no value provided, enter interactive configuration mode |
|
420
|
+
| `--config-index INDEX` | Index of the configuration to use or edit (default: 0) |
|
421
|
+
| `--provider NAME` | Provider name to identify the configuration to use |
|
374
422
|
| `--remove` | Remove the configuration at the specified index (requires --config and --config-index or --provider) |
|
375
|
-
| `--show-config` | Show configuration
|
376
|
-
| `--all` |
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
| `-
|
381
|
-
| `--language` | Programming language to generate code in (for code mode, default: python) |
|
382
|
-
| `--cli-config` | Manage CLI configuration settings (set, get, unset, list, help) |
|
383
|
-
| `-v, --version` | Show version information |
|
423
|
+
| `--show-config` | Show the current configuration(s) and exit |
|
424
|
+
| `--all` | Show details for all configurations (requires --show-config) |
|
425
|
+
| `--list-models` | List all available models for the current configuration and exit |
|
426
|
+
| `--list-renderers` | Show available markdown renderers for use with --prettify |
|
427
|
+
| `--cli-config [COMMAND]` | Manage CLI configuration (set, get, unset, list, help) |
|
428
|
+
| `-v, --version` | Show version information and exit |
|
384
429
|
|
385
430
|
For a complete reference of all available options, see the [CLI Usage Guide](https://nazdridoy.github.io/ngpt/usage/cli_usage.html).
|
386
431
|
|
@@ -2,24 +2,26 @@ ngpt/__init__.py,sha256=kpKhViLakwMdHZkuLht2vWcjt0uD_5gR33gvMhfXr6w,664
|
|
2
2
|
ngpt/__main__.py,sha256=j3eFYPOtCCFBOGh7NK5IWEnADnTMMSEB9GLyIDoW724,66
|
3
3
|
ngpt/client.py,sha256=rLgDPmJe8_yi13-XUiHJ45z54rJVrupxWmeb-fQZGF4,15129
|
4
4
|
ngpt/cli/__init__.py,sha256=hebbDSMGiOd43YNnQP67uzr67Ue6rZPwm2czynr5iZY,43
|
5
|
-
ngpt/cli/args.py,sha256=
|
5
|
+
ngpt/cli/args.py,sha256=87b35nG7LFWPwewiICQrgilGIdD_uwqpkgo1DN3xOZY,11073
|
6
6
|
ngpt/cli/config_manager.py,sha256=NQQcWnjUppAAd0s0p9YAf8EyKS1ex5-0EB4DvKdB4dk,3662
|
7
|
-
ngpt/cli/formatters.py,sha256=
|
7
|
+
ngpt/cli/formatters.py,sha256=HBYGlx_7eoAKyzfy0Vq5L0yn8yVKjngqYBukMmXCcz0,9401
|
8
8
|
ngpt/cli/interactive.py,sha256=DZFbExcXd7RylkpBiZBhiI6N8FBaT0m_lBes0Pvhi48,10894
|
9
|
-
ngpt/cli/main.py,sha256=
|
9
|
+
ngpt/cli/main.py,sha256=hFX7Nn9NaRwa6uRp09fnPDzfmbkbbWZNczSLCUZPtLU,28488
|
10
10
|
ngpt/cli/renderers.py,sha256=gJ3WdVvCGkNxrLEkLCh6gk9HBFMK8y7an6CsEkqt2Z8,10535
|
11
11
|
ngpt/cli/ui.py,sha256=iMinm_QdsmwrEUpb7CBRexyyBqf4sviFI9M3E8D-hhA,5303
|
12
|
-
ngpt/cli/modes/__init__.py,sha256=
|
12
|
+
ngpt/cli/modes/__init__.py,sha256=R3aO662RIzWEOvr3moTrEI8Tpg0zDDyMGGh1-OxiRgM,285
|
13
13
|
ngpt/cli/modes/chat.py,sha256=4a5EgM_5A1zCSrLrjgQMDnBwIHd1Rnu5_BjSKSm7p24,4255
|
14
14
|
ngpt/cli/modes/code.py,sha256=RjOAj7BDO5vLUdIPkUfPtyIkI_W6qEHsZvYh-sIdVaM,4293
|
15
|
+
ngpt/cli/modes/gitcommsg.py,sha256=Su7-e2w5_3-ilgjfo_x055HFC7HROwiyT_jkb667gCM,26637
|
16
|
+
ngpt/cli/modes/rewrite.py,sha256=Zb0PFvWRKXs4xJCF3GEdYc-LSmy6qRszz8-QJuldHc0,8595
|
15
17
|
ngpt/cli/modes/shell.py,sha256=lF9f7w-0bl_FdZl-WJnZuV736BKrWQtrwoKr3ejPXFE,2682
|
16
18
|
ngpt/cli/modes/text.py,sha256=ncYnfLFMdTPuHiOvAaHNiOWhox6GF6S-2fTwMIrAz-g,3140
|
17
19
|
ngpt/utils/__init__.py,sha256=E46suk2-QgYBI0Qrs6WXOajOUOebF3ETAFY7ah8DTWs,942
|
18
|
-
ngpt/utils/cli_config.py,sha256=
|
20
|
+
ngpt/utils/cli_config.py,sha256=b7cXTxbRA-tQWgaehP_uRm_L8-677elPUXk290uzsTs,11110
|
19
21
|
ngpt/utils/config.py,sha256=WYOk_b1eiYjo6hpV3pfXr2RjqhOnmKqwZwKid1T41I4,10363
|
20
|
-
ngpt/utils/log.py,sha256=
|
21
|
-
ngpt-2.
|
22
|
-
ngpt-2.
|
23
|
-
ngpt-2.
|
24
|
-
ngpt-2.
|
25
|
-
ngpt-2.
|
22
|
+
ngpt/utils/log.py,sha256=f1jg2iFo35PAmsarH8FVL_62plq4VXH0Mu2QiP6RJGw,15934
|
23
|
+
ngpt-2.14.0.dist-info/METADATA,sha256=kvuDMT94vqncE_r5Nlw75ijljRMOBtdWRZ_p3bDsP8k,22573
|
24
|
+
ngpt-2.14.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
25
|
+
ngpt-2.14.0.dist-info/entry_points.txt,sha256=SqAAvLhMrsEpkIr4YFRdUeyuXQ9o0IBCeYgE6AVojoI,44
|
26
|
+
ngpt-2.14.0.dist-info/licenses/LICENSE,sha256=mQkpWoADxbHqE0HRefYLJdm7OpdrXBr3vNv5bZ8w72M,1065
|
27
|
+
ngpt-2.14.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|