LightRAG WebUI is a React-based web interface for interacting with the LightRAG system. It provides a user-friendly interface for querying, managing, and exploring LightRAG's functionalities.
-
Install Bun:
If you haven't already installed Bun, follow the official documentation: https://bun.sh/docs/installation
-
Install Dependencies:
In the
lightrag_webuidirectory, run the following command to install project dependencies:bun install --frozen-lockfile
-
Build the Project:
Run the following command to build the project:
bun run build
This command will bundle the project and output the built files to the
lightrag/api/webuidirectory.
If Bun is unavailable or the Bun build fails in your environment (e.g., older Linux distributions, restricted environments, or Bun version incompatibilities), you can use Node.js instead:
npm install
npm run buildNote: Tests (
bun test) still require Bun. All other scripts (dev,build,preview,lint) work with both Bun and Node.js/npm.
-
Start the Development Server:
# With Bun bun run dev # With Node.js/npm npm run dev
The following are some commonly used script commands defined in package.json:
| Command | Description |
|---|---|
bun run dev / npm run dev |
Starts the development server |
bun run build / npm run build |
Builds the project for production |
bun run lint / npm run lint |
Runs the linter |
bun run preview / npm run preview |
Previews the production build |
bun run build:bun |
Builds using Bun runtime explicitly |
bun test |
Runs tests (Bun only) |
This can happen due to Bun version incompatibilities or restricted environments. Try:
npm install
npm run buildThis error occurred in older versions when the Vite config used a TypeScript path alias (@/) that only Bun could resolve at config load time. This has been fixed by using a relative import in vite.config.ts.