The Repositories settings page configures repositories on the selected registered host. These settings are used when Jaidu creates host-side workspaces and worktrees for that repository.

Accessing Repository Settings

  1. Open Settings from the Workspaces navbar
  2. Select the host that owns the repository
  3. Select Repositories
  4. Choose a repository from the dropdown to view and modify its settings
Repositories tab showing repository selection, general settings, linked projects, and scripts configuration

Repository Selection

Use Select Repository to choose the repository you want to configure. Click Add Repository to register another git repository on the selected host.
Repository settings are host-specific. Select the registered host that owns the repository before editing its settings.

General Settings

Configure repository identity and workspace defaults:
  • Display Name - A friendly name for this repository
  • Repository Path - The local path to the repository on the selected host
  • Default Working Directory - A subdirectory relative to the repository root where Codex starts for single-repo workspaces
  • Default Target Branch - The default base branch for new workspaces and pull requests
Default working directory and target branch are applied when a workspace is created. Existing workspaces keep the settings they were created with unless you change them in that workspace flow.

Linked Projects

The Linked Projects section shows projects that use this repository in their default workspace configuration. It is a read-only summary for understanding where the repository is already used. Project-level default repositories are managed from Settings -> Projects on the Remote Projects page.

Scripts & Configuration

Configure scripts and copied files for this repository. Scripts run on the registered host from the repository worktree.

Dev Server Script

Command to start your development server. This enables the built-in preview browser in Workspaces when Jaidu detects the dev server URL. Common examples:
FrameworkCommand
Vitenpm run dev
Next.jsnpm run dev
Create React Appnpm start
Djangopython manage.py runserver
Railsrails server
The dev server must output its URL, such as http://localhost:3000, to stdout for Jaidu to detect and display it in the preview panel.

Browser Testing

Learn how to use the built-in preview browser with your dev server

Setup Script

Commands that run after the worktree is created and before Codex starts. Use this for setup tasks like installing dependencies or preparing the development environment. You can also enable Run setup script in parallel with coding agent when the setup script does not need to finish before Codex starts. Examples:
# Node.js project
npm install

# Python project
pip install -r requirements.txt

# Multiple commands
npm install && npm run build:deps

# Rust project
cargo fetch

Cleanup Script

Commands that run after Codex execution, only if changes were made. Use this for quality assurance tasks like formatting, linting, tests, or other validation. Examples:
Use CaseCommand
Stop Docker containersdocker compose down
Kill background processespkill -f "node server.js"
Clean build artifactsrm -rf dist/ .cache/
Stop PostgreSQLpg_ctl stop -D /usr/local/var/postgres
Kill process on portlsof -ti:3000 | xargs kill -9 2>/dev/null
Code formatting examples:
Language/ToolCommand
JavaScript/TypeScript (Prettier)npx prettier --write .
JavaScript/TypeScript (ESLint)npx eslint --fix .
Rust (cargo fmt)cargo fmt
Rust (Clippy)cargo clippy --fix --allow-dirty
Python (Black)black .
Python (Ruff)ruff check --fix
Gogo fmt ./...

Archive Script

Commands that run when a workspace is archived. Use this to stop services, release resources, or save state that should be handled when work is moved out of the active workspace list.

Copy Files

A comma-separated list of files to copy from the original repository directory to the worktree. This is useful for files like .env or local config files that are intentionally not committed.
Only copy files that are safe to place into a workspace worktree. Make sure sensitive local files are gitignored and do not appear in public docs, commits, or pull requests.

Best Practices

Long-running setup scripts delay workspace startup. Install dependencies in setup, but avoid lengthy build processes unless necessary.
Scripts run from the repository worktree. Use relative paths or environment variables rather than hardcoded absolute paths.
Add || true to commands that might fail but should not block the workspace:
npm install || true
Run your scripts manually in a terminal before configuring them in Jaidu to ensure they work correctly.

Browser Testing

Learn how the dev server integrates with the preview panel

Multi-Repository Threads

Working with multiple repositories in a single workspace