Skip to content

Latest commit

 

History

History
147 lines (98 loc) · 3.53 KB

INSTALLATION.md

File metadata and controls

147 lines (98 loc) · 3.53 KB

📦 Installation

Welcome! AutoGPT offers seamless integration with both Cargo and Docker for easy installation and usage.

📦 Install From Registry

⚓ Using Cargo

To install AutoGPT CLI via Cargo, execute the following command:

cargo install autogpt --all-features

🐳 Using Docker

To install and run the AutoGPT CLI via Docker, use the following command:

docker run -it -e GEMINI_API_KEY=<your_gemini_api_key> --rm --name autogpt kevinrsdev/autogpt:0.0.1

📦 Build From Source

Fork/Clone The Repo:

git clone https://github.com/kevin-rs/autogpt.git

Navigate to the autogpt directory:

cd autogpt

⚓ Using Cargo

To run AutoGPT CLI via Cargo, execute:

cargo run --all-features

🐳 Using Docker

Build the Docker container:

docker build -t autogpt .

Run the container:

docker run -i -e GEMINI_API_KEY=<your_gemini_api_key> -t autogpt:latest

Now, you can attach to the container:

$ docker ps
CONTAINER ID   IMAGE            COMMAND                  CREATED         STATUS         PORTS     NAMES
95bf85357513   autogpt:latest   "/usr/local/bin/auto…"   9 seconds ago   Up 8 seconds             autogpt

$ docker exec -it 95bf85357513 /bin/sh
~ $ ls
workspace
~ $ tree
.
└── workspace
    ├── architect
    │   └── diagram.py
    ├── backend
    │   ├── main.py
    │   └── template.py
    ├── designer
    └── frontend
        ├── main.py
        └── template.py

to stop the current container, open up a new terminal and run:

$ docker stop $(docker ps -q)

🛠️ CLI Usage

The CLI provides a convenient means to interact with the code generation ecosystem. Before utilizing the CLI and or the SDK, your need to set up the necessary environment variables.

Environment Variables Setup

To configure the CLI and or the SDK environment, follow these steps:

  1. Define Workspace Path: Set up the paths for designer, backend, frontend, and architect workspaces by setting the following environment variable:

    export AUTOGPT_WORKSPACE=workspace/

    This variable guide the agents on where to generate the code within your project structure.

  2. API Key Configuration: Additionally, you need to set up the Gemini API key by setting the following environment variable:

    export GEMINI_API_KEY=<your_gemini_api_key>

    To obtain your API key, navigate to Google AI Studio and generate it there. This key allows autogpt to communicate with Gemini API.

  3. DesignerGPT Setup (Optional): To enable DesignerGPT, you will need to set up the following environment variable:

    export GETIMG_API_KEY=<your_getimg_api_key>

    Generate an API key from your GetImg Dashboard.

  4. MailerGPT Setup (Optional): To enable MailerGPT, in addition to these environment variables, you will need to set up the environment:

    export NYLAS_SYSTEM_TOKEN=<Your_Nylas_System_Token>
    export NYLAS_CLIENT_ID=<Your_Nylas_Client_ID>
    export NYLAS_CLIENT_SECRET=<Your_Nylas_Client_Secret>

    Follow this tutorial for a guide on how to obtain these values.

Running Agents

Execute agents to perform tasks using the run command:

autogpt

You can also run AutoGPT CLI using Docker:

docker run -it -e GEMINI_API_KEY=<your_gemini_api_key> --rm --name autogpt kevinrsdev/autogpt:0.0.1