{ "info": { "author": "Nik V", "author_email": "github@nikvdp.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.9" ], "description": "# \ud83d\udd75\ud83e\uddf0 AgentGrunt \ufe0f\n\nUse OpenAI's [Code Interpreter](https://openai.com/blog/chatgpt-plugins#code-interpreter) to edit and commit code across your entire git repo (even non-python repos)!\n\n## Overview\n\nAgentGrunt packs up the following: a codebase you specify, a specially prepared `git` binary that runs well in Code Interpreter's environment, and some prompts and code exploration tools into a single file that you can load into Code Interpreter.\n\nUpload the archive, paste in a two sentence prompt, wait a bit, and then sit back and relax while GPT4.5\\* writes, edit, and commits your code for you. Once GPT has finished making your changes, press `d` from the hotkey menu and ChatGPT will send you a file you can use to apply the commits GPT made (with all their metadata!) directly into your copy of the repo.\n\n

\n \n \n \n

\n\n## Features:\n\n- automatically installs `git` into Code Interpreter and configures it for code exploration\n- built in hotkey menu for easy usage\n- simple, small, and easy to customize.\n\n## Installation\n\n#### Prereqs:\n\n- a valid ChatGPT Plus subscription and Code Interpreter enabled in ChatGPT's settings\n- a working installation of python 3.9 (or newer)\n- a git repository that you'd like Code Interpreter to work on with you\n\nOnce you have those in place, run:\n\n```shell\npip install agentgrunt\n```\n\nIf all goes well running `agentgrunt --help` will output something like this:\n\n```\nUsage: agentgrunt [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n --help Show this message and exit.\n\nCommands:\n bundle Bundle up a local or remote git repo\n custom-instructions Copy ChatGPT custom instructions to the clipboard\n```\n\n## Usage\n\nTo start editing a repo with `agentgrunt` use `agentgrunt`'s `bundle` command:\n\n```shell\nagentgrunt bundle \n```\n\nIt will do some work and then print out some instructions. When the process has completed you'll have a new file called `.tar.gz` in your current folder.\n\nNow do the following:\n\n- Copy the short prompt `agentgrunt` prints out to the clipboard (or just say `y` when prompted if on macOS)\n- Open up ChatGPT and start a new chat in Code Interpreter mode\n- Use the + button to upload the `.tar.gz` file AgentGrunt generated\n- Paste the prompt you copied a second ago into the chatbox and press send\n\nYou'll see ChatGPT start to do some work, and after a few moments you'll be greeted with a message saying \"Code Interpreter is now running AgentGrunt!\" followed by a hotkey menu similar to the below:\n\n```\nc ) continue \nd ) download changes as patch\ndr) download entire repo\nm ) show diff of last change\nr ) refresh/reload agentgrunt\nw ) work autonomously until complete\n? ) show this hotkey list\n```\n\nNow just ask Code Interpreter to make some changes to your repo, and hit `d` when you're finished to download the changes it made to your local copy of the repo!\n\nWhen you want to download the changes you've made to your local copy of the repo, hit `d` and Code Interpreter will send you a `.patch` file that you can apply to your copy of the git repo using the (somewhat esoteric) `git am` command:\n\n```shell\ngit am \n```\n\n## How it works\n\nWhen you ask AgentGrunt to generate a bundle it first downloads a single-file version of the `git` binary from 1bin.org (an older project of mine to make easy to deploy single file binaries of common utilities). Then it clones the repo you point it at into a temporary location location (to avoid bundling up any files that aren't part of the repo, eg `node_modules` folders), copies the `git` binary and some prompts teaching Code Interpreter how to use AgentGrunt's tools into a temp folder and then builds a tarball out of the whole collection.\n\nThe python package contains a [`gpt_tools`](agentgrunt/gpt_tools) folder that gets copied into each bundle AgentGrunt generates. `gpt_tools` includes a prompt for Code Interpreter in the [`README_ai.md`](agentgrunt/gpt_tools/README_ai.md) file, as well as some python functions that are useful for code exploration that Code Interpreter can load and call directly (see [`code_exploration.py`](agentgrunt/gpt_tools/code_exploration.py)).\n\nThis arrangement allows the prompt the user has to paste into ChatGPT to be short and simple. Code Interpreter itself can then extract the longer prompt from README_ai and bootstrap itself from there.\n\n## Caveats and gotchas\n\n- GPT4 makes a lot of mistakes and is easily confused! While AgentGrunt can be genuinely useful, it's not going to be replacing a human dev any time soon. Expect it to require a fair bit of babysitting and handholding to be able to accomplish meaningful tasks.\n- During longer conversations GPT4 tends to forget what it's doing and sometimes stops showing the hotkey menu or that `git` and the tools from `code_exploration.py` functions are available. If this happens, hit `r` or ask it to re-read \"it's\" readme file to refresh its memory.\n- Code Interpreter is subject to a ~2 minute timeout while working autonomously, so for longer running operations you may need to tell it `c` (continue) to have it finish what it was doing\n- Sometimes Code Interpreter sends diff output instead of properly formatting a commit patch, especially if the changes it's made haven't been committed yet. If this happens, use `r` to refresh the prompt, or explicitly direct it to make a commit and then send a patch.\n- Code Interpreter deletes it's workspace files if it's been left idle for too long (seems to be in the ~10-15m range), and when this happens any links to files it may have sent you will stop working. **Make sure to download any patch files it sends you immediately to avoid losing your work!**\n\n## Final thoughts\n\nThis is still early and more of a proof of concept than anything else. That said, even in it's current form it's often genuinely useful! Allowing Code Interpreter to read files and archives in this way also opens the door for lots of interesting applications. AgentGrunt only uses one prompt, but it's easy to imagine more complex tools like this that include a catalogue of prompts that \"daisy-chain\" from each other, am very curious to see what other things people build in this vein!\n\nHattip to [@NickADobos](https://twitter.com/NickADobos)' and his \"[AI zip bomb](https://twitter.com/NickADobos/status/1687938356813180928)\" thread for the inspiration!\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "agentgrunt", "package_url": "https://pypi.org/project/agentgrunt/", "platform": null, "project_url": "https://pypi.org/project/agentgrunt/", "project_urls": null, "release_url": "https://pypi.org/project/agentgrunt/0.1.5/", "requires_dist": [ "typer (>=0.9.0,<0.10.0)", "pydantic (>=2.1.1,<3.0.0)", "plumbum (>=1.8.2,<2.0.0)", "tqdm (>=4.65.0,<5.0.0)", "httpx (>=0.24.1,<0.25.0)" ], "requires_python": ">=3.9", "summary": "", "version": "0.1.5", "yanked": false, "yanked_reason": null }, "last_serial": 19686801, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "blake2b_256": "ec01dd5acee9471e50db75a08389708641e3170d4269e580494e05f5c81513a8", "md5": "80646e96fc9990d9ba9f988991fca00c", "sha256": "d801bd363d45615536e53c7718dd34fd637f88350b10580b0d01677d05747a35" }, "downloads": -1, "filename": "agentgrunt-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "80646e96fc9990d9ba9f988991fca00c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.9", "size": 12715, "upload_time": "2023-08-16T07:07:43", "upload_time_iso_8601": "2023-08-16T07:07:43.804890Z", "url": "https://files.pythonhosted.org/packages/ec/01/dd5acee9471e50db75a08389708641e3170d4269e580494e05f5c81513a8/agentgrunt-0.1.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "blake2b_256": "1929f14e6f54ff95df3049914a2d545d0755bb4c08dd7d2818162090fb1dcbae", "md5": "c52bf8bfe6a64b23630792085bb68a0c", "sha256": "68e5694fe45aabb6ca968156e594cf998415a0a8fe7c1f1e1bf6c967d1b33a38" }, "downloads": -1, "filename": "agentgrunt-0.1.2.tar.gz", "has_sig": false, "md5_digest": "c52bf8bfe6a64b23630792085bb68a0c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.9", "size": 12772, "upload_time": "2023-08-16T07:07:45", "upload_time_iso_8601": "2023-08-16T07:07:45.121740Z", "url": "https://files.pythonhosted.org/packages/19/29/f14e6f54ff95df3049914a2d545d0755bb4c08dd7d2818162090fb1dcbae/agentgrunt-0.1.2.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.3": [ { "comment_text": "", "digests": { "blake2b_256": "0f2b2022f5d4c49eebd64b418f8670308d494debe9e9c116b3e1ca0fb880d42a", "md5": "84ec11aa046379ca77b3db0129dcdac7", "sha256": "c2e70839524542e85cc59f6eaccaaa2656c35ab78547bf7e4add635e03b7b08f" }, "downloads": -1, "filename": "agentgrunt-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "84ec11aa046379ca77b3db0129dcdac7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.9", "size": 12799, "upload_time": "2023-08-16T15:04:31", "upload_time_iso_8601": "2023-08-16T15:04:31.459914Z", "url": "https://files.pythonhosted.org/packages/0f/2b/2022f5d4c49eebd64b418f8670308d494debe9e9c116b3e1ca0fb880d42a/agentgrunt-0.1.3-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "blake2b_256": "b8d3f739d2cf6764f3d4787b3dee73050ccd863b423bd4094d4a407275e36ebc", "md5": "4574ecd2638c57dd3e18c274c90dfe5a", "sha256": "2a514d9252deb949f16be2aa4c6e73c1689e2643c1875df0c69f1d53818bc59f" }, "downloads": -1, "filename": "agentgrunt-0.1.3.tar.gz", "has_sig": false, "md5_digest": "4574ecd2638c57dd3e18c274c90dfe5a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.9", "size": 12945, "upload_time": "2023-08-16T15:04:32", "upload_time_iso_8601": "2023-08-16T15:04:32.570355Z", "url": "https://files.pythonhosted.org/packages/b8/d3/f739d2cf6764f3d4787b3dee73050ccd863b423bd4094d4a407275e36ebc/agentgrunt-0.1.3.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.4": [ { "comment_text": "", "digests": { "blake2b_256": "bdc137605ea07f491f78756f1262ec70314580f16546310a3428d1515394fb95", "md5": "6e61dbbc7c7e0fdedfe0b9fbd70048a7", "sha256": "071a42500556959049b21df16843f815ec377b3e889b0e5fc7b70d0afaf8ba2f" }, "downloads": -1, "filename": "agentgrunt-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "6e61dbbc7c7e0fdedfe0b9fbd70048a7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.9", "size": 14362, "upload_time": "2023-09-06T11:08:13", "upload_time_iso_8601": "2023-09-06T11:08:13.984700Z", "url": "https://files.pythonhosted.org/packages/bd/c1/37605ea07f491f78756f1262ec70314580f16546310a3428d1515394fb95/agentgrunt-0.1.4-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "blake2b_256": "cd0a815f54cba638ba0e613ea6cb6aca0fee067df9ea9fcac6b0dacc71229555", "md5": "bc6a750c20fda9c7155b585845fa849b", "sha256": "66be73de8c2aa0bc52415ae46aa9ce6df0fdbc83c3a435557fa14bcf11b9969e" }, "downloads": -1, "filename": "agentgrunt-0.1.4.tar.gz", "has_sig": false, "md5_digest": "bc6a750c20fda9c7155b585845fa849b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.9", "size": 13920, "upload_time": "2023-09-06T11:08:15", "upload_time_iso_8601": "2023-09-06T11:08:15.713018Z", "url": "https://files.pythonhosted.org/packages/cd/0a/815f54cba638ba0e613ea6cb6aca0fee067df9ea9fcac6b0dacc71229555/agentgrunt-0.1.4.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.5": [ { "comment_text": "", "digests": { "blake2b_256": "3a3a15bc01473aec7321eb44dd00067859c02b8a4eafcdc2d391c4df1a4ff2fc", "md5": "bf04e27dfc1c776d08cf4c59e655c55a", "sha256": "617769f691e4942a6fecd05d110aa9c2c9efc85245cb5860e3fb55491b7bae6e" }, "downloads": -1, "filename": "agentgrunt-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "bf04e27dfc1c776d08cf4c59e655c55a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.9", "size": 14361, "upload_time": "2023-09-10T14:18:43", "upload_time_iso_8601": "2023-09-10T14:18:43.364247Z", "url": "https://files.pythonhosted.org/packages/3a/3a/15bc01473aec7321eb44dd00067859c02b8a4eafcdc2d391c4df1a4ff2fc/agentgrunt-0.1.5-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "blake2b_256": "6679c3f73860bf8b397e7d069ffd486f0bc54b8e6c11b5f02678c47a38d4026f", "md5": "1da8e280f4f02259417b9924f9d38a31", "sha256": "22572f9998c6c05c1c4a3366ca7285d0f490c448d7d81b2e52a3e7a64e8ac745" }, "downloads": -1, "filename": "agentgrunt-0.1.5.tar.gz", "has_sig": false, "md5_digest": "1da8e280f4f02259417b9924f9d38a31", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.9", "size": 13922, "upload_time": "2023-09-10T14:18:45", "upload_time_iso_8601": "2023-09-10T14:18:45.681990Z", "url": "https://files.pythonhosted.org/packages/66/79/c3f73860bf8b397e7d069ffd486f0bc54b8e6c11b5f02678c47a38d4026f/agentgrunt-0.1.5.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "blake2b_256": "3a3a15bc01473aec7321eb44dd00067859c02b8a4eafcdc2d391c4df1a4ff2fc", "md5": "bf04e27dfc1c776d08cf4c59e655c55a", "sha256": "617769f691e4942a6fecd05d110aa9c2c9efc85245cb5860e3fb55491b7bae6e" }, "downloads": -1, "filename": "agentgrunt-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "bf04e27dfc1c776d08cf4c59e655c55a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.9", "size": 14361, "upload_time": "2023-09-10T14:18:43", "upload_time_iso_8601": "2023-09-10T14:18:43.364247Z", "url": "https://files.pythonhosted.org/packages/3a/3a/15bc01473aec7321eb44dd00067859c02b8a4eafcdc2d391c4df1a4ff2fc/agentgrunt-0.1.5-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "blake2b_256": "6679c3f73860bf8b397e7d069ffd486f0bc54b8e6c11b5f02678c47a38d4026f", "md5": "1da8e280f4f02259417b9924f9d38a31", "sha256": "22572f9998c6c05c1c4a3366ca7285d0f490c448d7d81b2e52a3e7a64e8ac745" }, "downloads": -1, "filename": "agentgrunt-0.1.5.tar.gz", "has_sig": false, "md5_digest": "1da8e280f4f02259417b9924f9d38a31", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.9", "size": 13922, "upload_time": "2023-09-10T14:18:45", "upload_time_iso_8601": "2023-09-10T14:18:45.681990Z", "url": "https://files.pythonhosted.org/packages/66/79/c3f73860bf8b397e7d069ffd486f0bc54b8e6c11b5f02678c47a38d4026f/agentgrunt-0.1.5.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }