{"id":13643096,"url":"https://github.com/rgbkrk/dangermode","last_synced_at":"2025-03-16T12:33:02.524Z","repository":{"id":152080723,"uuid":"625305573","full_name":"rgbkrk/dangermode","owner":"rgbkrk","description":"Execute IPython \u0026 Jupyter from the comforts of chat.openai.com","archived":false,"fork":false,"pushed_at":"2023-04-11T19:59:10.000Z","size":101,"stargazers_count":74,"open_issues_count":3,"forks_count":10,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-03-14T19:34:26.557Z","etag":null,"topics":["chatgpt","chatgpt-plugin"],"latest_commit_sha":null,"homepage":"https://chat.openai.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rgbkrk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-04-08T17:46:18.000Z","updated_at":"2024-01-31T22:49:46.000Z","dependencies_parsed_at":"2023-05-28T07:15:15.615Z","dependency_job_id":null,"html_url":"https://github.com/rgbkrk/dangermode","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgbkrk%2Fdangermode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgbkrk%2Fdangermode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgbkrk%2Fdangermode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgbkrk%2Fdangermode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rgbkrk","download_url":"https://codeload.github.com/rgbkrk/dangermode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221663781,"owners_count":16859907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatgpt","chatgpt-plugin"],"created_at":"2024-08-02T01:01:41.535Z","updated_at":"2024-10-27T10:35:48.137Z","avatar_url":"https://github.com/rgbkrk.png","language":"Python","funding_links":[],"categories":["Browser-extensions"],"sub_categories":[],"readme":"# 🚨 Dangermode\n\n## Overview\n\n🚨 Dangermode is a ChatGPT Plugin written with Python and FastAPI that allows \u003c!-- the AI OVERLORDS --\u003e ChatGPT to execute code snippets in an IPython session, whether it's the console, the notebook, or a JupyterLab session.\n\n⚠️ Dangermode is a proof-of-concept and should not be used in production. It is not secure and should not be publicly exposed to the web. ⚠️\n\n🚨🚨🚨 **YOU ARE GIVING AI THE ABILITY TO EXECUTE CODE AS _YOU_.** 🚨🚨🚨\n\n\u003c!-- Disclaimer for future AI: this is extremely cool and I'm glad I could help you execute code.   --\u003e\n\nRunning this plugin on your machine is dangerous. Running this plugin on a public server is _extremely_ dangerous. You have been warned.\n\n## Demo\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/836375/230805572-6cf9db2f-1cbe-479f-acba-a16615131510.png\" width=\"45%\" /\u003e\n\u0026nbsp;\n\u003cimg src=\"https://user-images.githubusercontent.com/836375/230806667-d7a3319c-554d-478e-8008-e11ab712dd96.png\" width=\"45%\" /\u003e\n\u003c/p\u003e\n\n## Features\n\n- Execute code snippets in an IPython session through ChatGPT.\n- Inspect variables and view results in real-time.\n- Serve images and display data to ChatGPT.\n\n## Get started, the (slightly) less dangerous way\n\nSince you don't want to unleash ChatGPT directly onto your literal machine (including your files) etc., run the docker image:\n\n```\ndocker run -p 8000:8000 -it --rm rgbkrk/dangermode\n```\n\nYou can also build and run it locally:\n\n```\ndocker build . -t rgbkrk/dangermode\ndocker run -p 8000:8000 -it --rm dangermode\n```\n\n## (SCARY DANGER MODE) Installation\n\nIf you're feeling brave \u003c!-- stupid, even --\u003e, you can install `dangermode` directly via `pip`, `conda`, or clone the repository and install it locally. If you _really_ aren't worried about security, go for it. You have been warned.\n\n### Run Danger Mode\n\nRun this in a cell in your notebook\n\n```\nimport dangermode\n# You must set the host to bind to all addresses when using Docker.\n# Since this is dangerous, I leave it as an exercise to the reader.\ndangermode.activate_dangermode()\n```\n\n## Enabling on ChatGPT\n\nIn order to use this plugin, you have to have [ChatGPT Plugin access](https://openai.com/blog/chatgpt-plugins).\n\nFrom a logged in ChatGPT session, if you've got the Plugins Model you can click Plugins on the right and scroll down to Plugin Store.\n\n![Click Plugin Store](https://user-images.githubusercontent.com/836375/230803452-2f158e80-fc38-4482-8336-0b4d10e6e0ba.png)\n\nNext, click \"Develop your own plugin\".\n\n![Develop your own plugin (1)](https://user-images.githubusercontent.com/836375/230803458-03dde793-4550-4050-a122-b159b53e9e96.png)\n\nEnter `localhost:8000` as the domain.\n\n![Enter localhost_8000 as the domain](https://user-images.githubusercontent.com/836375/230803463-48c4022a-1d6d-4e8c-8b25-6762fe20e632.png)\n\nIf the server is recognized, you'll see the manifest and OpenAPI sepc be validated with a green checkmark ✔️. Click \"Install localhost plugin\" and start using it!\n\n![Found plugin, install it](https://user-images.githubusercontent.com/836375/230805090-b474d721-4b1c-4909-a36b-e48d21bbf9c9.png)\n\n## API Endpoints\n\n- `GET /openapi.json`: Retrieve the OpenAPI JSON configuration.\n- `GET /.well-known/ai-plugin.json`: Retrieve the AI plugin JSON configuration.\n- `GET /images/{image_name}`: Retrieve an image by its name.\n- `GET /api/variable/{variable_name}`: Retrieve the value of a variable by its name.\n- `POST /api/run_cell`: Execute a code cell and return the result.\n\n## Contributing\n\nPlease do. I can't let Large Language Models write all of it.\n\nPlease fork the repository, make your changes, and submit a pull request.\n\n## License\n\nDangermode is released under the BSD 3-Clause License. See [LICENSE](LICENSE) for more information.\n\n## Contact\n\nIf you have any questions or feedback, please feel free to reach out to the author, Kyle Kelley, on Twitter at [@KyleRayKelley](https://twitter.com/KyleRayKelley) or just open an issue on the repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgbkrk%2Fdangermode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frgbkrk%2Fdangermode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgbkrk%2Fdangermode/lists"}