กลับไปหน้า Tools

GetNotes Tools

1jehuang/jcode

Tool นี้คืออะไร

jcode เป็นเครื่องมือสำหรับนักพัฒนาที่เน้นประสิทธิภาพสูงและประหยัดทรัพยากร RAM อย่างมาก เหมาะสำหรับเวิร์กโฟลว์แบบหลายเซสชัน โดยมีจุดเด่นที่ใช้ RAM น้อยและบูตได้รวดเร็ว

ข้อมูลโปรเจกต์

ดาว

10.8K

Forks

1.2K

License

MIT

อัปเดต GitHub ล่าสุด

22 ก.ค. 2569

เพิ่มใน GetNotes

30 ก.ค. 2569

Repository

1jehuang/jcode

รูปแบบ

CLI / Terminal

เหมาะกับงาน

AI และ AgentsAutomationCoding Agents

เหมาะกับอาชีพ

Ecosystem

Rust

แปลและเรียบเรียงโดย AI

เนื้อหาฉบับภาษาไทย

ใช้อ่านเพื่อทำความเข้าใจเบื้องต้น โปรดตรวจสอบรายละเอียดสำคัญกับเอกสารต้นฉบับด้านล่าง

jcode

Latest Release License: MIT Platforms Last Commit GitHub Stars Discord

เครื่องมือที่ประหยัด RAM มากที่สุด เครื่องมือที่ชาญฉลาดที่สุด

jcode memory demonstration

เว็บไซต์ · เอกสาร · การวัดประสิทธิภาพ · คุณสมบัติ · ติดตั้ง · เริ่มต้นใช้งานอย่างรวดเร็ว · อ่านเพิ่มเติม · การมีส่วนร่วม


การติดตั้ง

bash
# macOS & Linux
curl -fsSL https://jcode.sh/install | bash
powershell
# Windows 11 (PowerShell 5.1+)
irm https://jcode.sh/install.ps1 | iex

ต้องการ Homebrew, การสร้างจากซอร์สโค้ด, การตั้งค่าผู้ให้บริการ หรือต้องการให้เอเจนต์ตั้งค่าให้คุณหรือไม่? ไปยังการติดตั้งโดยละเอียด.


ประสิทธิภาพและการใช้ทรัพยากรอย่างมีประสิทธิภาพ

jcode ถูกสร้างขึ้นมาให้มีประสิทธิภาพและใช้ทรัพยากรอย่างมีประสิทธิภาพมากที่สุดเท่าที่จะเป็นไปได้ ทุกตัวชี้วัดได้รับการปรับแต่งอย่างละเอียด ซึ่งสำคัญสำหรับการปรับขนาดเวิร์กโฟลว์แบบหลายเซสชัน ที่นี่เราได้ยกตัวอย่างตัวชี้วัดบางส่วนเพื่อแสดงความแตกต่าง: การใช้ RAM และการบูตเครื่อง

การเปรียบเทียบ RAM

เวลาในการแสดงผลเฟรมแรก

เครื่องมือเวลาในการแสดงผลเฟรมแรกช่วงการเปรียบเทียบ
jcode14.0 ms10.1–19.3 msค่าพื้นฐาน
Antigravity CLI383.5 ms363.1–415.4 msช้ากว่า 27.4 เท่า
pi590.7 ms369.6–934.8 msช้ากว่า 42.2 เท่า
Codex CLI882.8 ms742.3–1640.9 msช้ากว่า 63.1 เท่า
OpenCode1035.9 ms922.5–1104.4 msช้ากว่า 74.0 เท่า
GitHub Copilot CLI1518.6 ms1357.4–1826.8 msช้ากว่า 108.5 เท่า
Cursor Agent1949.7 ms1711.0–2104.8 msช้ากว่า 139.3 เท่า
Claude Code3436.9 ms2032.7–8927.2 msช้ากว่า 245.5 เท่า

วัดบนเครื่อง Linux นี้จากการเปิดใช้งาน PTY แบบโต้ตอบ 10 ครั้ง

เวลาในการรับอินพุตแรก

(เวลาจนกว่าข้อความทดสอบที่พิมพ์จะปรากฏบนหน้าจอที่แสดงผล; Antigravity ใช้เครื่องหมายบันทึกภายในที่ระบุว่าพร้อมรับอินพุต เนื่องจากหน้าจอเข้าสู่ระบบจะระงับการสะท้อนข้อความทดสอบ)

เครื่องมือเวลาในการรับอินพุตแรกช่วงการเปรียบเทียบ
jcode48.7 ms30.3–62.7 msค่าพื้นฐาน
Antigravity CLI383.7 ms363.4–415.7 msช้ากว่า 7.9 เท่า
pi596.4 ms373.9–955.2 msช้ากว่า 12.2 เท่า
Codex CLI905.8 ms760.1–1675.7 msช้ากว่า 18.6 เท่า
OpenCode1047.9 ms931.1–1116.9 msช้ากว่า 21.5 เท่า
GitHub Copilot CLI1583.4 ms1422.8–1880.0 msช้ากว่า 32.5 เท่า
Cursor Agent1978.7 ms1727.3–2130.0 msช้ากว่า 40.6 เท่า
Claude Code3512.8 ms2137.4–9002.0 msช้ากว่า 72.2 เท่า

วัดบนเครื่อง Linux นี้จากการเปิดใช้งาน PTY แบบโต้ตอบ 10 ครั้ง Antigravity CLI ไม่ได้ผ่านการยืนยันตัวตนสำหรับการรันนี้; หน้าจอเข้าสู่ระบบแสดงผลตามปกติและปล่อยเครื่องหมายภายใน CLI ready for user input แต่ไม่ได้สะท้อนข้อความทดสอบที่พิมพ์

ไคลเอนต์เพิ่มเติม / การปรับขนาดหน่วยความจำ

เครื่องมือPSS เพิ่มเติมต่อเซสชันที่เพิ่มขึ้นการเปรียบเทียบ
jcode (ปิดการฝังในเครื่อง)~9.9 MBค่าพื้นฐาน
jcode~10.4 MBใช้ RAM มากกว่า 1.1 เท่า
pi~76.5 MBใช้ RAM มากกว่า 7.7 เท่า
Codex CLI~21.6 MBใช้ RAM มากกว่า 2.2 เท่า
OpenCode~318.4 MBใช้ RAM มากกว่า 32.2 เท่า
GitHub Copilot CLI~158.1 MBใช้ RAM มากกว่า 16.0 เท่า
Cursor Agent~157.5 MBใช้ RAM มากกว่า 15.9 เท่า
Claude Code~212.7 MBใช้ RAM มากกว่า 21.5 เท่า
Antigravity CLI~86.4 MBใช้ RAM มากกว่า 8.7 เท่า

เวอร์ชันที่ทดสอบสำหรับการรันหน่วยความจำที่แก้ไขนี้:

  • jcode v0.9.1888-dev (be386f2)
  • pi 0.62.0
  • codex-cli 0.120.0
  • opencode 1.0.203
  • GitHub Copilot CLI 1.0.24 สำหรับการรัน 1 เซสชัน, GitHub Copilot CLI 1.0.27 สำหรับการรัน 10 เซสชัน
  • Cursor Agent 2026.04.08-a41fba1
  • Claude Code 2.1.86 (Claude Code)
  • Antigravity CLI 1.0.0
jcode performance demonstration

หน่วยความจำ (หน่วยความจำของ Agent)

Jcode ฝังแต่ละเทิร์น/การตอบกลับเป็นเวกเตอร์เชิงความหมาย ทุกเทิร์นจะสอบถามกราฟหน่วยความจำเพื่อค้นหารายการหน่วยความจำที่เกี่ยวข้องอย่างมีประสิทธิภาพผ่านการตรวจสอบความคล้ายคลึงกันของโคไซน์ ผลลัพธ์ของการฝังจะถูกป้อนเข้าสู่การสนทนา หรือเลือกใช้หน่วยความจำ sideagent ซึ่งจะตรวจสอบว่าหน่วยความจำมีความเกี่ยวข้องหรือไม่ และอาจทำงานเพิ่มเติมสำหรับการดึงข้อมูลก่อนที่จะฉีดเข้าสู่การสนทนา สิ่งนี้ส่งผลให้เกิดระบบหน่วยความจำที่เหมือนมนุษย์ ซึ่งช่วยให้ agent สามารถเรียกคืนข้อมูลที่เกี่ยวข้องกับการสนทนาได้โดยอัตโนมัติ โดยไม่ต้องเรียกใช้เครื่องมือหน่วยความจำหรือเป็นตัวเผาโทเค็น ot เพื่อให้หน่วยความจำถูกเรียกคืนได้ หน่วยความจำเหล่านั้นจะต้องถูกดึงออกมาและจัดเก็บด้วย ทุกๆ ครั้ง (การเลื่อนทางความหมาย, K เทิร์นตั้งแต่การดึงข้อมูลครั้งล่าสุด, การสิ้นสุดเซสชัน ฯลฯ) หน่วยความจำจะถูกดึงออกมาผ่านหน่วยความจำ sideagent และนำไปใส่ในกราฟหน่วยความจำ

ชุดเครื่องมือยังจัดเตรียมเครื่องมือหน่วยความจำที่ชัดเจนเพื่อให้ agent สามารถค้นหาหรือจัดเก็บหน่วยความจำได้อย่างกระตือรือร้นโดยไม่ต้องพึ่งพากระบวนการพื้นหลังแบบพาสซีฟ ชุดเครื่องมือยังจัดเตรียมการค้นหาเซสชันสำหรับ RAG แบบดั้งเดิมในเซสชันก่อนหน้า

หน่วยความจำจะถูกรวมเข้าด้วยกันโดยอัตโนมัติเป็นครั้งคราวผ่านโหมดแอมเบียนต์ สิ่งนี้จะจัดระเบียบใหม่ ตรวจสอบความล้าสมัยและความขัดแย้ง ฯลฯ

jcode memory demonstration

UI: แผงด้านข้าง, แผนภาพ, วิดเจ็ตข้อมูล, การเรนเดอร์, การเลื่อน, การจัดตำแหน่ง

แผงด้านข้างเป็นที่สำหรับข้อมูลเสริม บอกให้ agent ของ jcode โหลดไฟล์ลงในแผงด้านข้างและดูการอัปเดตแบบเรียลไทม์ หรือบอกให้ agent เขียนลงในแผงด้านข้างโดยตรง หรือใช้เป็นตัวดูความแตกต่าง แผงด้านข้าง (และแชท) สามารถเรนเดอร์แผนภาพ mermaid แบบอินไลน์ได้ image

เพื่อให้สิ่งนี้เป็นไปได้ ผมได้สร้างไลบรารีการเรนเดอร์ mermaid ใหม่เพื่อเรนเดอร์แผนภาพได้เร็วขึ้น 1800 เท่า ไม่มีเบราว์เซอร์หรือการพึ่งพา Typescript ดูที่ https://github.com/1jehuang/mermaid-rs-renderer

เพื่อแสดงข้อมูลสำคัญโดยไม่ใช้พื้นที่หน้าจอที่สามารถใช้สำหรับการตอบกลับ ผมได้พัฒนาวิดเจ็ตข้อมูล วิดเจ็ตข้อมูลจะใช้พื้นที่ว่างบนหน้าจอเพื่อแสดงข้อมูลเท่านั้น และจะหลีกทางให้หากไม่มีข้อมูลใดๆ

Jcode สามารถเรนเดอร์ได้มากกว่าหนึ่งพันเฟรมต่อวินาที จอภาพของคุณจะไม่มีอัตราการรีเฟรชที่แสดงให้เห็นได้ แต่สิ่งนี้หมายความว่าคุณจะไม่มีปัญหาการกะพริบที่น่ารำคาญ

การใช้งาน scrollback แบบกำหนดเองของ jcode ช่วยให้ทำอะไรได้มากกว่า scrollback ดั้งเดิม อย่างไรก็ตาม เป็นข้อจำกัดระดับเทอร์มินัลที่ผมไม่สามารถมีการเลื่อนบรรทัดแบบบางส่วนที่ราบรื่นด้วย scrollback แบบกำหนดเองได้ เพื่อแก้ไขปัญหานี้ ผมได้สร้างเทอร์มินัลของตัวเอง Handterm https://github.com/1jehuang/handterm ใช้งาน API การเลื่อนแบบเนทีฟ และยังทำงานได้อย่างมีประสิทธิภาพอีกด้วย นี่เป็นงานที่กำลังดำเนินการอยู่ การเลื่อนยังคงใช้งานได้ดีสำหรับเทอร์มินัลทั่วไป

Jcode จัดตำแหน่งซ้ายโดยค่าเริ่มต้น คุณสามารถเปลี่ยนเป็นโหมดจัดกึ่งกลางได้ด้วยปุ่มลัด Alt+C ด้วยคำสั่ง /alignment หรือในการตั้งค่า

หากต้องการปิดใช้งานอีโมจิโดยรวมในเอาต์พุต TUI และ CLI ให้ตั้งค่า emoji = false ใต้ [display] ใน ~/.jcode/config.toml หรือเปิดใช้งานด้วย JCODE_NO_EMOJI=1 Jcode จะแทนที่อีโมจิด้วยเครื่องหมาย ASCII ขนาดกะทัดรัดในขณะที่ยังคงรักษาข้อความ Unicode อื่นๆ ไว้


Swarm

สร้าง agent สองตัวขึ้นไปใน repo เดียวกัน และเซิร์ฟเวอร์จะจัดการพวกมันโดยอัตโนมัติเพื่อให้สามารถทำงานร่วมกันได้ เมื่อ agent A แก้ไขไฟล์ที่ agent B ได้อ่าน (โค้ดเปลี่ยนไป) เซิร์ฟเวอร์จะแจ้ง agent B Agent B สามารถละเว้นได้หากไม่เกี่ยวข้อง หรือสามารถตรวจสอบความแตกต่างเพื่อให้แน่ใจว่าไม่มีข้อขัดแย้ง Agent แต่ละตัวมีความสามารถในการส่งข้อความ สามารถส่ง DM ไปยัง agent เพียงตัวเดียว ออกอากาศไปยัง agent อื่นๆ ทั้งหมดที่โฮสต์โดยเซิร์ฟเวอร์ หรือเฉพาะ agent ที่ทำงานใน repo นั้น สิ่งนี้ช่วยให้คุณสามารถสร้างหลายเซสชันใน repo เดียวกัน และแก้ไขข้อขัดแย้งทั้งหมดโดยอัตโนมัติ

jcode swarm demonstration

Agent ยังสามารถสร้าง swarm ของตัวเองได้โดยอัตโนมัติ พวกเขามีเครื่องมือ swarm ที่ช่วยให้พวกเขาสามารถสร้างเพื่อนร่วมทีมของตัวเองเพื่อทำงานหลายอย่างพร้อมกันได้ การทำเช่นนั้นจะเปลี่ยน agent หลักให้เป็นผู้ประสานงานและ agent ที่สร้างขึ้นมาเป็นผู้ปฏิบัติงาน กลุ่มของ agent ช่องทางการส่งข้อความ สถานะการทำงาน ฯลฯ ทั้งหมดจะถูกจัดการโดยอัตโนมัติ สิ่งนี้สามารถทำได้โดยไม่มีส่วนหัวหรือมีส่วนหัว


OAuth และผู้ให้บริการ

jcode ทำงานร่วมกับ OAuth flow ที่รองรับการสมัครสมาชิกและการรวมผู้ให้บริการหลายราย คุณจึงสามารถใช้โมเดลที่คุณจ่ายเงินไปแล้ว และยังสามารถกลับไปใช้ผู้ให้บริการ API โดยตรงได้เมื่อจำเป็น

การเข้าสู่ระบบในตัวที่รองรับ

  • Claude (jcode login --provider claude)
  • OpenAI / ChatGPT / Codex (jcode login --provider openai)
  • Google Gemini (jcode login --provider gemini)
  • GitHub Copilot (jcode login --provider copilot)
  • Azure OpenAI (jcode login --provider azure)
  • Alibaba Cloud Coding Plan (jcode login --provider alibaba-coding-plan)
  • Fireworks (jcode login --provider fireworks)
  • MiniMax (jcode login --provider minimax)
  • LM Studio (jcode login --provider lmstudio)
  • Ollama (jcode login --provider ollama)
  • Custom OpenAI-compatible endpoint (jcode login --provider openai-compatible)

สำหรับปลายทางที่เข้ากันได้กับ OpenAI แบบกำหนดเอง ตอนนี้ jcode จะแจ้งให้ป้อน API base และรองรับเซิร์ฟเวอร์ localhost ในเครื่องโดยไม่ต้องใช้ API key

การตั้งค่าไฟล์คอนฟิกสำหรับปลายทางที่โฮสต์เองและ MCP

หากคุณต้องการกำหนดค่าโดยการแก้ไขไฟล์แทนการใช้ UI การเข้าสู่ระบบ jcode รองรับทั้งการกำหนดค่าปลายทางที่เข้ากันได้กับ OpenAI แบบกำหนดเองและไฟล์คอนฟิก MCP

ผู้ให้บริการที่เข้ากันได้กับ OpenAI

บริการโฮสต์หลายแห่งใช้ API /v1/chat/completions มาตรฐานของ OpenAI jcode สื่อสารกับบริการเหล่านั้นผ่านผู้ให้บริการที่เข้ากันได้กับ OpenAI ที่ใช้ร่วมกัน คุณจึงสามารถใช้ปลายทางดังกล่าวได้เกือบทุกแห่งโดยไม่ต้องรอการรวมเฉพาะ

