jcode
Think it. Code it.
The AI coding agent that lives in your terminal.
Describe tasks in plain language. jcode reads your codebase, writes surgical edits,
runs commands, and shows every step โ no black boxes.
Works locally and on remote servers over SSH. Supports any OpenAI-compatible model.
๐ Documentation ยท Install ยท Features ยท Configuration ยท Changelog
โ Found it โ the goroutine in handleConnection() is never joined.
I'll patch it now.
โ Tool edit path=server.go
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ - go handle(conn) โ
โ + wg.Add(1) โ
โ + go func() { defer wg.Done(); handle(conn) }() โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ Edit applied
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
> _
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Agent โ Model: openai / gpt-4o โ Approve: Ask โ [โโโโโโโโโโ] 2% โ MCP: 2/5
Why jcode?
|
|
| Transparent by design |
Every tool call is visible. Approve or reject edits before they happen. |
| Plan before you act |
Plan Mode explores read-only and presents a structured plan for your review. |
| Parallel teams |
Spawn multiple AI teammates that work simultaneously on different tasks. |
| SSH anywhere |
All tools work seamlessly on remote machines โ same experience, zero friction. |
| Bring your own model |
Any OpenAI-compatible API. Switch models mid-session with one keystroke. |
Install
Quick Install (recommended)
curl -fsSL https://raw.githubusercontent.com/cnjack/jcode/main/script/install.sh | sh
From Source
Requires Go 1.22+ and Node.js + pnpm.
git clone https://github.com/cnjack/jcode.git
cd jcode
make install
Update
jcode update
First launch creates ~/.jcode/config.json with a setup wizard. Run jcode doctor to verify model & MCP connectivity.
Features
Core Agent Loop
Describe a task in plain English. The agent reads your codebase, writes surgical edits, runs commands, and reports every step โ no black boxes.
| Capability |
How it works |
| File operations |
Read, edit (string-level diffs), and write files with inline before/after display |
| Shell execution |
Run any command; output shown in a bordered box. Safe commands (ls, git status, โฆ) auto-approved |
| Regex search |
grep tool with ripgrep fallback โ search across entire codebases in seconds |
| Todo tracking |
Live ๐ Todo (2/5) bar above the input area; agent updates progress automatically |
| Ask user |
Agent can prompt you with questions and choices mid-task when it needs clarification |
๐ค Agent Teams
Spawn multiple AI teammates that work in parallel, each with independent tools, conversation history, and environment. The lead agent coordinates; teammates idle until they receive an explicit message.
You โบ Create a team and spawn a backend developer
โ Tool team_create team_name=dev-team
โ Done
โ Tool team_spawn name=backend prompt="Senior Go backend developer"
โ Done
You โบ Send backend a task
โ Tool team_send_message to=backend message="Add pagination to /users"
โ Message sent to @backend
Switch between agent views with Shift+โ/โ and see live status in the team panel:
โญ Team: dev-team (2) โโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ Main (leader) โ
โ โ โณ @architect 1m32s [3 tools] โ
โ โ โ @backend 0m45s โ
โ โ
โ shift+โ/โ: switch agent | esc: back to leader โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
- Persistent mailbox โ session-scoped, file-based message passing between teammates
- Per-agent approval โ mutating tool calls surface an approval dialog tagged with the teammate's name and color
- Independent conversations โ each agent has its own full chat history, tool calls, and markdown-rendered output
- Agent types โ
explore (read-only), general (full tools), coordinator (can spawn sub-teams)
๐ SSH โ work on any machine
Type /ssh user@host and every tool runs transparently on the remote host. No agents, no tunnels, no extra setup.
You โบ /ssh deploy@10.0.1.5:/var/www/app
โ SSH Connected ยท linux/amd64
You โบ why is nginx restarting?
โ Tool execute [deploy@10.0.1.5] docker logs app-nginx-1 --tail 20
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ nginx: [emerg] bind() to 0.0.0.0:80 failed โ
โ (98: Address already in use) โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ Port 80 is already taken. Let me find what's holding it.
Save connections as named aliases and jump between hosts with /ssh:
โโโโโโโโ /ssh โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ > ๐ prod deploy@10.0.1.5:/var/www/app โ
โ ๐ staging ci@10.0.1.8:/srv/staging โ
โ โ Connect New SSH โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Plan Mode
Press Ctrl+P to enter Plan Mode. The agent explores your codebase read-only and presents a structured plan before touching any file. Review, approve or reject with feedback โ then let it execute step by step.
Plan โ Model: openai / gpt-4o โ Approve: Ask โ [โโโโโโโโโโ] 12%
๐ MCP Integration
Connect any MCP-compatible server โ stdio, HTTP, or SSE โ and its tools merge with the built-ins. Auto-reconnect with exponential backoff. Status shown live in the status bar.
{
"mcp_servers": {
"github": { "type": "stdio", "command": "gh-mcp" },
"db": { "type": "http", "url": "http://localhost:3001/mcp" }
}
}
Agent โ Model: openai / gpt-4o โ Approve: Ask โ [โโโโโโโโโโ] 2% โ MCP: 2/5
๐ฐ Token Usage & Budget Control
Real-time context window tracking with a color-coded progress bar in the status bar:
| Progress |
Color |
Meaning |
[โโโโโโโโโโ] 45% |
๐ข Green |
Comfortable โ plenty of context left |
[โโโโโโโโโโ] 78% |
๐ Orange |
Approaching limit โ consider compacting |
[โโโโโโโโโโ] 92% |
๐ด Red |
Near limit โ auto-compaction may trigger |
Set cost guardrails in config.json:
{
"budget": {
"max_cost_per_session": 5.00,
"warning_threshold": 0.8
}
}
The agent receives in-context warnings when nearing limits and stops if the budget is exceeded. Model pricing is auto-fetched from models.dev.
๐ง Context Management
- Auto-compaction โ when the context window fills up, older conversation is summarized while preserving the most recent messages
- Manual compaction โ type
/compact anytime to free up context
- Smart prompt caching โ reduces redundant prompt computation across turns
- AGENTS.md support โ global (
~/.jcode/AGENTS.md), project-level, and local (.local.md, git-ignored) agent instructions with @include directives
๐ Skills
Domain-specific skills loaded on demand. Built-in skills include PR review and security review. Add your own skill packs to ~/.jcode/skills/ or <project>/.jcode/skills/.
Skills register as slash commands โ type /review-pr or /security-review to activate.
โก Subagents & Background Tasks
- Subagents โ delegate subtasks to independent child agents (
explore, general, or coordinator type) with up to 3 levels of nesting
- Background commands โ long-running builds/tests run async; check with
/bg or the check_background tool
- Status tracking โ
Bg: 3 running shown in status bar; task IDs for programmatic access
๐ผ Session Resume
Every conversation is recorded as JSONL. Resume any past session:
โโโโโโโโโโโโโโโโโ Resume Session โโโโโโโโโโโโโโโโโโ
โ > 2026-03-12 gpt-4o fix nginx crash โ
โ 2026-03-11 gpt-4o refactor auth module โ
โ 2026-03-10 claude-3.5 add pagination logic โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
jcode sessions # list sessions
jcode --resume <UUID> # pick up where you left off
๐ Web Interface
Start a browser-based UI with jcode web. Chat interface, file browser, built-in terminal, and full agent control โ all accessible from http://localhost:8080.
๐งญ Context Awareness
At startup the agent automatically detects:
- Git branch, dirty status, last commit
- Project type (Go, Python, JS, Rust, Java, โฆ)
- Directory structure
- SSH environment labels
- Available skills
No manual configuration needed โ the agent adapts to your project.
Keyboard Shortcuts
| Key |
Action |
| Enter |
Submit prompt / select option |
| Ctrl+C |
Press once to warn, twice to exit |
| Ctrl+A |
Toggle approval mode (Ask โ Auto) |
| Ctrl+P |
Toggle Plan โ Agent mode |
| Ctrl+L |
Model picker |
| Ctrl+T |
Toggle team panel |
| Shift+โ/โ |
Switch between teammates |
| Esc |
Return to leader view |
| / |
Start slash command |
Slash Commands
| Command |
Action |
/model |
Switch model mid-session |
/setting |
Open settings menu |
/ssh |
Connect to SSH host |
/resume |
Resume a previous session |
/compact |
Compact conversation context |
/bg |
Check background tasks |
/<skill> |
Activate a loaded skill |
Configuration
Config lives at ~/.jcode/config.json. Key sections:
| Section |
What it controls |
providers |
API keys and base URLs for each model provider |
model / small_model |
Active model and lightweight model for summaries |
fallback_model |
Fallback when primary model fails |
ssh_aliases |
Named SSH connections |
mcp_servers |
MCP server definitions (stdio / HTTP / SSE) |
budget |
Token and cost limits per session |
compaction |
Auto-compaction threshold, recent message count |
prompt |
Memory size, cache, async env timeout |
subagent |
Parallel limit, nesting depth |
team |
Max teammates, mailbox poll interval |
telemetry |
Optional Langfuse tracing |
jcode doctor # verify model + MCP connectivity
jcode version # show version, commit, build time
jcode update # update to latest version
Documentation
๐ Full documentation is available at cnjack.github.io/jcode
Changelog
See CHANGELOG.md for release notes and version history.
License
MIT