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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

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