How to Configure DeepSeek-Reasonix: Build, Install, and Run Setup Guide

Configure DeepSeek-Reasonix by compiling the static Go binary with make build, generating a TOML configuration file via reasonix setup, and setting your LLM API key in the environment variable specified by the api_key_env field.

DeepSeek-Reasonix is a Go-based AI coding assistant that drives one or two LLM models via a static, CGO-free binary. To configure DeepSeek-Reasonix for your workflow, you must understand its layered configuration architecture defined in internal/config/*, which merges settings from command flags, project-level TOML files, user preferences, and system defaults.

Building the Static Binary

The build process produces a single static executable named reasonix that can be cross-compiled for all major operating systems and architectures.

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

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

The Makefile wraps the go build command with CGO_ENABLED=0 and injects version information via ldflags. Compile the binary locally:

make build

This generates ./bin/reasonix and ./bin/reasonix-plugin-example. For cross-platform distribution across Darwin, Linux, and Windows (both amd64 and arm64), run:

make cross

Output binaries are placed in ./dist/reasonix-<os>-<arch>[.exe].

Install the binary system-wide on Linux or macOS:

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

Configuration Architecture and Files

DeepSeek-Reasonix uses a TOML-based configuration system implemented in internal/config/* that follows a hierarchical merge order: command-line flags override project-level settings, which override user-level settings, which finally override defaults.

The configuration manages:

  • Provider settings (internal/provider/openai/openai.go): OpenAI-compatible wire protocols for DeepSeek, MiniMax, Anthropic, and other services
  • Tool registry (internal/tool/registry.go): Built-in tools (file I/O, bash, grep) and external MCP plugins
  • Permission policies (internal/permission/*): Per-call allow/ask/deny policies
  • Sandbox constraints (internal/sandbox/*): Filesystem confinement rules

Initial Setup and TOML Configuration

Run the first-time wizard to generate a minimal reasonix.toml in your project root:

reasonix setup

This creates a configuration file following the structure defined in the source examples:

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"

The api_key_env field specifies which environment variable contains the API key. Export this in your shell:

export DEEPSEEK_API_KEY=sk-<your-key>

Alternatively, the wizard can store credentials in Reasonix's home .env file.

Configuring the Agent and Two-Model Collaboration

The Agent layer, described in docs/SPEC.md under sections 3.4 Agent and 3.5 Two-model collaboration, handles the LLM chat loop and tool calls. The entry point in cmd/reasonix/main.go delegates to internal/cli/cli.go for session orchestration.

To use a specific model for a single task, bypass the default configuration:

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

Running DeepSeek-Reasonix

Start an interactive session where the TUI prompts you to run /init to generate AGENTS.md (project memory):

reasonix

For non-interactive execution, pipe commands or use direct arguments:

echo "explain this code" | reasonix run
reasonix run "implement the TODOs in main.go"

The Desktop UI built with Bubble Tea in desktop/* automatically detects whether it is running in a terminal or graphical environment. Launch the same binary in either context:

reasonix  # Adapts to terminal vs. desktop automatically

Permission and Sandbox Configuration

Configure security policies through the TOML configuration to govern tool execution:

  • Permission policies (internal/permission/*): Define per-tool approval levels (allow, ask, deny)
  • Sandbox constraints (internal/sandbox/*): Restrict filesystem access to specific directories

These settings are loaded during the initialization phase in internal/cli/cli.go and enforced for each tool call registered in internal/tool/registry.go.

Summary

  • Build the static binary using make build or make cross for distribution
  • Configure providers in reasonix.toml with name, kind, base_url, model, and api_key_env fields
  • Authenticate by exporting the API key environment variable specified in your provider configuration
  • Initialize projects with reasonix setup and /init to generate AGENTS.md
  • Run interactively with reasonix, non-interactively with reasonix run, or in desktop mode via the Bubble Tea UI in desktop/*

Frequently Asked Questions

Where is the DeepSeek-Reasonix configuration file stored?

The configuration follows a hierarchy: command-line flags take precedence over ./reasonix.toml (project-level), which overrides user-level settings, which finally fall back to defaults. Run reasonix setup to generate the initial project configuration file.

How do I configure multiple LLM providers in DeepSeek-Reasonix?

Add multiple [[providers]] blocks to your reasonix.toml file. Each provider requires name, kind (set to "openai" for OpenAI-compatible APIs), base_url, model, and api_key_env fields. Reference different providers at runtime using the --model flag.

Can I run DeepSeek-Reasonix without installing it system-wide?

Yes. After running make build, execute the binary directly from ./bin/reasonix without installing to /usr/local/bin. The binary is statically linked with CGO_ENABLED=0, requiring no external dependencies or system installation.

How do I configure permissions for tool execution?

Permission policies are defined in internal/permission/* and configured via the TOML settings. You can set per-tool policies to allow, ask, or deny to control whether the agent can execute file operations, bash commands, or other registered tools from internal/tool/registry.go without prompting.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →