fragments

(★ 6,369)

Open-source Next.js template for building apps that are fully generated by AI. By E2B.

File Explorer

  • .env.template
  • .eslintrc.json
  • .gitignore
  • .prettierrc
  • CODEOWNERS
  • components.json
  • LICENSE
  • middleware.ts
  • next.config.mjs
  • package-lock.json
  • package.json
  • postcss.config.mjs
  • README.md
  • renovate.json5
  • tailwind.config.ts
  • tsconfig.json

# Installation Guide

node
Prerequisites

Setup Steps

git clone https://github.com/e2b-dev/fragments.git

Clone the repository locally.

cd fragments

Navigate to the project directory.

cp .env.template .env.local

Create the local environment configuration file.

npm i

Install project dependencies.

npm run dev

Start the development server.

npm run build

Build the application for production.

Key Commands

npm i

Install package dependencies.

npm run dev

Start the local development server.

npm run build

Generate a production build.

You must configure E2B_API_KEY and your LLM provider API keys in the .env.local file.

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

git clone

View Details ▼

Clone an existing repository.

git clone {{remote_repository_location}} {{path/to/directory}}

Clone an existing repository into a new directory (the default directory is the repository name):

git clone --recursive {{remote_repository_location}}

Clone an existing repository and its submodules:

git clone {{[-n|--no-checkout]}} {{remote_repository_location}}

Clone only the `.git` directory of an existing repository:

🔍

npm run

View Details ▼

Run a script.

npm run

List available scripts:

npm run {{script_name}}

Run a script:

npm run {{script_name}} -- {{argument}} {{--option}}

Pass arguments to a script:

🔍

npm

View Details ▼

JavaScript and Node.js package manager.
Manage Node.js projects and their module dependencies.
Some subcommands such as `install`, `run`, etc. have their own usage documentation.

npm init {{[-y|--yes]}}

Create a `package.json` file with default values (omit `--yes` to do it interactively):

npm {{[i|install]}}

Download all the packages listed as dependencies in `package.json`:

npm {{[i|install]}} {{package_name}}@{{version}}

Download a specific version of a package and add it to the list of dependencies in `package.json`:

🔍

streamlit

View Details ▼

Framework for creating interactive, data-driven web apps in Python.

streamlit hello

Check for the Streamlit installation:

streamlit run {{project_name}}

Run a Streamlit application:

streamlit --help

Display help:

// repository documentation