pantry/projects/agpt.co/auto-gpt
2023-07-31 11:17:36 -04:00

20 lines
688 B
Bash
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
#FIXME a `git init` type system would be better than a single directory :/
set -e
workspace_directory="${XDG_DOCUMENTS_DIR:-$HOME/Documents}/Auto-GPT"
# if the data|plugins directories dont exist auto-gpt bails
mkdir -p "$workspace_directory"/data "$workspace_directory"/plugins
if ! test -f "$workspace_directory/prompt_settings.yaml"; then
cp "$VIRTUAL_ENV"/../share/prompt_settings.yaml "$workspace_directory"
fi
# change to this directory because auto-gpt assumes it is running
# in its own checkout and is not suitable to be run from anywhere
cd "$workspace_directory"
exec "$VIRTUAL_ENV"/bin/python -m autogpt --workspace-directory="$workspace_directory" "$@"