มีสองวิธีในการตั้งค่า:

  • **โปรไฟล์ที่มีชื่อในตัว** — jcode มาพร้อมกับโปรไฟล์ที่สร้างไว้ล่วงหน้าสำหรับบริการที่เข้ากันได้กับ OpenAI ยอดนิยมหลายแห่ง เข้าสู่ระบบด้วย id และ jcode จะกรอก URL พื้นฐานและตัวแปรสภาพแวดล้อมคีย์ให้คุณ: jcode login --provider <profile-id> # ตัวอย่างเช่น: jcode login --provider openrouter jcode login --provider deepseek jcode login --provider opencode # OpenCode Zen jcode login --provider moonshotai โปรไฟล์ที่เข้ากันได้กับ OpenAI ในตัว ได้แก่: `openrouter`, `deepseek`, `zai`, `kimi`, `moonshotai`, `opencode` (OpenCode Zen), `opencode-go`, `302ai`, `baseten`, `cortecs`, `huggingface`, `nebius`, `scaleway`, `stackit`, และ `firmware` แต่ละโปรไฟล์จะตั้งค่าเฉพาะปลายทางและตัวแปรคีย์เท่านั้น คุณยังคงเลือกโมเดลด้วย `/model` (หรือ `--model`) เรียกใช้ `jcode login` โดยไม่มีผู้ให้บริการเพื่อดูรายการแบบโต้ตอบ
  • **ปลายทางอื่นๆ** — ชี้ jcode ไปยัง API ที่เข้ากันได้กับ OpenAI (โฮสต์หรือในเครื่อง) ด้วย `jcode login --provider openai-compatible` หรือคำสั่ง `jcode provider add` ที่สามารถเขียนสคริปต์ได้ตามที่อธิบายไว้ด้านล่าง

การแทนที่สภาพแวดล้อมที่เป็นประโยชน์สำหรับปลายทางเหล่านี้:

  • JCODE_STREAM_IDLE_TIMEOUT_SECS — เพิ่มระยะหมดเวลาการสตรีมเริ่มต้น (ค่าเริ่มต้น 180 วินาที) สำหรับโมเดลการให้เหตุผลที่ช้าซึ่งคิดเงียบๆ ก่อนที่จะปล่อยโทเค็น ความพยายามในการให้เหตุผลสูงจะปรับขนาดนี้โดยอัตโนมัติ (สูง 2x, xhigh 3x, สูงสุด 4x) สามารถตั้งค่าเป็น [provider] stream_idle_timeout_secs ใน config.toml ได้ด้วย
  • context_window (นามแฝง context_limit) ต่อโมเดลในรายการ [[providers.<name>.models]] — ตั้งค่าหน้าต่างบริบทเมื่อปลายทางไม่มีการตอบกลับ /v1/models ที่ใช้งานได้ เพื่อให้ jcode ไม่กลับไปใช้ค่าเริ่มต้นทั่วไป 200k
  • extra_body — แทรกฟิลด์ระดับบนสุดที่ไม่เป็นมาตรฐานลงในเนื้อหาคำขอ chat/completions ทุกครั้งสำหรับแบ็กเอนด์ที่ต้องการ ดู Extra request-body fields ด้านล่าง

สำหรับรายละเอียดเกี่ยวกับการโฮสต์ด้วยตนเอง, รันไทม์ในเครื่อง, และรูปแบบไฟล์คอนฟิกที่แน่นอน โปรดดูด้านล่าง

ปลายทางที่เข้ากันได้กับ OpenAI ที่โฮสต์ด้วยตนเอง รวมถึง vLLM

สำหรับเอเจนต์และสคริปต์ วิธีที่แนะนำคือคำสั่งโปรไฟล์ผู้ให้บริการแบบครั้งเดียว (one-shot provider profile command) ซึ่งจะเขียนโปรไฟล์ที่มีชื่อลงใน ~/.jcode/config.toml, จัดเก็บข้อมูลลับในไดเรกทอรีคอนฟิกแอปส่วนตัวของ jcode เมื่อมีการร้องขอ, และพิมพ์คำสั่งรัน/ตรวจสอบความถูกต้องที่แน่นอน:

bash
# Secret-safe setup for a hosted OpenAI-compatible API.
printf '%s' "$MY_API_KEY" | jcode provider add my-api \
  --base-url https://llm.example.com/v1 \
  --model my-model-id \
  --api-key-stdin \
  --set-default \
  --json

# Smoke test the profile.
jcode --provider-profile my-api auth-test --prompt 'Reply exactly JCODE_PROVIDER_SETUP_OK'

# Use it directly.
jcode --provider-profile my-api run 'hello'

สำหรับเซิร์ฟเวอร์ในเครื่องที่ไม่ต้องการการยืนยันตัวตน:

bash
jcode provider add local-vllm \
  --base-url http://localhost:8000/v1 \
  --model Qwen/Qwen3-Coder-30B-A3B-Instruct \
  --no-api-key \
  --set-default

โปรไฟล์ในเครื่องที่มาพร้อมใช้งานสำหรับรันไทม์เดสก์ท็อป/ในเครื่องทั่วไป:

bash
# Ollama: start the local server and install a model first.
ollama pull llama3.2
jcode login --provider ollama
jcode --provider ollama --model llama3.2 run 'hello'

# LM Studio: start the Local Server, load a chat model, then use the exact
# model identifier shown by LM Studio or by curl http://localhost:1234/v1/models.
jcode login --provider lmstudio
jcode --provider lmstudio --model '<model-id>' run 'hello'

Ollama และ LM Studio ทั้งคู่เปิดเผยปลายทาง /v1/models และ /v1/chat/completions ที่เข้ากันได้กับ OpenAI jcode ใช้การเติมข้อความแชทแบบสตรีมมิ่ง, การเรียกใช้ฟังก์ชัน/เครื่องมือ, และเนื้อหารูปภาพสไตล์ OpenAI สำหรับโมเดลในเครื่องที่รองรับวิสัยทัศน์ หากเซิร์ฟเวอร์ในเครื่องต้องการโทเค็น ให้ป้อนระหว่าง jcode login หรือสร้างโปรไฟล์ที่มีชื่อด้วย --api-key-stdin

แฟล็กที่มีประโยชน์:

  • --api-key-env NAME: อ้างอิงตัวแปรสภาพแวดล้อมที่มีอยู่แทนการจัดเก็บคีย์
  • --api-key-stdin: อ่านและจัดเก็บคีย์โดยไม่ใส่ไว้ในประวัติเชลล์
  • --context-window TOKENS: คงหน้าต่างบริบทของโมเดลสำหรับการเลือกและกำหนดเส้นทางโมเดล
  • --overwrite: แทนที่โปรไฟล์ที่มีอยู่ซึ่งมีชื่อเดียวกัน
  • --model-catalog: ใช้การตอบสนอง /models ของปลายทางนอกเหนือจากโมเดลที่กำหนดค่าไว้

โปรไฟล์ที่สร้างขึ้นสามารถแก้ไขได้ด้วยตนเองใน ~/.jcode/config.toml:

toml
[provider]
default_provider = "my-api"
default_model = "my-model-id"

[providers.my-api]
type = "openai-compatible"
base_url = "https://llm.example.com/v1"
api_key_env = "JCODE_PROVIDER_MY_API_API_KEY"
env_file = "provider-my-api.env"
default_model = "my-model-id"

[[providers.my-api.models]]
id = "my-model-id"
context_window = 128000

ฟิลด์เนื้อหาคำขอเพิ่มเติม (extra_body)

แบ็กเอนด์ที่เข้ากันได้กับ OpenAI บางตัวต้องการฟิลด์คำขอระดับบนสุดที่ไม่เป็นมาตรฐาน ตัวอย่างเช่น โมเดลการให้เหตุผล NVIDIA NIM DeepSeek-V4 (deepseek-ai/deepseek-v4-flash, deepseek-ai/deepseek-v4-pro) จะเปิดใช้งานการคิดก็ต่อเมื่อคำขอมี chat_template_kwargs เท่านั้น หากไม่มี โมเดลจะตอบกลับโดยไม่มีการให้เหตุผล (หรือในบางการปรับใช้ อาจค้าง) jcode ช่วยให้คุณสามารถแทรกฟิลด์ระดับบนสุดตามอำเภอใจได้สองวิธี

  1. 1ต่อโปรไฟล์ที่มีชื่อ ผ่าน `extra_body` ใน `config.toml` (ตาราง TOML ที่รวมเข้ากับเนื้อหา JSON ตามตัวอักษร): [providers.my-nim] type = "openai-compatible" base_url = "https://integrate.api.nvidia.com/v1" api_key_env = "NVIDIA_API_KEY" default_model = "deepseek-ai/deepseek-v4-flash" [providers.my-nim.extra_body.chat_template_kwargs] thinking = true reasoning_effort = "high"
  2. 2สำหรับโปรไฟล์ในตัว (เช่น `nvidia-nim`) หรือปลายทางใดๆ ผ่านตัวแปรสภาพแวดล้อม `JCODE_OPENAI_EXTRA_BODY` (สตริงออบเจกต์ JSON) สามารถอยู่ในไฟล์ env ของผู้ให้บริการ (`~/.config/jcode/nvidia-nim.env`) ถัดจากคีย์ API: JCODE_OPENAI_EXTRA_BODY={"chat_template_kwargs":{"thinking":true,"reasoning_effort":"high"}}

