1.2.0
版本发布时间: 2024-01-28 12:33:52
TheR1D/shell_gpt最新发布版本:1.4.4(2024-08-11 07:32:04)
- 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 instancesgpt -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.
https://github.com/TheR1D/shell_gpt/assets/16740832/9197283c-db6a-4b46-bfea-3eb776dd9093
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: https://github.com/TheR1D/shell_gpt/compare/1.1.0...1.2.0
1、 shell_gpt-1.2.0-py3-none-any.whl 27.79KB
2、 shell_gpt-1.2.0.tar.gz 37.03KB