AutoGPT
AutoGPT copied to clipboard
Formalize Bash, Batch Scripts, Add PowerShell Script
Background
I noticed that the base scripts where pretty basic, and springboard functionality directly into python without many sanity checks on arguments, declaring defaults, or really much of anything. Although argument parsing functionality is included in the autogpt/cli.py script itself via click, I felt it more 'robust' to create a compatible runboard that works cross-platform before python even gets called to validate things with the python environment. I find this approach to be more stable and compatible, so I decided to open up this PR to help stabilize the runscripts.
This PR is currently A DRAFT. If you wish to contribute to it, feel free! I will leave it open for a while to see how the community thinks about it.
Changes
- Updated
run.shwith full POSIX-compliant command line parser, usage screen and ANSI compatible colors via the use of tput. - Updated
run.batand formalize to embedded WIndows Server standards, with the same changes mentioned above. - Added
run.ps1, a Powershell runscript that meets the same specifications mentioned - Extra functionality to run python inside of a virtualenv environment provides another convenient option, in these new scripts. Virtualenv support was not included, and now is via activate and deactivate commands that call upon the environment. The user also gets to specify the path of the virtual environment to use.
- I also found some problems with some of the plugins suggested to be installed. So I installed them all, then froze
requirements.txtinto the base repository, this should simplify everything you need and saves the user download time later. - A minor fix was applied to
.gitignoreto ignore__pycache__folders explicitly in subfolders - A fix was applied to
docker-compose.ymlso that the redis volume persists across docker runs, and saves correctly with the--appendonlyRedis-Server option.
Draft Contribution Suggestions
- Test it? Does it work, or display any errors on your machine?
- Improve it? Do you have a suggestion to improve the run scripts, or make them even more stable?
- Feedback? I'm happy to take this in before it goes into a live PR. Do you find this useful or beneficial to compatibility?
Documentation
I provide code comments in all of my script functions that explains what is happening. My code is very modular and easy to look at and maintain.
Test Plan
This was tested in the following environments:
- WSL (windows subsystem for Linux) -- for the
run.shchanges, on Ubuntu 22.04 LTS - Native Windows 11 / Windows 10 -- for the
run.ps1addition, on Powershell 7.3.4 - Windows Server 2022 for embedded systems for the
run.batupdates
PR Quality Checklist
- [ ] My pull request is atomic and focuses on a single change.
- [x] I have thoroughly tested my changes with multiple different prompts.
- [x] I have considered potential risks and mitigations for my changes.
- [x] I have documented my changes clearly and comprehensively.
- [ ] I have not snuck in any "extra" small tweaks changes
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| docs | ⬜️ Ignored (Inspect) | May 6, 2023 1:29pm |
This PR exceeds the recommended size of 200 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size
I also found some problems with some of the plugins suggested to be installed. So I installed them all, then froze requirements.txt into the base repository, this should simplify everything you need and saves the user download time later.
Can you expand on this? it may fit better in the plugins repo
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.