# How to Build DeepSeek‑Reasonix from Source: CLI and Desktop Build Guide

> Build DeepSeek-Reasonix from source with make build for CLI or Wails for desktop. Learn cross-platform binary creation without CGO. Get your guide now!

- Repository: [YHH/DeepSeek-Reasonix](https://github.com/esengine/DeepSeek-Reasonix)
- Tags: how-to-guide
- Published: 2026-08-14

---

**Build DeepSeek‑Reasonix from source using `make build` for the CLI, `make cross` for cross‑platform binaries, or Wails for the desktop app—no CGO required for the core engine.**

DeepSeek‑Reasonix is a single‑binary Go engine distributed as a CLI/TUI tool, a desktop application via Wails, or an NPM package. This guide walks through building each variant from the [`esengine/DeepSeek-Reasonix`](https://github.com/esengine/DeepSeek-Reasonix) repository, based on the actual source structure and build scripts.

## Prerequisites

Before building DeepSeek‑Reasonix from source, install the required toolchain:

- **Go 1.25+** – Required for all builds
- **Node 24+ and pnpm 10** – Required only for the desktop app
- **Git** – To clone the repository and embed version metadata

The core kernel uses pure Go with **no CGO**, enabling seamless cross‑compilation without platform‑specific dependencies.

## Understanding the Source Architecture

The repository organizes code into three logical layers:

1. **`internal/*` packages** – Core kernel implementing agents, tool contracts, and the **`control.Controller`** that powers every front‑end
2. **`cmd/reasonix/`** – Thin CLI wrapper that invokes the kernel
3. **`desktop/`** – Separate Go module with React/Vite UI embedded via Wails

The desktop UI communicates with the same kernel through the typed JSON wire protocol defined in **[`desktop/wire.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/desktop/wire.go)**.

## Building the DeepSeek‑Reasonix CLI

The simplest way to build DeepSeek‑Reasonix from source is the CLI binary.

### Step 1: Clone the Repository

```bash
git clone https://github.com/esengine/DeepSeek-Reasonix.git
cd DeepSeek-Reasonix

```

### Step 2: Build the Binary

```bash
make build

```

This produces **`bin/reasonix`** (or **`bin/reasonix.exe`** on Windows). The build disables CGO automatically and embeds version metadata via `-ldflags` defined in the **`Makefile`**.

The embedded metadata includes:
- Git tag
- Commit hash
- UTC timestamp

### Step 3: Run DeepSeek‑Reasonix

```bash
bin/reasonix setup    # Configure provider and model

bin/reasonix          # Start interactive chat session

```

## Cross‑Compiling DeepSeek‑Reasonix Binaries

Build binaries for multiple platforms without Docker or additional toolchains.

```bash
make cross

```

This outputs platform‑specific binaries to `dist/`:
- `dist/reasonix-darwin-amd64`
- `dist/reasonix-darwin-arm64`
- `dist/reasonix-linux-amd64`
- `dist/reasonix-linux-arm64`
- `dist/reasonix-windows-amd64.exe`

The cross‑compilation leverages Go's native toolchain since the kernel has **no CGO dependencies**.

## Building the DeepSeek‑Reasonix Desktop App

The desktop application requires additional dependencies and the Wails framework.

### Install Wails CLI

```bash
make wails-install

```

This installs the exact Wails version pinned in **`.wails-version`**, ensuring reproducible builds.

### Build the Desktop Bundle

```bash
cd desktop
wails build

```

The output appears in **`build/bin/`**:
- `Reasonix.app` (macOS)
- `Reasonix.exe` (Windows)
- `Reasonix` (Linux)

### How the Desktop Build Works

The desktop entry point in **[`desktop/main.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/desktop/main.go)** binds the Go kernel to the React webview. It reuses the same **`control.Controller`** implementation from [`internal/control/controller.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/control/controller.go) that powers the CLI, communicating over the typed JSON protocol defined in **[`desktop/wire.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/desktop/wire.go)**.

Key build targets in the **`Makefile`**:

| Command | Output |
|---------|--------|
| `make build` | `bin/reasonix` (CLI binary) |
| `make cross` | `dist/reasonix-<os>-<arch>` (all platforms) |
| `make wails-install` | Installs pinned Wails CLI version |

## Customizing Your DeepSeek‑Reasonix Build

Modify build behavior using environment variables or direct `go build` commands.

### Custom Version Metadata

Override the embedded version flags:

```bash
go build -ldflags="-X main.version=custom -X main.commit=abc123" -o bin/reasonix-custom ./cmd/reasonix

```

### Development Build (Desktop)

For faster iteration during UI development:

```bash
cd desktop
wails dev    # Hot-reload mode with Vite

```

## Summary

- **DeepSeek‑Reasonix** compiles from three source layers: core kernel (`internal/`), CLI wrapper (`cmd/reasonix/`), and desktop module (`desktop/`)
- **CLI builds** require only Go 1.25+: run `make build` or `make cross`
- **Desktop builds** need Node 24+, pnpm 10, and Wails CLI (`make wails-install`)
- The **pure Go kernel** enables trivial cross‑compilation without CGO
- Version metadata embeds automatically via **`Makefile`** `LDFLAGS`

## Frequently Asked Questions

### What Go version is required to build DeepSeek‑Reasonix?

Go 1.25 or higher is required. The build explicitly disables CGO, so no C toolchains are needed even for cross‑compilation.

### Can I build DeepSeek‑Reasonix without building the desktop app?

Yes. Run `make build` to produce only the CLI binary. The desktop dependencies (Node, pnpm, Wails) are only necessary when building `desktop/`.

### How does the desktop app share code with the CLI?

Both front‑ends import the **`control.Controller`** from [`internal/control/controller.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/control/controller.go). The desktop app adds a JSON wire protocol layer in [`desktop/wire.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/desktop/wire.go) to communicate with the React UI, while the CLI invokes the controller directly.

### Where is the Wails version defined?

The pinned Wails version lives in **`.wails-version`**. The `Makefile` target `make wails-install` reads this file and installs that exact version, preventing build drift between environments.