2026-06-13 13:26:42 +08:00
<p align="center">
2026-06-13 16:53:34 +08:00
<img src="docs/logo-rounded.png" alt="Shumai Logo" width="65" />
2026-06-13 13:26:42 +08:00
</p>
<h1 align="center">Shumai</h1>
<p align="center">
2026-06-13 16:53:34 +08:00
<strong>An open-source platform for all your creative work.</strong>
2026-06-13 13:26:42 +08:00
</p>
2026-06-14 15:24:58 +08:00
<p align="center">
<a target="_blank" href="https://shumai.one/">Website</a> | <a target="_blank" href="https://docs.shumai.one/introduction">Docs</a> | <a target="_blank" href="https://staging.shumai.one">Demo</a>
</p>
2026-06-13 17:44:45 +08:00

2026-06-13 13:26:42 +08:00
## Features
2026-06-21 10:24:23 +08:00
- **S3-Compatible & Local Storage**: Securely store and serve your creative assets using a local filesystem or any S3-compatible cloud storage (AWS S3, Cloudflare R2, MinIO, etc.).
- **Frame-by-Frame Annotations & Comments**: Give precise feedback using frame-specific drawing tools and timestamped comments directly on video and image assets.
- **Secure Sharing & Collections**: Create secure public share links and curated media collections to collaborate with clients and stakeholders.
- **Granular Access Control**: Manage workspace permissions using team-level and project-level role-based access controls.
- **Distributed Transcoding via Temporal**: Offload resource-heavy video transcoding to a background worker pool orchestrated by Temporal.
- **Custom Asset Metadata**: Define and customize dynamic metadata fields tailored to your production pipeline.
2026-06-13 13:26:42 +08:00
2026-06-14 16:10:25 +08:00
#### Shumai Agent
2026-06-13 13:26:42 +08:00
2026-06-21 10:24:23 +08:00
- **Collaborative AI Chat**: Converse with a context-aware AI agent directly within your project workspace.
- **Custom Skills & Tools**: Extend the agent's capabilities by registering custom scripts, tools, and automation skills.
- **Isolated Sandbox Execution**: Run agent-submitted scripts securely within a sandboxed environment.
2026-06-13 13:26:42 +08:00
- **AI-Powered Metadata Autofill**: Automatically generate tags, descriptions, and custom metadata for new assets using Google Gemini.
2026-06-21 10:24:23 +08:00
- **Semantic Search**: Locate assets instantly based on visual or conceptual search queries using vector embeddings.
2026-06-13 13:26:42 +08:00
---
## Installation
2026-06-21 10:24:23 +08:00
Below is a quickstart guide for running Shumai with local storage. For advanced configuration options (including S3-compatible storage and Temporal workflow orchestration), see our [Documentation ](https://docs.shumai.one/getting-started/overview ).
2026-06-13 13:26:42 +08:00
2026-06-21 10:24:23 +08:00
### Option 1: Docker Compose
2026-06-13 13:26:42 +08:00
2026-06-21 10:24:23 +08:00
Docker Compose is the fastest way to get Shumai running. You do not need to clone the repository or install packages manually. Ensure you have [Docker ](https://docs.docker.com/get-docker/ ) and [Docker Compose ](https://docs.docker.com/compose/install/ ) installed, then follow these steps:
1. Create and navigate to a new directory for your configuration and data volumes:
```bash
mkdir shumai && cd shumai
` ``
2. Download the ` docker-compose.yaml` file:
2026-06-13 13:26:42 +08:00
` ``bash
2026-06-13 14:21:56 +08:00
curl -o docker-compose.yaml https://raw.githubusercontent.com/shumaiOne/shumai/main/docker-compose/local/docker-compose.yaml
2026-06-13 13:26:42 +08:00
` ``
2026-06-21 10:24:23 +08:00
3. **Configure Environment Variables (Remote Deployments only):**
2026-06-21 10:44:45 +08:00
If deploying Shumai to a remote server (e.g., AWS EC2, VPS), edit docker-compose.yaml and add AWS_ENDPOINT_URL_S3 under the environment section, setting it to your server's public IP address or domain name (e.g., http://12.34.56.78).
2026-06-21 10:24:23 +08:00
4. Start the services in detached mode:
2026-06-13 13:26:42 +08:00
` ``bash
docker compose up -d
` ``
2026-06-21 10:24:23 +08:00
5. Open your browser and access Shumai at ` http://localhost:3000` (or ` http://<your-server-ip>:3000` for remote deployments).
2026-06-13 13:26:42 +08:00
2026-06-21 10:24:23 +08:00
### Option 2: Install via NPM / Package Manager
2026-06-13 13:26:42 +08:00
2026-06-21 10:24:23 +08:00
Shumai is published as ` @shumai -one/shumai` on NPM. This option allows you to run Shumai globally or locally.
2026-06-13 13:26:42 +08:00
#### Step 1: Start PostgreSQL with pgvector
2026-06-21 10:24:23 +08:00
Shumai requires PostgreSQL with the ` pgvector` extension. Start a pre-configured database container using Docker:
2026-06-13 13:26:42 +08:00
` ``bash
docker run --name shumai_postgres \
-e POSTGRES_USER=shumai \
-e POSTGRES_PASSWORD=shumai_password \
-e POSTGRES_DB=shumai_db \
-p 5432:5432 \
-d pgvector/pgvector:pg18
` ``
2026-06-21 10:24:23 +08:00
#### Step 2: Create a workspace folder
2026-06-13 13:26:42 +08:00
2026-06-21 10:24:23 +08:00
Create a dedicated directory to store your environment configuration and media files (which are saved in a ` ./data` directory by default):
2026-06-13 13:26:42 +08:00
2026-06-21 10:24:23 +08:00
` ``bash
mkdir shumai && cd shumai
` ``
#### Step 3: Install Platform-Specific Dependencies
Make sure the following system dependencies are installed on your host machine before installing Shumai:
| Package | Description | Ubuntu/Debian | Fedora | Arch | macOS |
| :------------- | :------------------------------------------------------ | :------------------------------- | :------------------------------- | :-------------------------------------- | :--------------------- |
| **ffmpeg** | Media transcoding and metadata extraction | ` sudo apt install -y ffmpeg` | ` sudo dnf install -y ffmpeg` | ` sudo pacman -S --noconfirm ffmpeg` | ` brew install ffmpeg` |
| **bubblewrap** | Sandboxing environment for secure AI agent execution | ` sudo apt install -y bubblewrap` | ` sudo dnf install -y bubblewrap` | ` sudo pacman -S --noconfirm bubblewrap` | _NOT REQUIRED_ |
| **socat** | Bidirectional socket relay for sandbox network bridging | ` sudo apt install -y socat` | ` sudo dnf install -y socat` | ` sudo pacman -S --noconfirm socat` | ` brew install socat` |
| **ripgrep** | Fast search tool for workspace security policies | ` sudo apt install -y ripgrep` | ` sudo dnf install -y ripgrep` | ` sudo pacman -S --noconfirm ripgrep` | ` brew install ripgrep` |
> [!NOTE]
> **Ubuntu 24.04+ Note:** These releases restrict unprivileged user namespaces by default. To allow ` bubblewrap` and the sandbox isolation layer to function, disable this restriction:
2026-06-14 17:21:46 +08:00
>
2026-06-21 10:24:23 +08:00
> ` ``bash
> sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
> ` ``
>
> Alternatively, configure an AppArmor profile that grants user namespace creation (` userns`) privileges to the relevant binaries.
#### Step 4: Install Shumai globally
Install Shumai globally using your preferred package manager:
2026-06-14 16:06:35 +08:00
2026-06-13 13:26:42 +08:00
` ``bash
2026-06-21 10:24:23 +08:00
# NPM
2026-06-13 13:26:42 +08:00
npm install -g @shumai-one/shumai
2026-06-21 10:24:23 +08:00
# PNPM
pnpm add -g @shumai-one/shumai
# Bun
bun add -g @shumai-one/shumai
2026-06-13 13:26:42 +08:00
` ``
2026-06-21 10:24:23 +08:00
#### Step 5: Configure Environment Variables
2026-06-13 13:26:42 +08:00
2026-06-21 10:24:23 +08:00
Create a ` .env` file in your workspace folder (` shumai/`) and add the following configuration:
2026-06-13 13:26:42 +08:00
` ``env
DATABASE_URL=postgresql://shumai:shumai_password@localhost:5432/shumai_db?schema=public
2026-06-14 11:04:04 +08:00
BETTER_AUTH_SECRET=ySxs7DxzHDZBbeeHNPEwBuspYwipBqz5Gk5XdBjNhWw=
2026-06-13 13:26:42 +08:00
STORAGE_BACKEND=local
2026-06-18 10:08:31 +08:00
SHUMAI_SERVER_PORT=3000
2026-06-18 10:22:16 +08:00
AWS_ENDPOINT_URL_S3=http://localhost
2026-06-13 13:26:42 +08:00
` ``
2026-06-14 11:04:04 +08:00
> [!NOTE]
2026-06-21 10:24:23 +08:00
> If deploying on a remote server, update ` AWS_ENDPOINT_URL_S3` from ` http://localhost` to your server's public IP address or domain name.
2026-06-14 11:04:04 +08:00
2026-06-21 10:24:23 +08:00
#### Step 6: Run Shumai
2026-06-13 13:26:42 +08:00
2026-06-21 10:24:23 +08:00
Start the application from your workspace folder:
2026-06-13 13:26:42 +08:00
` ``bash
shumai
` ``
2026-06-21 10:34:15 +08:00
Alternatively, you can run and manage Shumai in daemon mode:
- **Start in daemon mode**:
` ``bash
shumai -d
` ``
- **Stop Shumai**:
` ``bash
shumai stop
` ``
- **Restart Shumai**:
` ``bash
shumai restart
` ``
- **Show/tail logs**:
` ``bash
shumai logs
` ``
2026-06-21 10:24:23 +08:00
On startup, Shumai will automatically run database migrations and start the web server at ` http://localhost:3000`.
2026-06-13 13:26:42 +08:00
---
2026-06-21 10:24:23 +08:00
### Option 3: Run from Source (Development)
2026-06-13 13:26:42 +08:00
2026-06-21 10:24:23 +08:00
To set up Shumai locally for development:
2026-06-13 13:26:42 +08:00
1. Clone the repository and install dependencies:
` ``bash
git clone https://github.com/shumaiOne/shumai.git
cd shumai
bun install
` ``
2026-06-21 10:24:23 +08:00
2. Start the ` pgvector` database container (as described in **Option 2, Step 1**).
3. Create a ` .env` file at the root of the workspace using the configuration from **Option 2, Step 5**.
4. Apply the database schema migrations:
2026-06-13 13:26:42 +08:00
` ``bash
bun run db:migrate
` ``
2026-06-21 10:24:23 +08:00
5. Start the local development server:
2026-06-13 13:26:42 +08:00
` ``bash
bun run dev
` ``
---
2026-06-21 21:56:52 +08:00
## Command Line Interface (CLI)
Shumai provides a Command Line Interface (CLI) tool to manage projects, folders, and assets, upload files/folders, and create new versions directly from your terminal.
For more details on installation and usage, see the [CLI Readme ](apps/cli/README.md ).