1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 13:22:06 +02:00

sgpt: add page (#10095)

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
This commit is contained in:
Ahmed Sufyan 2023-04-22 17:25:42 +05:30 committed by GitHub
parent bfa1571257
commit fd267f0702
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

28
pages/common/sgpt.md Normal file
View file

@ -0,0 +1,28 @@
# sgpt
> Command-line productivity tool powered by OpenAI's GPT models.
> More information: <https://github.com/TheR1D/shell_gpt#readme>.
- Use it as a search engine, asking for the mass of the sun:
`sgpt "{{mass of the sun}}"`
- Execute Shell commands, and apply `chmod 444` to all files in the current directory:
`sgpt --shell "{{make all files in current directory read only}}"`
- Generate code, solving classic fizz buzz problem:
`sgpt --code "{{solve fizz buzz problem using Python}}"`
- Start a chat session with a unique session name:
`sgpt --chat {{session_name}} "{{please remember my favorite number: 4}}"`
- Start a `REPL` (Read–eval–print loop) session:
`sgpt --repl {{command}}`
- Display help:
`sgpt --help`