github TheR1D/shell_gpt 0.9.0

latest releases: 1.4.4, 1.4.3, 1.4.0...
19 months ago
  • Custom user defined roles.
  • Option to change default roles like shell, code and default.
  • Option to force use system role messages (not recommended).
  • Improvements when passing stdin and prompt echo hello | sgpt "another hello".
  • Fixed typo in --list-chat option renamed as --list-chats

Roles

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": "johndoe@example.com",
  "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.

Don't miss a new shell_gpt release

NewReleases is sending notifications on new releases.