คีย์จาก extra_body จะถูกรวมเป็นลำดับสุดท้ายและจะแทนที่ฟิลด์เนื้อหาที่ jcode สร้างขึ้นซึ่งมีชื่อเดียวกัน (JCODE_OPENAI_EXTRA_BODY จะมีผลเหนือกว่า extra_body ในคอนฟิกเมื่อเกิดการชนกันของคีย์) ค่าที่ไม่ถูกต้องจะถูกบันทึกและละเว้นแทนที่จะทำให้คำขอล้มเหลว

ผู้ให้บริการที่เข้ากันได้กับ OpenAI แบบกำหนดเองจะอ่านการแทนที่จากตัวแปรสภาพแวดล้อมหรือจากไฟล์ env ในไดเรกทอรีคอนฟิกแอปของ jcode บน Linux โดยปกติคือ ~/.config/jcode/ ดังนั้นไฟล์เริ่มต้นมักจะเป็น:

text
~/.config/jcode/openai-compatible.env

ตัวอย่างสำหรับเซิร์ฟเวอร์ vLLM ในเครื่องหรือ LAN:

bash
JCODE_OPENAI_COMPAT_API_BASE=http://192.168.1.50:8000/v1
JCODE_OPENAI_COMPAT_DEFAULT_MODEL=Qwen/Qwen3-Coder-30B-A3B-Instruct
# Optional if your server expects auth
OPENAI_COMPAT_API_KEY=your-token-here

หมายเหตุ:

  • jcode login --provider openai-compatible สามารถสร้างหรืออัปเดตสิ่งนี้ให้คุณได้
  • ยอมรับ http:// แบบธรรมดาสำหรับ localhost และ IP LAN ส่วนตัว แต่ยังคงปฏิเสธ HTTP สาธารณะระยะไกล
  • ปลายทาง HTTPS ทำงานได้ตามปกติ

ไฟล์คอนฟิก MCP

คอนฟิก MCP แยกต่างหากจาก config.toml

ไฟล์คอนฟิกหลัก:

  • ~/.jcode/mcp.json สำหรับเซิร์ฟเวอร์ MCP ทั่วโลก
  • .jcode/mcp.json สำหรับเซิร์ฟเวอร์ MCP เฉพาะโปรเจกต์

ความเข้ากันได้กับ Claude Code:

  • ~/.claude.json (คอนฟิกผู้ใช้ของ Claude Code): mcpServers ระดับบนสุด, บวกกับเซิร์ฟเวอร์ต่อโปรเจกต์ภายใต้ projects.<abs_path>.mcpServers สำหรับไดเรกทอรีปัจจุบัน
  • .mcp.json ที่รูทของ repo (คอนฟิกโปรเจกต์ของ Claude Code)
  • .claude/mcp.json (การสำรองข้อมูลแบบเก่า)

ทั้งคีย์ mcpServers แบบ Canonical และคีย์ servers แบบเก่าของ jcode ได้รับการยอมรับ ปัจจุบัน jcode รองรับเฉพาะเซิร์ฟเวอร์ stdio (แบบใช้คำสั่ง) เท่านั้น; รายการ HTTP/SSE ("type": "http"/"sse") จะถูกจดจำและข้ามไปพร้อมกับบันทึกข้อความ

ตัวอย่างคอนฟิก MCP:

json
{
  "mcpServers": {
    "filesystem": {
      "command": "/path/to/mcp-server",
      "args": ["--root", "/workspace"],
      "env": {},
      "shared": true
    }
  }
}

ในการรันครั้งแรก jcode จะพยายามนำเข้าเซิร์ฟเวอร์ MCP จาก ~/.claude.json (โดยใช้ ~/.claude/mcp.json แบบเก่าเป็นตัวสำรอง) และ ~/.codex/config.toml หาก ~/.jcode/mcp.json ยังไม่มีอยู่

สำหรับเซสชันแบบ headless หรือ SSH ผู้ให้บริการสไตล์ OAuth รองรับ jcode login --provider <provider> --no-browser (ชื่อเรียกย่อ: --headless) เพื่อให้ jcode พิมพ์ URL/QR สำหรับการยืนยันตัวตน และเปลี่ยนไปใช้การป้อนโค้ดด้วยตนเองหรือการวาง callback แทนที่จะพยายามเปิดเบราว์เซอร์ในเครื่อง

สำหรับเวิร์กโฟลว์ระยะไกลที่สามารถเขียนสคริปต์ได้มากขึ้น claude, openai, gemini, และ antigravity ยังรองรับรูปแบบสองขั้นตอน:

bash
# Step 1: print a resumable auth URL
jcode login --provider openai --print-auth-url --json

# Step 2: complete later with the callback URL or auth code
jcode login --provider openai --callback-url 'http://localhost:1455/auth/callback?...'
jcode login --provider gemini --auth-code '...'

กรณีที่สามารถเขียนสคริปต์เพิ่มเติมได้:

bash
# Copilot device flow: print URL + user code, then complete later
jcode login --provider copilot --print-auth-url --json
jcode login --provider copilot --complete

# Gmail/Google OAuth after credentials are already configured
jcode login --provider google --print-auth-url --google-access-tier readonly
jcode login --provider google --callback-url 'http://127.0.0.1:8456?...'

สถานะการเข้าสู่ระบบที่สามารถเขียนสคริปต์ได้ที่รอดำเนินการจะถูกจัดเก็บไว้ใต้ ~/.jcode/pending-login/, จะหมดอายุโดยอัตโนมัติ, และรายการที่ล้าสมัยจะถูกล้างเมื่อมีการเริ่มหรือดำเนินการต่อการเข้าสู่ระบบที่สามารถเขียนสคริปต์ได้ใหม่

สำหรับขั้นตอนการเข้าสู่ระบบ OpenAI ในตัว jcode จะเปิด callback ในเครื่องที่ http://localhost:1455/auth/callback โดยค่าเริ่มต้น

Screenshot from 2026-04-02 14-28-51

ผู้ให้บริการที่รองรับ

  • ผู้ให้บริการสไตล์ Native / บุคคลที่หนึ่ง: claude, openai, copilot, gemini, azure, alibaba-coding-plan
  • ผู้ให้บริการแบบรวม / เข้ากันได้: openrouter, openai-compatible
  • การรวมผู้ให้บริการเพิ่มเติม: opencode, opencode-go, zai / kimi, 302ai, baseten, cortecs, deepseek, firmware, huggingface, moonshotai, nebius, scaleway, stackit, groq, mistral, perplexity, togetherai, deepinfra, fireworks, minimax, xai, lmstudio, ollama, chutes, cerebras, cursor, antigravity, google

Jcode ยังรองรับการสลับหลายบัญชีได้อย่างง่ายดาย โทเค็นหมดจากการสมัครสมาชิก ChatGPT Pro ครั้งแรกของคุณใช่ไหม? ใช้ /account และสลับไปยังบัญชีที่สองของคุณได้อย่างรวดเร็ว


การปรับแต่ง / การพัฒนาตนเอง

Jcode กำลังคิดค้นรูปแบบใหม่ของการปรับแต่ง ซึ่งไม่จำกัดคุณอยู่แค่สิ่งที่ปลั๊กอินหรือส่วนขยายทำได้ บอกให้เอเจนต์ jcode ของคุณเข้าสู่โหมดการพัฒนาตนเอง แล้วมันจะเริ่มแก้ไขซอร์สโค้ดของตัวเอง Jcode ได้รับการปรับให้เหมาะสมเพื่อวนซ้ำบนตัวเอง มีโครงสร้างพื้นฐานที่สำคัญรอบการพัฒนาตนเอง ซึ่งช่วยให้สามารถแก้ไข, สร้าง, และทดสอบซอร์สโค้ดของตัวเอง จากนั้นโหลดไบนารีของตัวเองใหม่และทำงานต่อในเซสชันของคุณ (ซึ่งอาจมีหลายเซสชัน) โดยอัตโนมัติทั้งหมด

ขอแนะนำให้คุณใช้โมเดลระดับแนวหน้าสำหรับสิ่งนี้ โค้ดเบสของ jcode ไม่ใช่เรื่องง่าย และโมเดลที่อ่อนแอกว่าอาจทำให้เกิดการเปลี่ยนแปลงที่ละเอียดอ่อนและทำให้ระบบเสียหายได้ GPT 5.5 หรือโมเดลระดับแนวหน้าล่าสุดที่พร้อมใช้งานทำงานได้ดี


