Here’s a detailed step-by-step guide on how to set up and run the Fragments project by E2B on Windows:

Prerequisites
Before you begin, ensure you have the following installed on your Windows machine:
- Git: Download and install from https://git-scm.com/download/win
- Node.js and npm: Download and install the LTS version from https://nodejs.org/en/download/
- E2B API Key: Sign up at https://e2b.dev/ to obtain your API key
- LLM Provider API Key: Get Free Gemini API Key >> Gemini API – Google Cloud console
Step-by-Step Guide
1. Clone the Repository
- Open Command Prompt or PowerShell
- Navigate to the directory where you want to clone the project
- Run the following command:
git clone https://github.com/e2b-dev/fragments.git
2. Install Dependencies
- Change into the project directory:
cd fragments
- Install the required dependencies:
npm i
3. Set Environment Variables
- In the project root directory, create a new file named
.env.local
- Open the file in a text editor and add the following content, replacing the placeholder values with your actual API keys:
textE2B_API_KEY="your-e2b-api-key"
OPENAI_API_KEY="your-openai-api-key"
ANTHROPIC_API_KEY="your-anthropic-api-key"
GROQ_API_KEY="your-groq-api-key"
FIREWORKS_API_KEY="your-fireworks-api-key"
TOGETHER_API_KEY="your-together-api-key"
GOOGLE_AI_API_KEY="your-google-ai-api-key"
GOOGLE_VERTEX_CREDENTIALS="your-google-vertex-credentials"
MISTRAL_API_KEY="your-mistral-api-key"
XAI_API_KEY="your-xai-api-key"
Note: You only need to add the API keys for the providers you plan to use.
4. Start the Development Server
- In the Command Prompt or PowerShell, ensure you’re in the project root directory
- Run the following command to start the development server:text
npm run dev
- Open a web browser and navigate to
http://localhost:3000
to view the application