Skip to content

1.2.0

Compare
Choose a tag to compare
@TheR1D TheR1D released this 28 Jan 04:33
c48926a
  • Added --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.
  • Fixed issue with stdin and --shell not switching to interactive input mode.
  • REPL mode now can accept stdin or PROMPT argument, or both.
  • Changed shell integrations to use new --no-interaction to generate shell commands.
  • Moved shell integrations into dedicated file integration.py.
  • Changed --install-integration logic, will not download sh script anymore.
  • Removed validation for PROMPT argument, now will be empty string by default.
  • Fixing an issue when sgpt is being called from non-interactive shell environments such as cron tab.
  • Fixed and optimised Dockerfile.
  • GitHub codespaces setup.
  • Improved tests.
  • README.md improvements.
  • New demo video 🐴.

❗️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.

ShellGPT.mp4

REPL stdin

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: 1.1.0...1.2.0