Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ on:
- ".dockerignore"
- "Dockerfile"
- ".gitignore"
- "resources/**"
- "scripts/**"
- "docker/**"
- "build/**"
- "docs/**"
- ".github/**"
- "!.github/workflows/build.yml"

Expand All @@ -29,6 +34,14 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- name: Checkout submodules
run: git submodule update --init --recursive

- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
version: "0.6.14"

- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -39,5 +52,4 @@ jobs:

- name: Build Release Files
run: |
npm run build
npm run build:electron
npm run build
30 changes: 20 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ jobs:
- os: windows-latest
platform: windows
arch: x64
- os: macos-latest
platform: darwin
arch: x64
- os: macos-latest
platform: darwin
arch: arm64
Expand All @@ -30,6 +27,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout submodules
run: git submodule update --init --recursive

- name: Install the Apple certificate and provisioning profile
if: matrix.platform == 'darwin'
env:
Expand Down Expand Up @@ -68,21 +68,34 @@ jobs:
node-version: 20
cache: 'npm'

- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
version: "0.6.14"

- name: Install dependencies
run: npm ci
run: npm ci && uv sync --project mcp-host

- name: Download Prebuilt binary
if: matrix.platform == 'windows'
run: npm run download:windows-bin

- name: Download Prebuilt binary
if: matrix.platform == 'linux'
run: npm run download:linux-bin

- name: Download Prebuilt binary
if: matrix.platform == 'darwin'
run: npm run download:darwin-bin

- name: Create release directory
run: mkdir -p output

- name: Build Windows
if: matrix.platform == 'windows'
shell: bash
run: |
npm run package:windows-installers
npm run package:windows
ls -al release/${{ env.VERSION }}
echo "Moving exe file to output directory"
mv release/${{ env.VERSION }}/*.exe output/
Expand All @@ -95,14 +108,11 @@ jobs:
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
APPLETEAMID: ${{ secrets.APPLETEAMID }}
run: |
if [ "${{ matrix.arch }}" = "arm64" ]; then
npm run package:darwin-dmg:arm64
else
npm run package:darwin-dmg:x64
fi
npm run package:darwin-dmg
ls -al release/${{ env.VERSION }}
echo "Moving dmg file to output directory"
mv release/${{ env.VERSION }}/*.dmg output/
mv release/${{ env.VERSION }}/latest-mac.yml output/

- name: Build Linux
if: matrix.platform == 'linux'
Expand Down
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,11 @@ config.json
uploads

# bin folder
bin
bin

# for host
requirements.txt
host-deps/

# development tmp files
.config/
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "mcp-host"]
path = mcp-host
url = https://github.com/OpenAgentPlatform/dive-mcp-host.git
branch = main
56 changes: 46 additions & 10 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

- [Development Requirements](#development-requirements)
- [Development](#development)
- [Clone Repository](#clone-repository)
- [Update Repository](#update-repository)
- [Install dependencies](#install-dependencies)
- [Start development server](#start-development-server)
- [Development Configuration](#development-configuration)
- [Build for production](#build-for-production)
- [Cross-platform Build for Windows](#cross-platform-build-for-windows)
- [Scripts](#scripts)
Expand All @@ -18,19 +21,55 @@
## Development Requirements

- Node.js LTS+
- [uv](https://github.com/astral-sh/uv) (for run mcp client)

## Development

### Clone Repository

```bash
git clone --recurse-submodules https://github.com/OpenAgentPlatform/Dive.git
cd Dive
```

### Update Repository

```bash
git pull
git submodule update --init --recursive
```

### Install dependencies

```bash
npm install
```

Navigate to mcp-host directory and sync dependencies for mcp host:
```bash
cd mcp-host
uv sync
```

### Start development server

```bash
npm run dev:electron
npm run dev
```

### Development Configuration

When running Dive in development mode, the configuration file will be automatically generated in the `.config` directory of your project root. This is different from the production environment where configuration files are stored in the user's home directory.

This allows developers to have separate configurations for development and production environments, making it easier to test different MCP server setups without affecting the production configuration.

To access or modify the development configuration:
```
/path/to/project/.config/mcp_config.json
/path/to/project/.config/command_alias.json
/path/to/project/.config/model_config.json
/path/to/project/.config/dive_httpd.json
/path/to/project/.config/customrules
```

## Build for production
Expand All @@ -55,11 +94,8 @@ npm run download:windows-bin

## Scripts

- `dev` - Start Vite development server
- `dev:electron` - Start Electron development server
- `build` - Build web assets
- `build:electron` - Build Electron application
- `download:windows-bin` - Download Windows binaries for cross-platform build
- `dev` - Start Electron development server
- `build` - Build Electron application

## Package Scripts

Expand All @@ -72,9 +108,9 @@ npm run download:windows-bin

After first launch, you can find the `config.json` file in these locations:

- macOS: `~/Library/Preferences/dive`
- Windows: `C:\Users\USERNAME\AppData\Local\Dive\Data`
- Linux: `~/.config/dive`
- macOS: `~/.dive/config`
- Windows: `%USERPROFILE%\.dive\config`
- Linux: `~/.dive/config`

There are four ways to configure MCP servers:

Expand Down Expand Up @@ -162,5 +198,5 @@ electron/
└── preload/ # Preload scripts
└── index.ts # Bridge between main and renderer

services/ # Backend services
mcp-host # git submodule for [dive-mcp-host](https://github.com/OpenAgentPlatform/dive-mcp-host)
```
1 change: 0 additions & 1 deletion docker/win-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ WORKDIR /app
COPY . .

RUN npm ci
RUN npm install --os=win32 --cpu=x64 sharp

ENV WINEARCH=win64
ENV WINEDEBUG=-all
Expand Down
7 changes: 0 additions & 7 deletions drizzle.config.ts

This file was deleted.

15 changes: 0 additions & 15 deletions drizzle/0000_tidy_skin.sql

This file was deleted.

108 changes: 0 additions & 108 deletions drizzle/meta/0000_snapshot.json

This file was deleted.

13 changes: 0 additions & 13 deletions drizzle/meta/_journal.json

This file was deleted.

Loading