เบ็ดเตล็ด

รายละเอียดเล็กๆ น้อยๆ คือสิ่งสำคัญ มีการปรับปรุงประสิทธิภาพและความสะดวกสบายที่ไม่ได้บันทึกไว้มากมายที่ jcode นำมาใช้ ตัวอย่างบางส่วน:

แคชของ Claude ของ Anthropic จะหมดอายุหลังจาก 5 นาที หากคุณเริ่มต้น Claude หลังจาก 5 นาทีนี้ แคชจะไม่ตรงกัน ซึ่งอาจทำให้คุณเสียโทเค็นจำนวนมาก UI จะเตือนคุณเมื่อแคชหมดอายุ และแจ้งให้คุณทราบหากเกิดแคชไม่ตรงกันโดยไม่คาดคิด

jcode มาพร้อมคำแนะนำในการตั้งค่า Firefox Agent Bridge ขอให้เอเจนต์ของคุณตั้งค่า และคุณก็จะมีระบบอัตโนมัติของเบราว์เซอร์ใน jcode ด้วย

Agent grep เป็นเครื่องมือ grep ที่ผมสร้างขึ้นสำหรับเอเจนต์ jcode มันเพิ่มข้อมูลโครงสร้างไฟล์ (เช่น รายการฟังก์ชัน ตำแหน่งของฟังก์ชัน ฯลฯ) ไปยังผลลัพธ์ของ grep เพื่อให้เอเจนต์สามารถอนุมานได้มากขึ้นว่าไฟล์ทำอะไรโดยไม่ต้องอ่านไฟล์จริง นอกจากนี้ยังมีการรวมระดับฮาร์เนสที่ตัดทอนผลลัพธ์อย่างปรับเปลี่ยนได้ตามสิ่งที่เอเจนต์เคยเห็นมาแล้ว สิ่งนี้ช่วยประหยัดบริบทได้มาก

โดยค่าเริ่มต้น อินพุตจะถูกสลับกับการทำงานของเอเจนต์ มันจะส่งอินพุตทันทีที่ทำได้อย่างปลอดภัยโดยไม่ทำให้ KV cache เสียหาย หากส่งด้วย Shift + Enter แทน มันจะส่งคำสั่งเข้าคิว และรอให้เอเจนต์ทำงานเสร็จสมบูรณ์ก่อนที่จะส่ง

ดำเนินการเซสชันต่อจากฮาร์เนสที่แตกต่างกัน โค้ด Claude ของคุณพังใช่ไหม? ดำเนินการเซสชันต่อจาก jcode และทำต่อจากจุดที่คุณค้างไว้ รองรับการดำเนินการเซสชันต่อสำหรับ codex, claude code, opencode และ pi

Screenshot from 2026-04-11 16-28-52

ทักษะไม่ได้ถูกโหลดทั้งหมดเมื่อเริ่มต้น การสนทนาจะถูกฝังเป็นเวกเตอร์เชิงความหมาย และจะแทรกทักษะโดยอัตโนมัติหากมีการฝังที่คล้ายกับความทรงจำ เอเจนต์มีเครื่องมือทักษะให้คุณเปิดใช้งานทักษะได้ด้วยตนเองทุกเมื่อ คุณยังสามารถเปิดใช้งานผ่านคำสั่งสแลชได้อีกด้วย


แอปพลิเคชัน iOS / Native OpenClaw

แอปพลิเคชัน jcode เวอร์ชัน iOS แบบเนทีฟกำลังจะมาเร็วๆ นี้ สิ่งนี้จะช่วยให้คุณสามารถทำงานกับ jcode บนสภาพแวดล้อมของเครื่องส่วนตัวของคุณจากโทรศัพท์ของคุณผ่าน Tailscale คุณสมบัติที่คล้ายกับ Openclaw จะถูกรวมอยู่ในแอปพลิเคชัน iOS นี้


คุณสมบัติอื่นๆ ที่วางแผนไว้

เอเจนต์ไม่ชอบคอมมิตในสถานะ Git ที่ไม่สะอาดและมีการเปลี่ยนแปลงที่กำลังใช้งานอยู่ Git ไม่ได้ถูกสร้างมาสำหรับเวิร์กโฟลว์แบบหลายเอเจนต์อย่างชัดเจน และ git worktrees ก็ไม่ใช่ทางออกที่ดี จากสิ่งนี้ ผมเชื่อว่านี่เป็นโอกาสที่จะเกิด Git primitive แบบใหม่ขึ้นมา

การปรับปรุงความเร็วในการบิลด์: การบิลด์ cargo แบบดีบักที่เพิ่มขึ้นโดยเปิดใช้งานแคชใช้เวลาประมาณ 1 นาทีบนเครื่องของผม เป้าหมายคือ 5-20 วินาที การปรับโครงสร้างโค้ดและการแยก crates ควรจะทำให้สิ่งนี้เกิดขึ้นได้


เริ่มต้นใช้งานอย่างรวดเร็ว

bash
# เปิด TUI
jcode

# รันคำสั่งเดียวแบบไม่โต้ตอบ
jcode run "say hello"

# ดำเนินการเซสชันก่อนหน้าต่อด้วยชื่อที่จำง่าย
jcode --resume fox

# รันเป็นเซิร์ฟเวอร์แบ็กกราวด์แบบถาวร จากนั้นเชื่อมต่อไคลเอนต์เพิ่มเติม
jcode serve
jcode connect

# ส่งอินพุตเสียงจากคำสั่ง STT ที่คุณกำหนดค่าไว้
jcode dictate

jcode รองรับการใช้งาน TUI แบบโต้ตอบ, การรันแบบไม่โต้ตอบ, เวิร์กโฟลว์เซิร์ฟเวอร์/ไคลเอนต์แบบถาวร และการป้อนข้อมูลด้วยเสียงที่ใช้งานง่ายด้วยปุ่มลัด โดยไม่ต้องใช้ชุด Speech-to-Text ในตัว

jcode workflow demonstration

ระบบอัตโนมัติของเบราว์เซอร์

jcode มีเครื่องมือ browser ในตัวระดับเฟิร์สคลาสสำหรับการควบคุมเบราว์เซอร์ภายในเซสชันของเอเจนต์

แบ็กเอนด์ในตัวปัจจุบัน:

  • Firefox ผ่าน Firefox Agent Bridge

การดำเนินการของเครื่องมือในตัวปัจจุบันประกอบด้วย:

  • status
  • setup
  • open
  • snapshot
  • get_content
  • interactables
  • click
  • type
  • fill_form
  • select
  • wait
  • screenshot
  • eval
  • scroll
  • upload
  • press

การตั้งค่าด่วน:

bash
jcode browser status
jcode browser setup

เมื่อการตั้งค่าเสร็จสมบูรณ์ โมเดลสามารถใช้เครื่องมือ browser ในตัวได้โดยตรง UI ยังสรุปการเรียกใช้เครื่องมือเบราว์เซอร์อย่างกระชับ เช่น การเปิด URL, การคลิกตัวเลือก หรือการพิมพ์ลงในช่องโดยไม่แสดงข้อความที่ละเอียดอ่อนที่พิมพ์

หมายเหตุ:

  • สถาปัตยกรรมผู้ให้บริการ/เครื่องมือพร้อมใช้งานสำหรับแบ็กเอนด์เพิ่มเติม
  • Firefox เป็นแบ็กเอนด์ในตัวที่เชื่อมต่ออยู่ ณ ปัจจุบัน
  • ผู้ให้บริการสไตล์ Chrome bridge / remote debugging สามารถเพิ่มเข้ามาบนเครื่องมือเบราว์เซอร์เดียวกันได้ในภายหลัง

อ่านเพิ่มเติม

เอกสารโปรเจกต์

อ่านเอกสารต้นฉบับ

README วิธีติดตั้ง วิธีใช้งาน และข้อกำหนดจาก repository ต้นฉบับ

ดูไฟล์บน GitHub

jcode

Latest Release License: MIT Platforms Last Commit GitHub Stars Discord

The most RAM efficient harness The most most intelligent harness

jcode memory demonstration

Website · Docs · Benchmarks · Features · Install · Quick Start · Further Reading · Contributing


Installation

bash
# macOS & Linux
curl -fsSL https://jcode.sh/install | bash
powershell
# Windows 11 (PowerShell 5.1+)
irm https://jcode.sh/install.ps1 | iex

Need Homebrew, source builds, provider setup, or want an agent to set it up for you? Jump to detailed installation.


Performance & Resource Efficiency

jcode is built to be as performant and resource efficient as possible. Every metric is optimized to the bone, which is important for scaling multi-session workflows. Here we sample a few metrics to show the difference: RAM usage and boot up.

RAM comparison

Time to first frame

