# How to Install DeepSeek-Reasonix: A Complete Build and Setup Guide

> Learn how to install DeepSeek-Reasonix with our easy build and setup guide. Follow simple steps to clone the repo, build the binary, and add it to your system PATH.

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

---

**To install DeepSeek-Reasonix, clone the Go repository, run `make build` to produce a static binary, and execute `sudo install -Dm755 bin/reasonix /usr/local/bin/reasonix` to add it to your system PATH.**

DeepSeek-Reasonix is a Go-based AI coding assistant developed by **esengine** that drives one or two LLM models via a static, CGO-free binary. This guide walks you through the complete installation process from source, including cross-compilation, system-wide installation, and initial configuration.

## Prerequisites and System Requirements

Before you install DeepSeek-Reasonix, ensure you have:

- **Go 1.21+** installed on your system
- **Git** for cloning the repository
- **Make** (usually included with build-essential on Linux/Xcode on macOS)
- A valid API key for one of the supported providers (DeepSeek, MiniMax, Anthropic, or OpenAI-compatible services)

## Clone the DeepSeek-Reasonix Repository

Start by cloning the repository from GitHub and navigating to the main source directory:

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

```

The `main-v2` directory contains the active development branch with the latest features and the `Makefile` you'll use for building.

## Build the Binary from Source

DeepSeek-Reasonix compiles into a single static binary without CGO dependencies. The `Makefile` in the repository root handles the build process with proper `ldflags` for version injection.

### Standard Build

```bash
make build

```

This command produces:
- `./bin/reasonix` — the main executable
- `./bin/reasonix-plugin-example` — example plugin binary

### Cross-Compilation for Multiple Platforms

To build distributable binaries for all major platforms simultaneously:

```bash
make cross

```

This generates `./dist/reasonix-<os>-<arch>[.exe]` files for Darwin, Linux, and Windows in both `amd64` and `arm64` variants. The cross-compilation uses `CGO_ENABLED=0` to ensure fully static binaries with no external dependencies.

### Verify the Build

Run the test suite to validate the provider, tool, and UI internals:

```bash
make test

```

## Install the Binary System-Wide

Move the built binary to your system PATH for global access:

```bash

# Linux/macOS

sudo install -Dm755 bin/reasonix /usr/local/bin/reasonix

# Verify installation

reasonix --version

```

For Windows, copy `./dist/reasonix-windows-amd64.exe` to your preferred location and add it to your PATH environment variable.

## Configure DeepSeek-Reasonix

DeepSeek-Reasonix uses a layered TOML configuration system (flags → project → user → defaults). Run the first-start wizard to create your initial configuration:

```bash
reasonix setup

```

This command generates a [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml) file in your project root. The configuration follows this structure:

```toml
default_model = "deepseek-flash"

[[providers]]
name        = "deepseek-flash"
kind        = "openai"
base_url    = "https://api.deepseek.com"
model       = "deepseek-v4-flash"
api_key_env = "DEEPSEEK_API_KEY"

```

### Set Up API Authentication

Export your API key in your shell environment:

```bash
export DEEPSEEK_API_KEY=sk-your-api-key-here

```

Alternatively, let the setup wizard store credentials in Reasonix's home directory `.env` file for persistent access across sessions.

## Run DeepSeek-Reasonix

### Interactive Session Mode

Launch the TUI (Terminal User Interface) to start an interactive chat:

```bash
reasonix

```

On first run, the UI prompts you to execute `/init`, which generates an [`AGENTS.md`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/AGENTS.md) file for project memory and context retention.

### Command-Line Execution

Pipe queries directly or use `reasonix run` for non-interactive tasks:

```bash

# Simple explanation request

echo "explain this code" | reasonix run

# Run with default model

reasonix run "implement the TODOs in main.go"

# Use specific model (e.g., DeepSeek-Pro)

reasonix run --model deepseek-pro "add unit tests for this function"

```

### Desktop Mode

The same binary automatically detects whether it runs in a terminal or graphical environment. The **Bubble Tea**-based TUI in `desktop/*` adapts accordingly—no separate installation required.

## Architecture Overview

Understanding the codebase structure helps with troubleshooting and customization:

| Layer | Purpose | Core Source Location |
|------|---------|---------------------|
| **CLI** | Command parsing and session assembly | [`internal/cli/cli.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/cli.go) |
| **Agent / Coordinator** | LLM chat loop, tool calls, optional planner model | [`docs/SPEC.md`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/docs/SPEC.md) sections 3.4-3.5 |
| **Provider** | OpenAI-compatible wire protocol | [`internal/provider/openai/openai.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/provider/openai/openai.go) |
| **Tool Registry** | Built-in tools and MCP plugin loading | [`internal/tool/registry.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/tool/registry.go) |
| **Permission & Sandbox** | Per-call policy and filesystem confinement | `internal/permission/*`, `internal/sandbox/*` |
| **Desktop UI** | Bubble Tea TUI components | `desktop/*` |
| **Configuration** | TOML parsing with layer merging | `internal/config/*` |

The entry point at [`cmd/reasonix/main.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/cmd/reasonix/main.go) imports all built-in functionality and delegates to [`internal/cli/cli.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/cli/cli.go) for command orchestration.

## Summary

- **Clone** the repository from `github.com/esengine/DeepSeek-Reasonix` and navigate to `main-v2`
- **Build** using `make build` for local use or `make cross` for distribution binaries
- **Install** system-wide with `sudo install -Dm755 bin/reasonix /usr/local/bin/reasonix`
- **Configure** via `reasonix setup` to generate [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml) and set API keys
- **Run** interactively with `reasonix` or pipe commands through `reasonix run`
- The architecture separates concerns across CLI, Agent, Provider, and Tool Registry layers

## Frequently Asked Questions

### Does DeepSeek-Reasonix require Docker or containerization?

No. DeepSeek-Reasonix compiles to a single static binary with `CGO_ENABLED=0`, meaning it has no external dependencies and runs directly on your host system without Docker, containers, or runtime libraries.

### Can I use DeepSeek-Reasonix with providers other than DeepSeek?

Yes. The provider layer in [`internal/provider/openai/openai.go`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/internal/provider/openai/openai.go) implements the OpenAI-compatible protocol, supporting MiniMax, Anthropic, and any other OpenAI-compatible endpoints. Configure alternative providers in your [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml) file.

### What does the `reasonix setup` command actually create?

The setup wizard generates a minimal [`reasonix.toml`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/reasonix.toml) in your project root, creates the Reasonix home directory for persistent state, and optionally writes an `.env` file for API key storage. It also prepares the infrastructure for `/init` to generate [`AGENTS.md`](https://github.com/esengine/DeepSeek-Reasonix/blob/main/AGENTS.md) project memory files.

### How do I update DeepSeek-Reasonix to a new version?

Pull the latest changes from the repository, rebuild with `make build`, and reinstall the binary. The project follows standard Go versioning practices, and the `Makefile` handles version injection via `ldflags` during compilation.