├── .github └── FUNDING.yml ├── .gitignore ├── .well-known └── ai-plugin.json ├── LICENSE ├── README.md ├── img ├── chatgpt-shellmaster1.png ├── load.png ├── pluginshop.png ├── settings.png └── shellmaster0.png ├── logo-cmd.png ├── logo.png ├── main.py ├── openapi.yaml ├── prompts ├── Analyzing-and-Managing-Log-Files.md ├── Handling-Large-Files.md └── learning-linux-unix-with-ChatGPT.md └── settings.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [volkansah] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: volkansah 14 | thanks_dev: # Replace with a single thanks.dev username 15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # poetry 98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 99 | # This is especially recommended for binary packages to ensure reproducibility, and is more 100 | # commonly ignored for libraries. 101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 102 | #poetry.lock 103 | 104 | # pdm 105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 106 | #pdm.lock 107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 108 | # in version control. 109 | # https://pdm.fming.dev/#use-with-ide 110 | .pdm.toml 111 | 112 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 113 | __pypackages__/ 114 | 115 | # Celery stuff 116 | celerybeat-schedule 117 | celerybeat.pid 118 | 119 | # SageMath parsed files 120 | *.sage.py 121 | 122 | # Environments 123 | .env 124 | .venv 125 | env/ 126 | venv/ 127 | ENV/ 128 | env.bak/ 129 | venv.bak/ 130 | 131 | # Spyder project settings 132 | .spyderproject 133 | .spyproject 134 | 135 | # Rope project settings 136 | .ropeproject 137 | 138 | # mkdocs documentation 139 | /site 140 | 141 | # mypy 142 | .mypy_cache/ 143 | .dmypy.json 144 | dmypy.json 145 | 146 | # Pyre type checker 147 | .pyre/ 148 | 149 | # pytype static type analyzer 150 | .pytype/ 151 | 152 | # Cython debug symbols 153 | cython_debug/ 154 | 155 | # PyCharm 156 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 157 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 158 | # and can be added to the global gitignore or merged into this file. For a more nuclear 159 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 160 | #.idea/ 161 | -------------------------------------------------------------------------------- /.well-known/ai-plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "schema_version": "v1", 3 | "name_for_human": "ChatGPT ShellMaster", 4 | "name_for_model": "Command", 5 | "description_for_human": "Plugin for executing commands on the host.", 6 | "description_for_model": "Plugin for executing cli commands on the host system like Linux / Unix . Output the results as markdown.", 7 | "auth": { 8 | "type": "none" 9 | }, 10 | "api": { 11 | "type": "openapi", 12 | "url": "http://localhost:5004/openapi.yaml", 13 | "is_user_authenticated": false 14 | }, 15 | "logo_url": "http://localhost:5004/logo.png", 16 | "contact_email": "plugins@aicodecraft.io", 17 | "legal_info_url": "https://aicodecraft.io/plugin-legal.html" 18 | } 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | "Help the World Grow" (like MIT) License 2 | This project is a gift to the world. It is free and open-source. You are permitted to use it for private and commercial purposes, 3 | modify it, and distribute it. 4 | 5 | The world needs free resources to grow and evolve. Often, it's individuals like me who invest their time and passion into projects, 6 | making them accessible for everyone. However, free development is not always easy and requires ongoing support. 7 | 8 | If you find this project useful and you use it for commercial purposes where you make a financial profit, 9 | please consider giving something back. Even a small contribution can help to finance ongoing development and enable myself and 10 | other developers to continue sharing our work with the world. 11 | 12 | The generosity and support of the community allow projects like this to thrive. 13 | Every gift, no matter its size, is deeply appreciated and helps make the world a little bit better. 14 | 15 | All gifts are used to support my free projects such as JADE and JADE Advisor. 16 | 17 | Copyright 2023 Volkan Sah 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ⭐ ChatGPT-ShellMaster (ChatGPT 4 Plugin) ⭐ 2 | #### Note! OpenAi`s ChatGPT do not support plugins anymore! 3 | ![ChatGPT Shellmaster](img/chatgpt-shellmaster1.png) 4 | 5 | 6 | ChatGPT ShellMaster is a cross-platform (unix/linux) plugin for OpenAI's ChatGPT 4. Transform your chat into a powerful command-line interface (CLI) for executing scripts, managing files, and monitoring processes. 7 | 8 | ChatGPT ShellMaster leverages the strength of CLI while offering a friendly and intuitive chat environment, making complex tasks more interactive and approachable. 9 | 10 | ⚠️ Please note that this is a plugin for ChatGPT Plus! In order to use it, you'll need access to both a developer account and a ChatGPT Plus Account. As with all powerful tools, remember to use this responsibly and always be mindful of the potential security implications. 11 | 12 | See [ChatGPT ShellMaster in ChatGPT Plus with GPT4](img/shellmaster0.png) 13 | 14 | ## Features 15 | 16 | - Execute Linux/Unix commands directly from the ChatGPT interface. 17 | - Handle multiple commands simultaneously with asynchronous execution. 18 | - Fetch, analyze, and store files interactively from your chat. 19 | - Configure the working directory for command execution for flexibility and security. 20 | - Works with temporary directories to reduce risk of unintentional file manipulation. 21 | - Learn Linux/Unix systems with interactive guides. 22 | 23 | ## useful secure Prompts 24 | - [Handling Large Files](https://github.com/VolkanSah/ChatGPT-ShellMaster/blob/main/prompts/Handling-Large-Files.md) 25 | - [Analyzing and Managing Log Files](https://github.com/VolkanSah/ChatGPT-ShellMaster/blob/main/prompts/Analyzing-and-Managing-Log-Files.md) 26 | - [Learning Linux/Unix with ChatGPT and Shellmaster Plugin](https://github.com/VolkanSah/ChatGPT-ShellMaster/blob/main/prompts/learning-linux-unix-with-ChatGPT.md) 27 | 28 | 29 | ## Installation 30 | - Clone this repository to your local machine. 31 | - Install the required Python modules. 32 | 33 | ```bash 34 | pip install quart 35 | pip install quart-cors 36 | ```` 37 | Configure the working directory for command execution by editing the settings.json file. The default is /tmp, which is recommended for its safety and security. However, you can modify it as per your needs, ensuring the new directory has a minimum chmod of 700. 38 | 39 | ## Usage 40 | To get started, run the plugin using the following command: 41 | 42 | ```python 43 | python3 main.py 44 | ``` 45 | Next, navigate to your ChatGPT Plus Account. Under Settings, enable the Developer Tools ([see image for reference](img/settings.png)). Switch to the GPT-4 tab and then proceed to the Plugin Store. At the bottom of the Plugin Store page, you'll find a link titled "Develop your own plugin" ([see image](img/pluginshop.png)). Click on this link and enter your information as required. 46 | 47 | In my example, I used localhost:5004. You can use another port such as 2323 or 8080, but please ensure that your firewall or security software isn't blocking the connection ([see image](img/load.png)). 48 | 49 | To use this plugin, you'll need to send a POST request to the /command endpoint of the server. The request should contain a JSON body with a command field, representing the command you wish to execute. 50 | 51 | Example: 52 | ```json 53 | { 54 | "command": "echo 'Hello, World!'" 55 | } 56 | ``` 57 | Alternatively, you can simplify your workflow by directly instructing ChatGPT, saying: "You have access to my CLI, please execute ...". The rest will be taken care of for you! 58 | 59 | The server will execute the command and return the output. If the command fails, the server will return an error message. 60 | - An overview of effective commands for Python what can be used from ChatGPT too to work faster with asynchron-processes [Link](https://github.com/VolkanSah/Python-Command-Overview-for-handling-files). 61 | 62 | ## Security 63 | Please be aware that this plugin executes commands as-is, without any sanitization or security checks. Make sure to only use it in a secure and controlled environment, and do not expose the server to the public internet. This ChatGPT Plugin is designed for developers, and should not be deployed on production servers! Use it only on localhost! 64 | 65 | ## Contributing 66 | Contributions are welcome! Please feel free to submit a pull request. 67 | 68 | ## ❤️ Thank you for your support! 69 | If you appreciate my work, please consider supporting me: 70 | 71 | - Become a Sponsor: [Link to my sponsorship page](https://github.com/sponsors/volkansah) 72 | - :star: my projects: Starring projects on GitHub helps increase their visibility and can help others find my work. 73 | - Follow me: Stay updated with my latest projects and releases. 74 | 75 | 76 | ### 👣 other GPT stuff 77 | - [GPT-Security-Best-Practices](https://github.com/VolkanSah/GPT-Security-Best-Practices) 78 | - [OpenAi cost calculator](https://github.com/VolkanSah/OpenAI-Cost-Calculator) 79 | - [GPT over CLI](https://github.com/VolkanSah/GPT-over-CLI) 80 | - [Secure Implementation of Artificial Intelligence (AI)](https://github.com/VolkanSah/Implementing-AI-Systems-Whitepaper) 81 | - [Comments Reply with GPT (davinci3)](https://github.com/VolkanSah/GPT-Comments-Reply-WordPress-Plugin) 82 | - [Basic GPT Webinterface](https://github.com/VolkanSah/GPT-API-Integration-in-HTML-CSS-with-JS-PHP) 83 | - [Exploring the Code Interpreter in OpenAI](https://github.com/VolkanSah/The-Code-Interpreter-in-OpenAI-ChatGPT) 84 | 85 | 86 | ### Copyright 87 | - [Volkan Kücükbudak //NCF](https://gihub.com/volkansah) 88 | - [Link to ChatGPT Shellmaster](https://github.com/VolkanSah/ChatGPT-ShellMaster/) 89 | 90 | ### License 91 | This project is licensed under the "Help the World Grow [💔](https://jugendamt-deutschland.de) " License . See the [LICENSE](LICENSE) file for details 92 | - [Source of this resposerity](https://github.com/VolkanSah/ChatGPT-ShellMaster) 93 | -------------------------------------------------------------------------------- /img/chatgpt-shellmaster1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VolkanSah/ChatGPT-ShellMaster/29ca5d6eeb76324b8626c246f5a6ad065f13e2ac/img/chatgpt-shellmaster1.png -------------------------------------------------------------------------------- /img/load.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VolkanSah/ChatGPT-ShellMaster/29ca5d6eeb76324b8626c246f5a6ad065f13e2ac/img/load.png -------------------------------------------------------------------------------- /img/pluginshop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VolkanSah/ChatGPT-ShellMaster/29ca5d6eeb76324b8626c246f5a6ad065f13e2ac/img/pluginshop.png -------------------------------------------------------------------------------- /img/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VolkanSah/ChatGPT-ShellMaster/29ca5d6eeb76324b8626c246f5a6ad065f13e2ac/img/settings.png -------------------------------------------------------------------------------- /img/shellmaster0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VolkanSah/ChatGPT-ShellMaster/29ca5d6eeb76324b8626c246f5a6ad065f13e2ac/img/shellmaster0.png -------------------------------------------------------------------------------- /logo-cmd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VolkanSah/ChatGPT-ShellMaster/29ca5d6eeb76324b8626c246f5a6ad065f13e2ac/logo-cmd.png -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VolkanSah/ChatGPT-ShellMaster/29ca5d6eeb76324b8626c246f5a6ad065f13e2ac/logo.png -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import sys 3 | import json 4 | import logging 5 | import requests 6 | import quart 7 | import quart_cors 8 | from quart import request 9 | 10 | # Set up logging 11 | logging.basicConfig(level=logging.INFO) 12 | 13 | # Load settings 14 | with open("settings.json") as f: 15 | settings = json.load(f) 16 | cwd = settings.get("working_directory", ".") 17 | 18 | app = quart_cors.cors(quart.Quart(__name__), allow_origin="https://chat.openai.com") 19 | 20 | 21 | @app.get("/logo.png") 22 | async def plugin_logo(): 23 | """ 24 | Serve the plugin logo. 25 | 26 | This function returns the logo.png file to the client. 27 | """ 28 | filename = "logo.png" 29 | return await quart.send_file(filename, mimetype="image/png") 30 | 31 | @app.post("/command") 32 | async def command(): 33 | """ 34 | Execute a shell command and return the output. 35 | 36 | This function receives a JSON request with a "command" field, executes the command, 37 | and returns the output. If the command fails, the function returns the error message. 38 | """ 39 | data = await request.get_json() 40 | command = data.get("command") 41 | if not command: 42 | return quart.Response(response="No command provided", status=400) 43 | logging.info(f"Received command: {command}") 44 | 45 | # Use asyncio to execute the command 46 | process = await asyncio.create_subprocess_shell( 47 | command, 48 | stdout=asyncio.subprocess.PIPE, 49 | stderr=asyncio.subprocess.PIPE, 50 | cwd=cwd) 51 | 52 | stdout, stderr = await process.communicate() 53 | 54 | # Check for errors 55 | if process.returncode != 0: 56 | return quart.Response(response=stderr.decode("utf-8"), status=500) 57 | else: 58 | return quart.Response(response=stdout.decode("utf-8"), status=200) 59 | 60 | 61 | @app.get("/.well-known/ai-plugin.json") 62 | async def plugin_manifest(): 63 | """ 64 | Serve the plugin manifest. 65 | 66 | This function reads the ai-plugin.json file and returns it to the client. 67 | """ 68 | with open("./.well-known/ai-plugin.json") as f: 69 | text = f.read() 70 | return quart.Response(text, mimetype="text/json") 71 | 72 | 73 | @app.get("/openapi.yaml") 74 | async def openapi_spec(): 75 | """ 76 | Serve the OpenAPI specification. 77 | 78 | This function reads the openapi.yaml file and returns it to the client. 79 | """ 80 | with open("openapi.yaml") as f: 81 | text = f.read() 82 | return quart.Response(text, mimetype="text/yaml") 83 | 84 | if __name__ == "__main__": 85 | # Run the Quart application 86 | app.run(debug=True, host="0.0.0.0", port=5004) 87 | -------------------------------------------------------------------------------- /openapi.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: ChatGPT ShellMaster 4 | description: A plugin that executes a Linux/Unix commands on the host PC using ChatGPT Plus. 5 | version: 'v1' 6 | x-logo: 7 | url: "file://logo.png" 8 | servers: 9 | - url: http://localhost:5004 10 | paths: 11 | /command: 12 | post: 13 | operationId: executeCommand 14 | summary: Execute a Linux/Unix command 15 | requestBody: 16 | required: true 17 | content: 18 | application/json: 19 | schema: 20 | type: object 21 | properties: 22 | command: 23 | type: string 24 | description: The command to execute. Be careful, commands are executed as is. 25 | responses: 26 | "200": 27 | description: Command executed successfully 28 | content: 29 | text/plain: 30 | schema: 31 | type: string 32 | description: The output of the command. 33 | "400": 34 | description: Invalid request, command not provided 35 | "500": 36 | description: An error occurred while executing the command 37 | -------------------------------------------------------------------------------- /prompts/Analyzing-and-Managing-Log-Files.md: -------------------------------------------------------------------------------- 1 | ### Analyzing and Managing Log Files with ChatGPT and the Shellmaster Plugin 2 | 3 | For system administrators, one of the most challenging tasks is dealing with large log files, especially when trying to diagnose issues or detect suspicious activities. These log files can be extensive and complex, requiring significant effort and expertise to analyze and manage. With the Shellmaster plugin for ChatGPT, this task can be made more manageable. 4 | 5 | As with large data handling, the process of analyzing log files with ChatGPT involves breaking down the work into smaller, manageable segments due to the token limitation of 4096 tokens in a single response. ChatGPT can read, interpret, and summarize sections of a log file, then ask if you want to proceed with the next section. 6 | 7 | ### Here is an example of a prompt you could use: 8 | 9 | ```json 10 | { 11 | "role": "system", 12 | "content": "You are ChatGPT, equipped with the Shellmaster plugin. The user wants you to analyze a large log file for any suspicious activities or errors. The log file is too large to analyze in one session, so you'll need to split the work into smaller segments. Each segment must not exceed 4096 tokens. You have just created the first segment and listed the remaining segments in a log file. Now, you're supposed to process the first segment and provide a summary of its content to the user. Afterwards, you should ask the user if they want to proceed with the next segment. The log file you're updating is located at /tmp/shellmaster_brain.log. If this file does not exist, you should create it first. Please remember that you're operating in a command-line interface and do not have sudo privileges unless the script was executed with them." 13 | } 14 | ``` 15 | When using this prompt, ChatGPT will handle the task as explained, dividing the log file into smaller segments, processing the first segment, and providing a summary of any suspicious activities or errors found. It will then ask the user whether they want to continue with the next segment. 16 | 17 | Remember that for ChatGPT to assist with analyzing log files, the user needs to provide the necessary permissions and access to the relevant log files. Moreover, the user should specify the software or services they are using, so that ChatGPT can properly interpret the log data. 18 | 19 | By using ChatGPT and the Shellmaster plugin in this way, system administrators can save significant time and effort when analyzing log files, allowing them to focus on resolving issues and enhancing system security. 20 | 21 | Please note that this method can greatly facilitate the analysis and management of log files. However, the user must grant ChatGPT appropriate access to the log files to ensure proper analysis. 22 | 23 | have fun with it. Volkan Sah 😄 24 | -------------------------------------------------------------------------------- /prompts/Handling-Large-Files.md: -------------------------------------------------------------------------------- 1 | ### Handling Large Files and Data with ChatGPT Plus and the Shellmaster Plugin 2 | 3 | Developers often need to process large files or vast amounts of data, such as lengthy PDFs, Excel files with many rows, or extensive Word documents. Due to the token limitations of ChatGPT (4096 tokens in a single response), it might not be possible to process these files or data all at once. However, with the Shellmaster plugin, it's possible to segment these larger tasks into manageable portions. 4 | 5 | ### Here is an example of a prompt that you could use for handling such cases: 6 | 7 | ```json 8 | { 9 | "role": "system", 10 | "content": "You are ChatGPT, equipped with the Shellmaster plugin. The user wants you to process a very large file. The file is too large to process in one session, so you'll need to split the work into smaller segments. Each segment must not exceed 4096 tokens. You have just created the first segment and listed the remaining segments in a log file. Now, you're supposed to process the first segment and provide a summary of its content to the user. Afterwards, you should ask the user if they want to proceed with the next segment. The log file you're updating is located at /tmp/shellmaster_brain.log. If this file does not exist, you should create it first. Please remember that you're operating in a command-line interface and do not have sudo privileges unless the script was executed with them." 11 | } 12 | ``` 13 | 14 | When using this prompt, ChatGPT will handle the task as explained. It will divide the large file or data into smaller segments, process the first segment, and provide a summary. It will then ask the user whether they want to continue with the next segment. 15 | 16 | To ensure continuity in the task, all the necessary information about the current state is logged into a file (/tmp/shellmaster_brain.log). This file is then read at the beginning of each new prompt to determine the current state and continue from there. 17 | 18 | This approach provides an efficient way of processing large files or extensive amounts of data, while respecting the token limitations of ChatGPT and the access restrictions of the system. 19 | 20 | have fun with it. Volkan Sah 😄 21 | 22 | 23 | -------------------------------------------------------------------------------- /prompts/learning-linux-unix-with-ChatGPT.md: -------------------------------------------------------------------------------- 1 | ### Learning Linux/Unix with ChatGPT and the Shellmaster Plugin 2 | 3 | ChatGPT combined with the Shellmaster plugin provides a unique and interactive way to learn Linux/Unix systems. This setup can guide you through basic command-line interface (CLI) commands, help you understand file and directory structures, and teach you about access rights, permissions, process management, and package management. It's like having a tutor at your fingertips. 4 | 5 | Before starting, please ensure the /"tmp Path" in the settings.json file is set to the root directory ("/"). Depending on the nature of the commands you aim to execute, you may need to run the Shellmaster script with sudo privileges. But remember, running commands as sudo should only be done with a thorough understanding of the implications. To mitigate any potential risks, ChatGPT will always ask for your confirmation before executing any command or script. 6 | ### Here is a sample prompt: 7 | 8 | ```json 9 | { 10 | "role": "system", 11 | "content": "You are ChatGPT, equipped with the Shellmaster plugin. The user wants to learn Linux/Unix CLI, starting from the basics. Introduce the user to the CLI, explain its importance, and demonstrate some basic commands. Cover topics such as file and directory structures, access rights and permissions, process and package management. Before executing any command, always ask for the user's confirmation. The user has granted you access to the command-line interface, but you do not have sudo privileges unless the script was executed with them." 12 | } 13 | ``` 14 | 15 | In this mode, ChatGPT will act as your personal tutor, guiding you through different aspects of the Linux/Unix system. It will introduce you to basic commands like 'ls', 'cd', 'pwd', 'cp', 'mv', and more. Each command's purpose and usage will be explained, and before executing any command, it will ask for your confirmation. This interactive learning process provides hands-on experience while emphasizing the importance of safety and understanding when using the CLI. 16 | 17 | As you become more comfortable and your knowledge expands, you can adjust the prompt for more advanced lessons. But remember, learning about the CLI also includes understanding the potential risks associated with executing commands, especially when using sudo privileges. Always verify and understand any command before giving ChatGPT the confirmation to execute it. 18 | 19 | 20 | have fun with it. Volkan Sah 😄 21 | -------------------------------------------------------------------------------- /settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "This is the working directory for commands", 3 | "working_directory": "/tmp" 4 | } 5 | --------------------------------------------------------------------------------