ToolTime to first frameRangeComparison
jcode14.0 ms10.1–19.3 msbaseline
Antigravity CLI383.5 ms363.1–415.4 ms27.4× slower
pi590.7 ms369.6–934.8 ms42.2× slower
Codex CLI882.8 ms742.3–1640.9 ms63.1× slower
OpenCode1035.9 ms922.5–1104.4 ms74.0× slower
GitHub Copilot CLI1518.6 ms1357.4–1826.8 ms108.5× slower
Cursor Agent1949.7 ms1711.0–2104.8 ms139.3× slower
Claude Code3436.9 ms2032.7–8927.2 ms245.5× slower

Measured on this Linux machine across 10 interactive PTY launches.

Time to first input

(time until typed probe text appears on the rendered screen; Antigravity uses its internal input-ready log marker because the sign-in screen suppresses probe echo.)

ToolTime to first inputRangeComparison
jcode48.7 ms30.3–62.7 msbaseline
Antigravity CLI383.7 ms363.4–415.7 ms7.9× slower
pi596.4 ms373.9–955.2 ms12.2× slower
Codex CLI905.8 ms760.1–1675.7 ms18.6× slower
OpenCode1047.9 ms931.1–1116.9 ms21.5× slower
GitHub Copilot CLI1583.4 ms1422.8–1880.0 ms32.5× slower
Cursor Agent1978.7 ms1727.3–2130.0 ms40.6× slower
Claude Code3512.8 ms2137.4–9002.0 ms72.2× slower

Measured on this Linux machine across 10 interactive PTY launches. Antigravity CLI was unauthenticated for this run; its sign-in screen rendered normally and emitted an internal CLI ready for user input marker, but did not echo the typed probe.

Additional clients / memory scaling

ToolExtra PSS per added sessionComparison
jcode (local embedding off)~9.9 MBbaseline
jcode~10.4 MB1.1× more RAM
pi~76.5 MB7.7× more RAM
Codex CLI~21.6 MB2.2× more RAM
OpenCode~318.4 MB32.2× more RAM
GitHub Copilot CLI~158.1 MB16.0× more RAM
Cursor Agent~157.5 MB15.9× more RAM
Claude Code~212.7 MB21.5× more RAM
Antigravity CLI~86.4 MB8.7× more RAM
  • jcode v0.9.1888-dev (be386f2)
  • pi 0.62.0
  • codex-cli 0.120.0
  • opencode 1.0.203
  • GitHub Copilot CLI 1.0.24 for the 1-session rerun, GitHub Copilot CLI 1.0.27 for the 10-session rerun
  • Cursor Agent 2026.04.08-a41fba1
  • Claude Code 2.1.86 (Claude Code)
  • Antigravity CLI 1.0.0
jcode performance demonstration

Memory (Agent memory)

Jcode embeds each turn/response as a semantic vector. Every turn does queries a graph of memories to efficiently find related memory entries via a cosine similarity check. The embedding hits are fed into the conversation, or optionally uses a memory sideagent which verifies the memories are relevant, and potentially does more work for information retreival before injecting into the conversation. This results in a human like memory system which allows the agent to automatically recall relevant information to the conversation without actively calling memory tools or being a token burner. ot To have memories which are retrieved, they must also be extracted and stored. Every so often (semantic drift, K turns since last extraction, session end, etc), memories are extracted via a memory sideagent, and put into the memory graph.

The harness also provides explicit memory tools to allow the agent to actively search or store the memory without relying on a passive background process. The harness also provides session search for traditional RAG on previous sessions.

Memories are automatically consolidated every so often via the ambient mode. This reorganizes, checks for staleness and conflicts, etc

jcode memory demonstration

UI: Side panels, Diagrams, Info Widgets, rendering, scrolling, alignment

The side panel is a place for auxiliary information. Tell your jcode agent to load a file into the side panel and see it update in real time, or tell your agent to write directly to the side panel, or use it as a diff viewer. The side panel (and chat) is able to render mermaid diagrams inline. image

To make this possible, I created a new mermaid rendering library to render diagrams 1800x faster. It has no browser or Typescript dependency. See https://github.com/1jehuang/mermaid-rs-renderer

To show you important information without taking space away from the screen that could be used for responses, I developed info widgets. Info widgets will only ever take up the negative space on the screen to show you information, and will get out of the way if there isn't any.

Jcode can render at over a thousand fps. Your monitor will not have the refresh rate to show you, but this means you will not have silly flicker problems.

The custom scrollback implementation of jcode allows it to do much more than a native scrollback. However, it is a terminal-level limitation that I cannot have smooth, partial line scrolling with a custom scrollback. To fix this, I made my own terminal. Handterm https://github.com/1jehuang/handterm implements a native scroll api, and also happens to be very effiecent. This is a work in progress. Scrolling is still well implemented for normal terminals.

Jcode is left-aligned by default. You can switch to centered mode with the Alt+C hotkey, with the /alignment command, or in the config.

To disable emoji globally in TUI and CLI output, set emoji = false under [display] in ~/.jcode/config.toml, or launch with JCODE_NO_EMOJI=1. Jcode replaces emoji with compact ASCII markers while preserving other Unicode text.


Swarm

Spawn two or more agents in the same repo, and they will automatically be managed by the server to allow native collaboration. When agent A edits a file that agent B has read (code shifting under its feet), the server notifies agent B. Agent B can ignore it if it is not relevant, or it can check the diff to make sure that it doesn't conflict. Each agent has messaging abilities, capable of DMing just one agent, broadcasting to all other agents hosted by the server, or just agents working in that repo. This allows you to spawn multiple sessions in the same repo, and have all conflicts automatically resolved.

jcode swarm demonstration

Agents are also able to spawn their own swarms autonomously. They have a swarm tool which allows them to spawn in their own teamates to accomplish tasks in parallel. Doing so turns the main agent into a coordinator and the spawned agents into workers. Groups of agents, their messaging channels, their completion statuses, etc are all automatically managed. This can be done headlessly or headed.


OAuth and Providers

jcode works with subscription-backed OAuth flows and many provider integrations, so you can use the models you already pay for and still fall back to direct API providers when needed.

Supported built-in login flows

  • Claude (jcode login --provider claude)
  • OpenAI / ChatGPT / Codex (jcode login --provider openai)
  • Google Gemini (jcode login --provider gemini)
  • GitHub Copilot (jcode login --provider copilot)
  • Azure OpenAI (jcode login --provider azure)
  • Alibaba Cloud Coding Plan (jcode login --provider alibaba-coding-plan)
  • Fireworks (jcode login --provider fireworks)
  • MiniMax (jcode login --provider minimax)
  • LM Studio (jcode login --provider lmstudio)
  • Ollama (jcode login --provider ollama)
  • Custom OpenAI-compatible endpoint (jcode login --provider openai-compatible)

For custom OpenAI-compatible endpoints, jcode now prompts for the API base and supports local localhost servers without requiring an API key.

Config-file setup for self-hosted endpoints and MCP

If you prefer to configure things by editing files instead of using the login UI, jcode supports both a custom OpenAI-compatible endpoint config and MCP config files.

OpenAI-compatible providers

Many hosted services speak the standard OpenAI /v1/chat/completions API. jcode talks to them through one shared OpenAI-compatible provider, so you can use almost any such endpoint without waiting for a dedicated integration.

There are two ways to set one up:

  • **Built-in named profiles** — jcode ships ready-made profiles for several popular OpenAI-compatible services. Log in by id and jcode fills in the base URL and key environment variable for you: jcode login --provider <profile-id> # for example: jcode login --provider openrouter jcode login --provider deepseek jcode login --provider opencode # OpenCode Zen jcode login --provider moonshotai Built-in OpenAI-compatible profile ids include: `openrouter`, `deepseek`, `zai`, `kimi`, `moonshotai`, `opencode` (OpenCode Zen), `opencode-go`, `302ai`, `baseten`, `cortecs`, `huggingface`, `nebius`, `scaleway`, `stackit`, and `firmware`. Each profile only sets the endpoint and key variable; you still pick the model with `/model` (or `--model`). Run `jcode login` with no provider to see the interactive list.
  • **Any other endpoint** — point jcode at an arbitrary OpenAI-compatible API (hosted or local) with `jcode login --provider openai-compatible` or the scriptable `jcode provider add` command described below.

Useful environment overrides for these endpoints:

  • JCODE_STREAM_IDLE_TIMEOUT_SECS — raise the base streaming idle timeout (default 180s) for slow reasoning models that think silently before emitting tokens. High reasoning efforts scale this automatically (high 2x, xhigh 3x, max 4x). Also settable as [provider] stream_idle_timeout_secs in config.toml.
  • Per-model context_window (alias context_limit) in a [[providers.<name>.models]] entry — set the context window when the endpoint has no usable /v1/models response, so jcode does not fall back to the generic 200k default.
  • extra_body — inject non-standard top-level fields into every chat/completions request body for backends that require them. See Extra request-body fields below.

