Skip to content

Latest commit

 

History

History
155 lines (121 loc) · 5.14 KB

File metadata and controls

155 lines (121 loc) · 5.14 KB

⚡ RedCode

██████ ██████ ██████ ██████ ██████ ██████ ██████
█   █ █     █  ██  █     █   █ █  ██  █
██████ ██████ █   █ █     █   █ █   █  ██████
█  ██ █     █   █ █     █   █ █   █  █
█   █ ██████ ██████ ██████ ██████ ██████ ██████

A Chinese-native desktop AI coding agent — standalone GUI, speaks your language, plug in any model (DeepSeek / MiMo / domestic-first).

Author: Red · Forked from opencode (sst.dev).

TUI Desktop License Platform


✨ What is this?

Open-source AI coding assistant with terminal TUI and desktop GUI interfaces. Reads your codebase, executes commands, edits files, searches code, and completes programming tasks through natural language conversation.


🧩 Features

  • 💬 Natural Language Coding — describe requirements, auto-complete code
  • 🔌 Multi-Model Support — DeepSeek, MiMo, OpenAI, Anthropic, Google Gemini, Ollama, etc.
  • 🛠 Tool System — file read/write, code search, git status/diff/log, terminal commands, web search, environment info
  • 🤖 Smart Agents — Build, Plan, General, Explore agents built-in, custom agents supported
  • 📝 Session Management — history save, restore, fork
  • 🎨 Terminal UI — syntax highlighting, streaming output, diff display
  • 🖥 Desktop GUI — Electron standalone window with full graphical interface
  • 📊 MCP Servers:
    • TypeGraph — TypeScript semantic navigation (type resolution, barrel file traversal, cycle detection)
    • jCodeMunch — structured code retrieval (60+ tools: symbol lookup, dead code detection, AST matching)
    • Browser MCP — browser automation (disabled, stability issues)
  • 🔒 Permission System — tool call confirmation, auto-approve support
  • 🌍 Multi-language — Chinese, English, Japanese, and 18 languages
  • 🗣 TTS — MiMo TTS voice reading for AI responses

🖥 Desktop GUI

  • Three-column layout: FileTree (left) + Chat (center) + Review (right), independently resizable
  • V2 Titlebar: Tab-based session management, StatusPopover for token usage, Cmd+T / Cmd+Shift+T to switch sessions
  • Project shortcuts: Cmd+1 ~ Cmd+9 to switch projects
  • Semantic color layering: theme.colors grouped by text/surface/border/status/diff/markdown/syntax, customizable themes
  • ECC plugin integration: Auto file change tracking, context compression optimization, safe auto-approval
  • Version auto-injection: Titlebar version badge auto-injected from package.json at build time
  • Thinking hamster animation: 🐹 running animation + Mona cat loading during AI thinking
  • Design system: CSS design tokens (radius, shadows, typography), text-wrap: balance/pretty

🚀 Run from Source

git clone https://github.com/JiaHuiRed/RedCode.git
cd RedCode
bun install

# Start TUI (interactive terminal)
bun dev

# Or start Desktop GUI
cd packages/desktop && bun run dev

⚙️ Configuration

Config File Locations

Location Purpose
~/.redcode/redcode.jsonc Global config (cross-project)
project_dir/redcode.jsonc Project-level config
project_dir/.redcode/redcode.jsonc Project-level config

Add Custom Provider

// redcode.jsonc
{
  "$schema": "https://redcode.dev/config.json",
  "provider": {
    "my-provider": {
      "type": "openai",
      "apiKey": "sk-xxx",
      "baseURL": "https://api.example.com/v1"
    }
  },
  "model": "my-provider/my-model"
}

MCP Server Config

{
  "mcp": {
    "typegraph": {
      "type": "local",
      "command": ["npx", "tsx", "path/to/typegraph-mcp/server.ts"],
      "environment": {
        "TYPEGRAPH_PROJECT_ROOT": ".",
        "TYPEGRAPH_TSCONFIG": "./tsconfig.json"
      },
      "enabled": true
    },
    "jcodemunch": {
      "type": "local",
      "command": ["npx", "jcodemunch-mcp"],
      "enabled": true
    }
  }
}

🛠 Tech Stack

Layer Technology
Runtime Bun
Language TypeScript
Terminal UI SolidJS (OpenTUI)
Desktop GUI Electron + SolidJS
AI SDK Vercel AI SDK
Database SQLite (Drizzle ORM)
Build Turborepo (monorepo)
MCP TypeGraph + jCodeMunch + Browser MCP

📋 Changelog

See CHANGELOG.md.


💙 Acknowledgments

  • Original project: opencode by sst.dev
  • License: MIT