Bot releases are visible (Hide)
Full Changelog: https://github.com/TheR1D/shell_gpt/compare/1.4.3...1.4.4
Shoutout to all contributors: @keiththomps, @artsparkAI, @save196.
Published by TheR1D 8 months ago
—md
and —no-md
to disable or enable markdown output.PRETTIFY_MARKDOWN
to disable or enable markdown output by default.USE_LITELLM
to enforce usage of LiteLLM library.Because LiteLLM facilitates requests for numerous other LLM backends, it is heavy to import, adding 1-2 seconds of runtime. ShellGPT, by default will use OpenAI's library, which is suitable for most users. Optionally, ShellGPT can be installed with LiteLLM by running pip install shell-gpt[litellm]
. To enforce LiteLLM usage set USE_LITELLM
to true in the config file ~/.config/shell_gpt/.sgptrc
.
Published by TheR1D 8 months ago
API_BASE_URL
#473 and fixing REQUEST_TIMEOUT
by @TheR1D in https://github.com/TheR1D/shell_gpt/pull/477
Full Changelog: https://github.com/TheR1D/shell_gpt/compare/1.3.0...1.3.1
Published by TheR1D 8 months ago
ShellGPT now can work with multiple Backends using LiteLLM. You can use locally hosted open source models which are available for free. To use local models, you will need to run your own LLM backend server such as Ollama. To setup ShellGPT with Ollama, please follow this comprehensive guide. Full list of supported models and providers here. Note that ShellGPT is not optimized for local models and may not work as expected❗️
Markdown formatting now depends on the role description. For instance, if the role includes "APPLY MARKDOWN"
in its description, the output for this role will be Markdown-formatted. This applies to both default and custom roles. If you would like to disable Markdown formatting, edit the default role description in ~/.config/shell_gpt/roles
.
Full Changelog: https://github.com/TheR1D/shell_gpt/compare/1.2.0...1.3.0
Published by TheR1D 9 months ago
--interaction
that works with --shell
option, e.g. sgpt --shell --no-interaction
will output suggested command to stdout. This is usefull when you want to redirect output to somewhere else. For instance sgpt -s "say hi" | pbcopy
.--shell
not switching to interactive input mode.--no-interaction
to generate shell commands.--install-integration
logic, will not download sh script anymore.sgpt
is being called from non-interactive shell environments such as cron tab.❗️Shell integration logic has been updated, and it will not work with previous version of integration function in ~/.bashrc
or ~/.zshrc
. Run sgpt --install-integration
to apply new changes, and remove old integration function from your shell profile if you were using it before.
https://github.com/TheR1D/shell_gpt/assets/16740832/9197283c-db6a-4b46-bfea-3eb776dd9093
REPL mode can now accept stdin, a PROMPT argument, or even both. This is useful when you want to provide some initial context for your prompt.
sgpt --repl temp < my_app.py
Entering REPL mode, press Ctrl+C to exit.
──────────────────────────────────── Input ────────────────────────────────────
name = input("What is your name?")
print(f"Hello {name}")
───────────────────────────────────────────────────────────────────────────────
>>> What is this code about?
The snippet of code you've provided is written in Python. It prompts the user...
>>> Follow up questions...
It is also possible to pass PROMPT to REPL mode sgpt --repl temp "some initial prompt"
or even both sgpt --repl temp "initial arg prompt" < text.txt
.
Full Changelog: https://github.com/TheR1D/shell_gpt/compare/1.1.0...1.2.0
Published by TheR1D 10 months ago
https://github.com/TheR1D/shell_gpt/assets/16740832/721ddb19-97e7-428f-a0ee-107d027ddd59
ShellGPT has now integrated the OpenAI Python library for handling API requests. This integration simplifies the development and maintenance of the ShellGPT code base. Additionally, it enhances user experience by providing more user-friendly error messages, complete with descriptions and potential solutions.
Function calls is a powerful feature OpenAI provides. It allows LLM to execute functions in your system, which can be used to accomplish a variety of tasks. ShellGPT has a convenient way to define functions and use them. To install default functions run:
sgpt --install-functions
This will add a function for LLM to execute shell commands and to execute Apple Scripts (on macOS). More details in demo video and README.md.
-c
for —code
.-lc
for --list-chats
-lr
for --list-roles
—functions
option, enables/disable function calling.—install-functions
option, installs default functions.OPENAI_FUNCTIONS_PATH
OPENAI_USE_FUNCTIONS
SHOW_FUNCTIONS_OUTPUT
Published by TheR1D 10 months ago
Published by TheR1D 10 months ago
ShellGPT v1.0.0
release includes multiple significant changes:
gpt-4-1106-preview
(a.k.a. GPT-4 Turbo).CODE_THEME
which sets theme for markdown (default is dracula
)."""
triple quotes.--version
options that prints installed ShellGPT version.For users which will be upgrading from previous versions it is recommended to change DEFAULT_MODEL
to gpt-4-1106-preview
in config file ~/.config/shell_gpt/.sgptrc
since older models might not perform well with system roles. Because of significant changes in roles, unfortunately previously created custom roles and chats will not work with ShellGPT v1.0.0 and you will need to re-create them using new version.
Shoutout to all contributors: @jaycenhorton @arafatsyed @th3happybit @Navidur1 @moritz-t-w @Ismail-Ben
Published by TheR1D over 1 year ago
By default, ShellGPT leverages OpenAI's large language models. However, this release provides the flexibility to use locally hosted models, which can be a cost-effective alternative. To use local models, you will need to run your own API server. You can accomplish this by using LocalAI, a self-hosted, OpenAI-compatible API. Setting up LocalAI allows you to run language models on your own hardware, potentially without the need for an internet connection, depending on your usage. To set up your LocalAI, please follow this comprehensive guide. Remember that the performance of your local models may depend on the specifications of your hardware and the specific language model you choose to deploy.
--model
parameter is now string (was enum before).Published by TheR1D over 1 year ago
This release incorporates support for the newly announced gpt-3.5-turbo-16k model which has same capabilities as the standard gpt-3.5-turbo model but with 4 times the context.
sgpt --model gpt-3.5-turbo-16k "16k context prompt"
Published by TheR1D over 1 year ago
This release includes shell integrations for ZSH and Bash.
--install-integration
which will update user shell profile.Shell integration allows you to use Shell-GPT in your terminal with hotkeys. It is currently available for Bash and ZSH. It will allow you to have sgpt
completions in your shell history, and also edit suggested commands right away.
https://github.com/TheR1D/shell_gpt/assets/16740832/bead0dab-0dd9-436d-88b7-6abfb2c556c1
pip install --upgrade shell-gpt
sgpt --install-integration
# Restart your terminal to apply changes.
In your terminal enter natural language request, and press Ctrl+l
to get shell command suggestion. It will replace your current input line (buffer) with the GPT suggested command.
List all txt files in current folder (Ctrl+l)
# -> ls *.txt
Special thanks to @chinarjoshi
Published by TheR1D over 1 year ago
This release includes several new features, optimizations and bug fixes:
--shell
.--describe-shell
or -d
to generate explanation for commands..sgptrc
file.--temperature
was change to 2.sgpt
crashes.exit()
in REPL mode.When executing a shell command suggestion using --shell
the prompt has be changed. There are 3 new options:
sgpt -s "show all txt files in current folder"
# -> ls *.txt
# -> [E]xecute, [D]escribe, [A]bort: d
# -> List all files with .txt extension in current directory
# -> [E]xecute, [D]escribe, [A]bort: e
...
Same logic works in --repl
mode:
sgpt -s --repl temp
Entering shell REPL mode, type [e] to execute commands or [d] to describe the commands, press Ctrl+C to exit.
>>> install docker
brew install docker
>>> d
Installs Docker using the Homebrew package manager.
>>> e
...
Added new option --describe-shell
or -d
. It allows you to generate explanation for shell commands:
sgpt -d "ls -la"
# -> List all files and directories, including hidden files, with permissions and ownership information.
New configuration parameter DEFAULT_EXECUTE_SHELL_CMD
(false
by default), if true
will executing commands when calling sgpt --shell
if no input was passed (enter). So we don't have to type "y" or "e" to execute command.
sgpt -s "say hi"
# -> echo hi
# -> [E]xecute, [D]escribe, [A]bort: (enter)
hi
Shoutout to all contributors: @chinarjoshi, @konstantin-goldman, @Daeinar, @eitamal, @cosmojg.
Published by TheR1D over 1 year ago
echo hello | sgpt "another hello"
.--list-chat
option renamed as --list-chats
ShellGPT allows you to create custom roles, which can be utilized to generate code, shell commands, or to fulfill your specific needs. To create a new role, use the --create-role
option followed by the role name. You will be prompted to provide a description for the role, along with other details. This will create a JSON file in ~/.config/shell_gpt/roles
with the role name. Inside this directory, you can also edit default sgpt
roles, such as shell, code, and default. Use the --list-roles
option to list all available roles, and the --show-role
option to display the details of a specific role. Here's an example of a custom role:
sgpt --create-role json
# Enter role description: You are JSON generator, provide only valid json as response.
# Enter expecting result, e.g. answer, code, shell command, etc.: json
sgpt --role json "random: user, password, email, address"
{
"user": "JohnDoe",
"password": "p@ssw0rd",
"email": "[email protected]",
"address": {
"street": "123 Main St",
"city": "Anytown",
"state": "CA",
"zip": "12345"
}
}
Note that all previous chats which were created in previous version of ShellGPT will not work with this new version.
Published by TheR1D over 1 year ago
This release includes several backend optimizations:
Published by TheR1D over 1 year ago
This versatile feature is particularly useful when you need to pass file content or pipe output from other commands to the GPT models for summarization or analysis. For example, you can easily generate a git commit message based on a diff:
git diff | sgpt "Generate git commit message, for my changes"
# -> Commit message: Implement Model enum and get_edited_prompt()
This powerful feature simplifies the process of managing and understanding data from different sources, making it easier for you to focus on what really matters: improving your projects and applications.
Published by TheR1D over 1 year ago
You can change color of OpenAI completion by changing DEFAULT_COLOR
in ~/.config/shell_gpt/.sgptrc
or $DEFAULT_COLOR
env, possible options: black, red, green, yellow, blue, magenta, cyan, white, bright_black, bright_red, bright_green, bright_yellow, bright_blue, bright_magenta, bright_cyan, bright_white.
...
DEFAULT_COLOR=magenta
Published by TheR1D over 1 year ago
Note that GPT-4 currently in private beta, if you don't have access, you will get 404 error.
Published by TheR1D over 1 year ago
$SHELL
command execution instead of default /bin/sh
.Published by TheR1D over 1 year ago
New awesome REPL mode for chat sessions. To start a chat session in REPL mode, use the --repl
option followed by a unique session name. You can also use "temp" as a session name to start a temporary REPL session. Note that --chat
and --repl
are using same chat sessions, so you can use --chat
to start a chat session and then use --repl
to continue the conversation in REPL mode. REPL mode will also show history of your conversation in the beginning. REPL mode can work with --shell
and --code
options, which makes it very handy for interactive shell commands and code generation.