For details on self-hosting, local runtimes, and the exact config file shape, see below.

Self-hosted OpenAI-compatible endpoints, including vLLM

For agents and scripts, the preferred path is the one-shot provider profile command. It writes a named profile to ~/.jcode/config.toml, stores secrets in jcode's private app config directory when requested, and prints exact run/validation commands:

bash
# Secret-safe setup for a hosted OpenAI-compatible API.
printf '%s' "$MY_API_KEY" | jcode provider add my-api \
  --base-url https://llm.example.com/v1 \
  --model my-model-id \
  --api-key-stdin \
  --set-default \
  --json

# Smoke test the profile.
jcode --provider-profile my-api auth-test --prompt 'Reply exactly JCODE_PROVIDER_SETUP_OK'

# Use it directly.
jcode --provider-profile my-api run 'hello'

For local servers that do not require auth:

bash
jcode provider add local-vllm \
  --base-url http://localhost:8000/v1 \
  --model Qwen/Qwen3-Coder-30B-A3B-Instruct \
  --no-api-key \
  --set-default

Built-in local profiles are available for the common desktop/local runtimes:

bash
# Ollama: start the local server and install a model first.
ollama pull llama3.2
jcode login --provider ollama
jcode --provider ollama --model llama3.2 run 'hello'

# LM Studio: start the Local Server, load a chat model, then use the exact
# model identifier shown by LM Studio or by curl http://localhost:1234/v1/models.
jcode login --provider lmstudio
jcode --provider lmstudio --model '<model-id>' run 'hello'

Ollama and LM Studio both expose OpenAI-compatible /v1/models and /v1/chat/completions endpoints. jcode uses streaming chat completions, function/tool calling, and OpenAI-style image content for vision-capable local models. If a local server requires a token, enter it during jcode login or create a named profile with --api-key-stdin.

Useful flags:

  • --api-key-env NAME: reference an existing environment variable instead of storing a key.
  • --api-key-stdin: read and store a key without putting it in shell history.
  • --context-window TOKENS: persist the model context window for model selection and routing.
  • --overwrite: replace an existing profile of the same name.
  • --model-catalog: use the endpoint's /models response in addition to configured models.

The generated profile can also be edited manually in ~/.jcode/config.toml:

toml
[provider]
default_provider = "my-api"
default_model = "my-model-id"

[providers.my-api]
type = "openai-compatible"
base_url = "https://llm.example.com/v1"
api_key_env = "JCODE_PROVIDER_MY_API_API_KEY"
env_file = "provider-my-api.env"
default_model = "my-model-id"

[[providers.my-api.models]]
id = "my-model-id"
context_window = 128000

Extra request-body fields (extra_body)

Some OpenAI-compatible backends require non-standard top-level request fields. For example, NVIDIA NIM DeepSeek-V4 reasoning models (deepseek-ai/deepseek-v4-flash, deepseek-ai/deepseek-v4-pro) only enable thinking when the request includes chat_template_kwargs; without it they reply without reasoning (or, for some deployments, hang). jcode lets you inject arbitrary top-level fields two ways.

  1. 1Per named profile, via `extra_body` in `config.toml` (a TOML table merged verbatim into the JSON body): [providers.my-nim] type = "openai-compatible" base_url = "https://integrate.api.nvidia.com/v1" api_key_env = "NVIDIA_API_KEY" default_model = "deepseek-ai/deepseek-v4-flash" [providers.my-nim.extra_body.chat_template_kwargs] thinking = true reasoning_effort = "high"
  2. 2For built-in profiles (e.g. `nvidia-nim`) or any endpoint, via the `JCODE_OPENAI_EXTRA_BODY` environment variable (a JSON object string). It can live in the provider's env file (`~/.config/jcode/nvidia-nim.env`) next to the API key: JCODE_OPENAI_EXTRA_BODY={"chat_template_kwargs":{"thinking":true,"reasoning_effort":"high"}}

Keys from extra_body are merged last and override any jcode-generated body field with the same name (JCODE_OPENAI_EXTRA_BODY wins over the config extra_body on key collisions). Invalid values are logged and ignored rather than failing the request.

The custom OpenAI-compatible provider reads overrides from environment variables or from an env file in jcode's app config directory. On Linux this is usually ~/.config/jcode/, so the default file is usually:

text
~/.config/jcode/openai-compatible.env

Example for a local or LAN vLLM server:

bash
JCODE_OPENAI_COMPAT_API_BASE=http://192.168.1.50:8000/v1
JCODE_OPENAI_COMPAT_DEFAULT_MODEL=Qwen/Qwen3-Coder-30B-A3B-Instruct
# Optional if your server expects auth
OPENAI_COMPAT_API_KEY=your-token-here

Notes:

  • jcode login --provider openai-compatible can create or update this for you.
  • Plain http:// is accepted for localhost and private LAN IPs. Public remote HTTP is still rejected.
  • HTTPS endpoints work as usual.

MCP config files

MCP config is separate from config.toml.

Primary config files:

  • ~/.jcode/mcp.json for global MCP servers
  • .jcode/mcp.json for project-local MCP servers

