0.9.1
This release includes several new features, optimizations and bug fixes:
- New input option to describe command when executing using
--shell
. - New CLI option
--describe-shell
or-d
to generate explanation for commands. - Configuration parameter to execute shell commands by default.
- Comment lines (a line starting with #) excluded when parsing
.sgptrc
file. - Max limit of
--temperature
was change to 2. - Hiding API key from tracebacks when
sgpt
crashes. - Fixing a bug when typing
exit()
in REPL mode.
Describe shell commands
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.
Execute commands by default
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.