Skip to main content

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] or echo question | sg.
  • sg, Enter TUI mode, tailored for infer shell command
  • sg -l, Enter an interactive REPL.

See conf.py for configs.

Role

There are some built-in roles in shellgpt:

  • default, used for ask general questions
  • code, used for ask programming questions
  • shell, used for infer shell command
  • cm, 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 -rThere are some key bindings to use in TUI: option

  • ctrl+j, Infer answer
  • ctrl+r, Run command
  • ctrl+y, Yank command

TUI screenshot

Requirements

  • Ollama, you need to download models before try shellgpt.

License

GPL-3.0

Project details


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)

Uploaded Source

Built Distribution

shgpt-0.2.1-py2.py3-none-any.whl (7.9 kB view details)

Uploaded Python 2 Python 3

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

Hashes for shgpt-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0130855330f6c084dae66c28cbcdbbae7b1ddefbae880d90b2df2eed67158ba7
MD5 10bdccdb9c3e5df40d09867fa8e043cf
BLAKE2b-256 59ea750a6505dc8ca46086dfb4693baf492c60de7ffcd9d6329fa64b992e9728

See more details on using hashes here.

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

Hashes for shgpt-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 813a3290b13a492b327380d8193ed9d79903b46a03bf3a5cb1de5fc0afe8e68a
MD5 cba10a2fc76e462f8ce587ae92b03540
BLAKE2b-256 e05faff6e124d40c342fed694fcf4b3e2a8acaa25038c6986f7aacde569ad7c3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page