Claude Code compatibility:

  • ~/.claude.json (Claude Code's user config): top-level mcpServers, plus per-project servers under projects.<abs_path>.mcpServers for the current directory
  • .mcp.json at the repo root (Claude Code's project config)
  • .claude/mcp.json (legacy fallback)

Both the canonical mcpServers key and jcode's historical servers key are accepted. jcode currently supports stdio (command-based) servers only; HTTP/SSE entries ("type": "http"/"sse") are recognized and skipped with a log line.

Example MCP config:

json
{
  "mcpServers": {
    "filesystem": {
      "command": "/path/to/mcp-server",
      "args": ["--root", "/workspace"],
      "env": {},
      "shared": true
    }
  }
}

On first run, jcode also tries to import MCP servers from ~/.claude.json (falling back to the legacy ~/.claude/mcp.json) and ~/.codex/config.toml if ~/.jcode/mcp.json does not exist yet.

For headless or SSH sessions, OAuth-style providers support jcode login --provider <provider> --no-browser (alias: --headless) so jcode prints the auth URL/QR and falls back to manual code or callback paste instead of trying to launch a local browser.

For more scriptable remote flows, claude, openai, gemini, and antigravity also support a two-step pattern:

bash
# Step 1: print a resumable auth URL
jcode login --provider openai --print-auth-url --json

# Step 2: complete later with the callback URL or auth code
jcode login --provider openai --callback-url 'http://localhost:1455/auth/callback?...'
jcode login --provider gemini --auth-code '...'

Additional scriptable cases:

bash
# Copilot device flow: print URL + user code, then complete later
jcode login --provider copilot --print-auth-url --json
jcode login --provider copilot --complete

# Gmail/Google OAuth after credentials are already configured
jcode login --provider google --print-auth-url --google-access-tier readonly
jcode login --provider google --callback-url 'http://127.0.0.1:8456?...'

Pending scriptable login state is stored under ~/.jcode/pending-login/, automatically expires, and stale entries are cleaned up when new scriptable logins start or resume.

For the built-in OpenAI login flow, jcode opens a local callback on http://localhost:1455/auth/callback by default.

Screenshot from 2026-04-02 14-28-51

Supported provider

  • Native / first-party style providers: claude, openai, copilot, gemini, azure, alibaba-coding-plan
  • Aggregator / compatibility providers: openrouter, openai-compatible
  • Additional provider integrations: opencode, opencode-go, zai / kimi, 302ai, baseten, cortecs, deepseek, firmware, huggingface, moonshotai, nebius, scaleway, stackit, groq, mistral, perplexity, togetherai, deepinfra, fireworks, minimax, xai, lmstudio, ollama, chutes, cerebras, cursor, antigravity, google

Jcode also supports easy multi-account switching. Ran out of tokens on your first ChatGPT Pro subscription? /account and quickly switch to your second.


Customizability / Self-Dev

Jcode is inventing a new form of customizability. One that doesn't limit you to what a plugin or extension can do. Tell your jcode agent to enter self dev mode, and it will start modifying its own source code. Jcode is optimized to iterate on itself. There is significant infrastructure around self developement, which allows it to edit, build, and test its own source code, then reload its own binary and continue work in your (potentially many) sessions, fully automatically.

It is reccomended that you use a frontier model for this. The jcode codebase is not a simple one, and weaker models can make subtle, breaking changes. GPT 5.5 or the latest available frontier model works well.


Misc.

The devil is in the details. There are many undocumented optimizations and niceties that jcode implements. Some examples:

Anthropic's Claude cache goes cold after 5 minutes. If you initiate Claude after these 5 minutes, you have a cache miss, potentially costing you lots of tokens. The ui warns you when the cache went cold, and notfies you if there was an unexpected cache miss.

jcode comes with instructions on how to set up Firefox Agent Bridge. Ask you agent to set it up, and then you will have browser automation in jcode as well.

Agent grep is a grep tool I made for the jcode agent. It adds file strucuture information (ie the list of functions, their displacement, etc) to the grep return, so that the agent can infer more of what the file doesn without actually reading the file. It also implements a harness-level integration that adaptively truncates returns based on what the agent has already seen. This saves on context a lot.

Inputs are by default interleaved with the working agent. It sends the input as soon as it safely can without breaking the KV cache. Submit with shift enter instead, and it will send a queue send, and wait for the agent to fully finish its turn before sending.

Resume sessions from different harnesses. Claude code broke on you? Resume the session from jcode and continue where you left off. Session resume is supported for codex, claude code, opencode, and pi.

Screenshot from 2026-04-11 16-28-52

Skills are not all loaded on startup. The conversation is embedded as a semantic vector, and will automatically inject a skill if there is an embedding hit similar to memories. The agent has a skill tool for you to manually activate a skill at anytime. You may also activate via slash commands.


iOS Application / Native OpenClaw

A native iOS application version of jcode is coming soon. This will allow you to work with jcode on your personal machine's environment from your phone, via Tailscale. Openclaw like features will be bundled with this iOS application.


Other planned features

Agents dont like to commit in dirty git state with active changes. Git was clearly not built for multi-agent workflows, and git worktrees is not a good solution. Given this, I believe that is an opporunity for a new git like primitive to be born.

Build speed improvements: An incremental debug cargo build with cache enabled takes about 1 minute on my machine. The goal is 5-20 seconds. Refactors and crates seams should be able to make this happen.


Quick Start

bash
# Launch the TUI
jcode

# Run a single command non-interactively
jcode run "say hello"

# Resume a previous session by memorable name
jcode --resume fox

# Run as a persistent background server, then attach more clients
jcode serve
jcode connect

# Send voice input from your configured STT command
jcode dictate

jcode supports interactive TUI use, non-interactive runs, persistent server/client workflows, and hotkey-friendly dictation without requiring a bundled speech-to-text stack.

jcode workflow demonstration

Browser Automation

jcode includes a first-class built-in browser tool for browser control inside agent sessions.

Current built-in backend:

  • Firefox via Firefox Agent Bridge

Current built-in tool actions include:

  • status
  • setup
  • open
  • snapshot
  • get_content
  • interactables
  • click
  • type
  • fill_form
  • select
  • wait
  • screenshot
  • eval
  • scroll
  • upload
  • press

Quick setup:

bash
jcode browser status
jcode browser setup

Once setup is complete, the model can use the built-in browser tool directly. The UI also summarizes browser tool calls compactly, for example opening a URL, clicking a selector, or typing into a field without echoing sensitive typed text.

Notes:

  • the provider/tool architecture is in place for additional backends
  • Firefox is the wired built-in backend today
  • Chrome bridge / remote debugging style providers can be added on top of the same browser tool later

Further Reading


Detailed Installation

Setup

If you want another agent to set up jcode for you, give it this prompt:

text
Set up jcode on this machine for me.

1. Detect the operating system, available package managers, and shell environment, then install jcode using the best matching command below instead of referring me somewhere else:

   - macOS with Homebrew available:
     brew tap 1jehuang/jcode
     brew install jcode

   - macOS or Linux via install script:
     curl -fsSL https://jcode.sh/install | bash

   - Windows PowerShell:
     irm https://jcode.sh/install.ps1 | iex

   - From source if the above paths are not appropriate:
     git clone https://github.com/1jehuang/jcode.git
     cd jcode
     cargo build --release
     scripts/install_release.sh

   - For local self-dev / refactor work on Linux x86_64, prefer:
     scripts/dev_cargo.sh build --release -p jcode --bin jcode
     scripts/dev_cargo.sh --print-setup
     scripts/install_release.sh

2. Verify that `jcode` is on my `PATH`.
3. Launch `jcode` once in a new terminal window/session to confirm it starts successfully.
4. Before attempting any interactive login flow, assess which providers are already available non-interactively and prefer those first. Check existing local credentials, config files, CLI sessions, and environment variables such as:
   - Claude: `~/.jcode/auth.json`, `~/.claude/.credentials.json`, `~/.local/share/opencode/auth.json`, `ANTHROPIC_API_KEY`
   - OpenAI: `~/.jcode/openai-auth.json`, `~/.codex/auth.json`, `OPENAI_API_KEY`
   - Gemini: `~/.jcode/gemini_oauth.json`, `~/.gemini/oauth_creds.json`
   - GitHub Copilot: existing auth under `~/.config/github-copilot/`
   - Azure OpenAI: `~/.config/jcode/azure-openai.env`, `AZURE_OPENAI_*`, or an existing `az login`
   - OpenRouter: `OPENROUTER_API_KEY`
   - Fireworks: `~/.config/jcode/fireworks.env`, `FIREWORKS_API_KEY`
   - MiniMax: `~/.config/jcode/minimax.env`, `MINIMAX_API_KEY`
   - NVIDIA NIM: `~/.config/jcode/nvidia-nim.env`, `NVIDIA_API_KEY`
   - Alibaba Cloud Coding Plan: existing jcode config/env if present
5. Prefer whichever provider is already configured and verify it with `jcode auth-test --all-configured` or a provider-specific auth test when appropriate.
6. Only if no usable provider is already configured, guide me through the minimal manual step needed:
   - Claude: `jcode login --provider claude`
   - GitHub Copilot: `jcode login --provider copilot`
   - OpenAI: `jcode login --provider openai`
   - Gemini: `jcode login --provider gemini`
   - Azure OpenAI: `jcode login --provider azure`
   - Fireworks: `jcode login --provider fireworks`
   - MiniMax: `jcode login --provider minimax`
   - NVIDIA NIM: `jcode login --provider nvidia-nim`
   - Alibaba Cloud Coding Plan: `jcode login --provider alibaba-coding-plan`
   - OpenRouter: help me set `OPENROUTER_API_KEY`
   - Anthropic direct API: help me set `ANTHROPIC_API_KEY`
7. After setup, run a simple smoke test with `jcode run "say hello"` and confirm it works.
8. If I want browser automation, also check `jcode browser status`. If browser automation is not ready, run `jcode browser setup`, verify the built-in `browser` tool works, and explain any remaining manual step.
9. Explain any manual step that still needs me, especially browser OAuth, device login, API key entry, or browser extension approval.

This is intended to be a copy-paste bootstrap prompt for jcode itself or any other coding agent.

Quick Install

bash
# macOS & Linux
curl -fsSL https://jcode.sh/install | bash

On Termux, install the glibc runtime and patchelf first so the installer can patch the downloaded Linux binary to Termux's glibc dynamic linker and create a launcher that avoids Termux's LD_PRELOAD shim:

bash
pkg install glibc patchelf
curl -fsSL https://jcode.sh/install | bash
powershell
# Windows 11 x64 or ARM64 (PowerShell 5.1+)
irm https://jcode.sh/install.ps1 | iex

The Windows installer selects the correct architecture and verifies the download against the release's SHA256SUMS. Alacritty and the optional global launch hotkey require explicit consent and are not installed by default. See Windows support, security, Defender, and SmartScreen notes.

If a release does not contain a matching Windows asset, the installer stops instead of unexpectedly starting a long compilation. An explicit source build is available with -BuildFromSource and requires Git, Rust, and Visual Studio 2022 Build Tools with the Desktop development with C++ workload.

macOS via Homebrew

bash
brew tap 1jehuang/jcode
brew install jcode

From Source (all platforms)

bash
git clone https://github.com/1jehuang/jcode.git
cd jcode
cargo build --release

For local self-dev / refactor work on Linux x86_64, prefer:

bash
scripts/dev_cargo.sh build --release -p jcode --bin jcode
scripts/dev_cargo.sh --print-setup

That wrapper automatically uses sccache when available, prefers a fast working local linker setup (clang + lld) instead of assuming every machine's mold configuration is valid, and can print the active linker/cache setup via --print-setup so slow-path builds are easier to diagnose.

Then symlink to your PATH:

bash
scripts/install_release.sh

Uninstall

Removes installed binaries and the launcher but keeps your config, auth, and sessions so a clean reinstall picks up where you left off:

bash
curl -fsSL https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/uninstall.sh | bash -s -- --yes

For a full wipe of everything including config, auth, sessions, logs, and memory (useful for recovering from a broken install):

bash
curl -fsSL https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/uninstall.sh | bash -s -- --purge --yes

Add --dry-run to preview what would be removed without deleting anything.

Platform Support

PlatformStatus
Linux x86_64 / aarch64Fully supported
macOS Apple Silicon & IntelSupported
Windows x86_64Supported (native + WSL2)
Termux aarch64 / x86_64Supported with pkg install glibc patchelf
#ai#ai-agent#ai-coding-agent#claude#cli#coding-agent#llm#mcp#openai#rust#terminal#tui