Native AST Code Indexing · Sub-Millisecond Rust Core · Ultra-Lean Hot-Reload Prompts · Byte-Level KV-Cache Protection
Next-generation Agentic AI coding assistant purpose-built for complex, large-scale production codebases.
English (Default) · 简体中文 (Chinese)
What is JeikCode · Architecture Comparison · CodeExplore Indexing · Highlights · Installation · Commands · Knowledge Packs
🌐 Official GitHub Repository: https://github.com/JeikCode/JeikCode
JeikCode is a zero-bloat, ultra-fast autonomous AI coding agent natively built with Rust, specifically engineered to eliminate context bloat, eliminate blind grepping, and master large-scale complex software architectures.
While conventional coding agents suffer from verbose prompt overhead, fragile tool parsing, and blind regex search across massive repositories, JeikCode delivers three foundational breakthroughs:
- 🔍 Native AST Code Indexing (CodeExplore):
- Eliminates the blindness of raw regex scanning and the rigid limitations of symbol-only LSP lookups.
- Proprietary Weighted AST Syntax Graphs + Bilingual Natural Language & Docstring Semantic Alignment (Cilin-weighted) allows developers to query by business logic (e.g. "Find refund callback error handling"), boosting retrieval efficiency by 60% - 70% with 90%+ location accuracy.
- ⚡ Sub-Millisecond Rust Performance & TTY Control:
- Zero-dependency native Rust binary engine with sub-millisecond cold start and high-throughput streaming, completely free from Node.js / Python runtime latency.
- Built-in double-press misoperation defense (
ESC/Ctrl+C×2) and active Linux foreground TTY grabbing to prevent terminal lockup.
- 🧠 Ultra-Lean Prompts & Byte-Level KV-Cache Protection:
- Fully Externalized Hot-Reloading: Core system prompts reside independently in
init.yaml,rules.yaml, anduser-wrap.md—modifications apply instantly on file save without process restarts or recompilation. - Strict Append-Only Prefix Discipline: User queries are dynamically wrapped only at the tail (
user-wrap.md), preserving the entire system prefix byte-for-byte across conversation turns. Paired withsacred_floormemory compaction protection, it eliminates KV-Cache thrashing and slashes LLM inference cost.
- Fully Externalized Hot-Reloading: Core system prompts reside independently in
The following matrix objectively evaluates JeikCode, OpenAI Codex, Claude Code, OpenCode, and Grok Build based on real-world engineering benchmarks:
| Core Feature & Mechanism | JeikCode (This Project) | OpenAI Codex (@openai/codex) |
Claude Code (Anthropic) | OpenCode (OpenCode AI) | Grok Build (SpaceXAI) |
|---|---|---|---|---|---|
| Runtime & Core Architecture | Native Rust Core + Dynamic Sandbox | Rust (codex-rs) + TS CLI |
TypeScript + CLI | TypeScript + Effect-TS | Rust (Ptyctl/ChatState) |
| Code Semantic Retrieval | ✅ CodeExplore: Weighted AST + Semantic Graph | ||||
| Prompt Architecture | ✅ Ultra-lean externalized + mtime hot-reload | ❌ Baked in binary, requires rebuild | CLAUDE.md, core hardcoded |
||
| KV Cache Prefix Stability | ✅ user-wrap.md Tail Wrap (Byte-Exact) |
✅ Anthropic Ephemeral Cache | |||
| 5-Stage Tool Recovery & Healing | ✅ Auto-Heal (JSON / Types / Windows Paths) | ❌ Schema check only; fails on error | ✅ Diagnostic feedback & coercion | ||
| Tool Loop Guard Circuit Breakers | ✅ 3-Attempt Loop Guard + Fuse Tripping | ✅ Loop Guard active | |||
| First-Token Liveness Watchdog | ✅ Independent 60s × 3 timer (Anti-hang) | ✅ Process watchdog integration | |||
| Large Output Budget Management | ✅ 64KB auto-fold + fetch_output slicing |
✅ Output budget management | |||
| Multi-Protocol Support | ✅ Responses / Completions / Anthropic / Gemini | ✅ Standard and custom protocols | |||
| Reasoning Effort Gears | ✅ Realtime /effort (low/med/high/xhigh/off) |
✅ Integrated Claude 3.7 Thinking | ✅ Integrated Grok Reasoning | ||
| Remote Headless & Web Console | ✅ Native Rust serve + Interactive WebUI |
❌ Terminal CLI exclusive | ✅ Web console + desktop app | ❌ Terminal Pager TUI mode | |
| Multi-Tier Knowledge Packs | ✅ 4-Tier packs strict over System default | ✅ Supports CLAUDE.md project spec |
✅ Project rules concatenation | ✅ Project rule configurations |
| Language & Ecosystem | JeikCode (CodeExplore) | Traditional Regex / Text Search | LSP Symbol Indexing |
|---|---|---|---|
| Rust | ✅ AST Syntax Graph + Semantic Mapping | rust-analyzer setup |
|
| TypeScript / JavaScript | ✅ JSX / TSX Component & Element AST | ||
| Vue (Vue2 / Vue3 SFC) | ✅ Template + Script Dual-AST Parsing | ❌ Text-only, cannot resolve SFC bindings | |
| Python | ✅ AST Syntax Graph + Docstring Mapping | ||
| Java | ✅ Class/Method AST + Semantic Graph | ||
| Go | ✅ AST Syntax Graph + Semantic Mapping | ||
| C / C++ | ✅ AST Syntax Graph + Header Include Chain | ||
| Svelte / Astro / SCSS | ✅ Component Template & Style Class AST | ❌ Lacks unified business query support |
While CodeGraph introduced valuable symbol-indexing concepts, real-world engineering surfaced a critical bottleneck: it only understands rigid code symbols and has zero semantic understanding of natural language. When a developer asks "Where is the refund callback verified?", pure symbol search is blind.
JeikCode developed a fully autonomous CodeExplore and repo_map engine:
- Weighted AST Vectors + Semantic Alignment:
- Parses code structures (AST symbols, call graphs, type definitions, trait bounds).
- Extracts bilingual comments and docstrings.
- Aligns code logic with natural language business semantics using semantic embedding and Cilin lexical weighting.
- Weighted Relevance Ranking:
- Scores and directly pins the most relevant implementation blocks at the top of the agent context, eliminating trial-and-error grep loops.
- Budget-Aware Low-Relevance File Recommendations:
- Never dumps entire secondary files into context. Instead, condenses them into minimal token-budget paths and structural summaries, preserving maximum context space for active development.
- Benchmarked Metrics:
- 🚀 60% - 70% reduction in search latency: Pinpoints exact targets in a single round;
- 🎯 90%+ retrieval accuracy: Handles bilingual and abstract business queries seamlessly.
- Byte-Exact Immutability: System identity,
MEMORY,SKILLS, and knowledge rules are packed compactly at the conversation header. user-wrap.mdDynamic Tail Wrapping: The{{input}}template dynamically wraps only the active turn's user message. Modifying the template hot-reloads in milliseconds without invalidating cached prefix tokens.sacred_floorCompaction Guard: During/compactcontext summarization, critical rules and memory entries are anchored below the floor and are never dropped.
- 5-Stage Tool Self-Healing: Direct parsing → Lenient JSON repair (trailing commas, unquoted keys, markdown code fences stripping) →
edit_fileregex rescue → Schema string decoding → Key-value fallback. - Windows Path Backslash Sanitization: Automatically rescues unescaped single backslashes in paths like
D:\project\srcbefore serde deserialization. - Automatic Type Coercion: Automatically coerces
"count":"5"to5and"verbose":"true"totrue. - 64KB Large Output Folding: Massive outputs fold into artifacts with head/tail previews; agent queries slices via
fetch_outputas needed. - 3-Attempt Loop Guard Circuit Breaker: Tripped when identical tool calls fail 3 times sequentially, halting runaway loops and forcing alternative strategies.
- Dual-Tier Timeout Architecture: 1800s hard process lifetime with process tree reclamation; 180s progress-aware idle budget (reset on
notifications/progress). - Independent First-Token Watchdog: 60s × 3 independent retry watchdog for reasoning models (DeepSeek-R1, Grok 3), preventing silent stream hangs.
- Native support for four primary model protocols: OpenAI Responses (
/v1/responses), OpenAI Chat Completions, Anthropic Messages, and Google Gemini Native Protocol. - Switch reasoning effort on the fly with
/effort(low/medium/high/xhigh/off). - Model credentials and parameters are fully decoupled;
/modeladdqueries upstream/modelsdynamically.
- WebUI Console: Launch interactive browser control via
/webuiorjeikcode webui(featuring KaTeX LaTeX rendering and real-time token cost overlays). - Streaming Multipart Attachments: Drag-and-drop multimodal attachments with upload progress. Non-image files stream into
.jeikcode_storeand remain indexed for tool queries. - Multi-Instance Headless Serve:
jeikcode serve --host 0.0.0.0 --port 4096 --token sk-my-secret jeikcode attach http://192.168.1.100:4096 --token sk-my-secret
Prebuilt binaries are available on GitHub Releases:
# Linux / macOS Installation
curl -fsSL https://raw.githubusercontent.com/JeikCode/JeikCode/main/scripts/install.sh | bash
# Windows PowerShell Installation
irm https://raw.githubusercontent.com/JeikCode/JeikCode/main/scripts/install.ps1 | iexPrerequisites: Rust 1.88+ (rustup.rs):
git clone https://github.com/JeikCode/JeikCode.git
cd JeikCode
cargo install --path crates/jeikcode-cli --bin jeikcode --locked
jeikcode --versionLaunch directly from any project directory:
cd /path/to/your/project
jeikcodeConfiguration file is located at ~/.jeikcode/config.toml:
default_provider = "deepseek"
[provider_accounts.deepseek]
api_key = "sk-xxxxxxxxxxxxxxxxxxxxxxxx"
base_url = "https://api.deepseek.com/v1"
[models.deepseek-chat]
provider = "deepseek"
model = "deepseek-chat"
protocol = "chat_completions"
[models.deepseek-reasoner]
provider = "deepseek"
model = "deepseek-reasoner"
protocol = "chat_completions"
reasoning_effort = "high"Common CLI commands:
# Launch in a specific project directory
jeikcode -C /path/to/project
# Launch with a specific model
jeikcode --model deepseek-reasoner
# Headless mode for automated scripts / CI/CD
jeikcode -p "Investigate and fix OAuth callback 404 error"
# Resume previous conversation
jeikcode -c| Shortcut | Description |
|---|---|
Enter |
Send current input message |
\ + Enter |
Universal newline insertion |
Shift+Enter / Alt+Enter |
Newline insertion (terminal protocol dependent) |
Esc ×2 / Ctrl+C ×2 |
Double-press safe cancel: Abort execution and restore input |
Alt+V / Ctrl+Alt+V |
Paste clipboard screenshot as multimodal image attachment |
Ctrl+Up / Ctrl+Down |
Scroll conversation history up / down |
PageUp / PageDown |
Page scroll conversation history |
Ctrl+L |
Clear screen while preserving active context |
| Category | Command | Description |
|---|---|---|
| Workflow & Mode | /plan |
Switch to read-only exploration and planning mode |
/build |
Switch to full code modification and build mode | |
/effort |
Dynamically adjust reasoning effort (low/med/high/xhigh/off) |
|
| UI & Model | /webui |
Launch browser-based interactive web console |
/modeladd |
Interactive GUI to configure new model endpoints | |
/model |
Switch active model for the current session | |
| Context & Project | /compact |
Trigger context compaction (sacred_floor protected) |
/init |
Analyze project and initialize standardized instructions |
JeikCode supports multi-tier project rules that hold strict execution precedence over System default prompts:
| File Path | Function & Precedence |
|---|---|
AGENTS.md / JEIKCODE.md |
Primary architectural and coding guidelines |
.jeikcode/rules.md |
Business logic constraints and operation safety policies |
.jeikcode/dbwords.md |
Database schemas, key fields, and enum definitions |
.jeikcode/glossary.md |
Domain-specific terminology and bilingual mappings |
This project is licensed under the MIT License.