Generate shell command you want with power of LLM, without leaving your terminal.
Project description
ShellGPT
Generate shell command you want with power of LLM, without leaving your terminal!
Install
pip install shgpt
This will install two commands: sg
and shgpt
.
Usage
ShellGPT has three modes to use:
- Direct mode,
sg [question]
orecho question | sg
. sg
, Enter TUI mode, tailored for infer shell commandsg -l
, Enter an interactive REPL.
See conf.py for configs.
Role
There are some built-in roles in shellgpt:
default
, used for ask general questionscode
, used for ask programming questionsshell
, used for infer shell commandcm
, used for generate git commit message
git diff | sg -r cm
Users can provide their own role with -r
option.
TUI generate git commit message
Users can provide their own role with -r
There are some key bindings to use in TUI: option
ctrl+j
, Infer answerctrl+r
, Run commandctrl+y
, Yank command
Requirements
- Ollama, you need to download models before try shellgpt.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shgpt-0.2.1.tar.gz
(5.8 kB
view details)
Built Distribution
File details
Details for the file shgpt-0.2.1.tar.gz
.
File metadata
- Download URL: shgpt-0.2.1.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0130855330f6c084dae66c28cbcdbbae7b1ddefbae880d90b2df2eed67158ba7 |
|
MD5 | 10bdccdb9c3e5df40d09867fa8e043cf |
|
BLAKE2b-256 | 59ea750a6505dc8ca46086dfb4693baf492c60de7ffcd9d6329fa64b992e9728 |
File details
Details for the file shgpt-0.2.1-py2.py3-none-any.whl
.
File metadata
- Download URL: shgpt-0.2.1-py2.py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 813a3290b13a492b327380d8193ed9d79903b46a03bf3a5cb1de5fc0afe8e68a |
|
MD5 | cba10a2fc76e462f8ce587ae92b03540 |
|
BLAKE2b-256 | e05faff6e124d40c342fed694fcf4b3e2a8acaa25038c6986f7aacde569ad7c3 |