Skip to content

Quickstart

This document is for readers deploying CollabVibe and running it end-to-end for the first time. The goal is to complete the shortest path to:

  • install dependencies
  • configure environment variables
  • prepare the API backend command and workspace
  • start the service
  • validate the message and card path in Feishu

1. Prerequisites

ItemDescription
Node.jsRequired to run tsx, VitePress, and test scripts
npm / pnpm compatible environmentThe current repository exposes scripts via npm run
Local filesystemStores data/, config, logs, SQLite, and workspace state
Feishu app credentialsRequired for the current primary platform
Backend executable commandFor example codex app-server
bash
node -v
npm -v

2. Install dependencies

bash
npm install

3. Prepare environment variables

Start from the existing environment template or your deployment environment variables. At minimum, prepare the following values:

VariableRequiredPurpose
FEISHU_APP_IDYesFeishu app ID
FEISHU_APP_SECRETYesFeishu app secret
FEISHU_SIGNING_SECRETNoEvent signature validation; usually optional in Stream mode
FEISHU_ENCRYPT_KEYNoEncrypted-event support
CODEX_APP_SERVER_CMDRecommendedBackend start command
COLLABVIBE_WORKSPACE_CWDRecommendedWorkspace root directory
CODEX_SANDBOXNoDefault sandbox policy
CODEX_APPROVAL_POLICYNoDefault approval policy
APPROVAL_TIMEOUT_MSNoApproval timeout
COLLABVIBE_STREAM_PERSIST_WINDOW_MSNoStreaming persist window for Path B
COLLABVIBE_STREAM_PERSIST_MAX_WAIT_MSNoStreaming persist max wait
COLLABVIBE_STREAM_PERSIST_MAX_CHARSNoEarly persist flush threshold
COLLABVIBE_STREAM_UI_WINDOW_MSNoStreaming UI flush window
COLLABVIBE_STREAM_UI_MAX_WAIT_MSNoStreaming UI max wait
COLLABVIBE_STREAM_UI_MAX_CHARSNoEarly UI flush threshold
PORTNoService listening port
SYS_ADMIN_USER_IDSRecommendedInitial system administrator IDs
bash
cp .env.example .env
dotenv
FEISHU_APP_ID=cli_xxx
FEISHU_APP_SECRET=xxx
CODEX_APP_SERVER_CMD=codex app-server
COLLABVIBE_WORKSPACE_CWD=/abs/path/to/workspace
SYS_ADMIN_USER_IDS=ou_xxx
PORT=3100

These stream tuning variables are optional. In most deployments, keep the defaults unless you need to reduce burst frequency or improve perceived latency for high-volume turns.

4. Prepare local directories

Runtime depends on the following directories:

PathDescription
collabvibe.dbMain SQLite database
config/Backend configuration directory
logs/Runtime logs
COLLABVIBE_WORKSPACE_CWDRoot of the code workspace
bash
mkdir -p config logs
mkdir -p /abs/path/to/workspace

5. Start the service

Development mode:

bash
npm run start:dev

Production mode:

bash
npm run start

Documentation preview:

bash
npm run docs:dev

6. Complete the Feishu-side integration

Feishu is currently the primary platform for CollabVibe. On the first deployment, you need to complete bot creation, permission setup, event subscriptions, and visibility publishing on the platform side.

7. Minimal validation

Validate in the following order:

  1. The service starts without startup errors
  2. The bot is visible in the target group chat or direct chat
  3. Sending a user message triggers an event
  4. The bot returns a message or card
  5. logs/app.log contains the corresponding logs
bash
tail -f logs/app.log
bash
npm run test:workspace

8. Common commands

bash
npm run start:dev
npm run start
npm run docs:dev
npm run docs:build
npm run test:workspace
npm test

9. Optional stream tuning

If your backend emits very dense streaming deltas, you can tune Path B throttling at the environment level:

dotenv
COLLABVIBE_STREAM_PERSIST_WINDOW_MS=700
COLLABVIBE_STREAM_UI_WINDOW_MS=500
COLLABVIBE_STREAM_UI_MAX_WAIT_MS=1500

Use these only after you have validated the default behavior. Terminal events still force a final flush.