[ 00_mlx_code ]
> A Coding Agent That Speaks Git Natively
â A Git-native coding agent built for local, on-device workflows.
â Git commits store file changes together with the conversation that produced them.
â Parallel worktrees host multiple isolated agents concurrently.
â Agents can spawn sub-agents recursively.
# Branch, diff, and resume from any branching paths dynamically.
[ 01_cli_demo ]
No install. Just try it with uvx.
[ 02_why_git ]
| Agent | Git | What It Enables |
|---|---|---|
| Execution step changes files | commit | Inspect changes cleanly with git diff |
| Alternative approach | branch | Explore paths non-destructively |
| Isolated agent sandbox | worktree | Keep your active checkout clean and safe |
| Resuming from a past session | checkout | Rewind agent to any snapshot state |
Most agents treat version control as an afterthought.
mlx-code maps the reasoning loop directly onto Git mechanisms. Your complete agent state history lives inside git commit history rather than an opaque database.
[ 03_primitives ]
Fork from any checkpoint
A branch opens a fresh interactive tab in an isolated worktree.
Test divergent code designs securely without abandoning your active checkout.
/branch --rev 2 make it use httpx instead
Resume from anywhere
Every file-changing step is snapshot-committed with the chat/execution history.
Rewind cleanly to any checkpoints.
mlc --resume abc1234
Switch configs on the fly
Swap agent configurations mid-session between planner, coder, and reviewer roles without losing your active context.
/clear --config reviewer.yaml
Concurrent multi-agent
Run multiple agents concurrently inside one batch step.
Share your unified memory architecture compute pools dynamically.
mlc --engine batch
[ 04_architecture ]
Worktrees:
main âââââââââââââââââââââââââââââââââââââââââââââââââââââ⺠Node = git commit + chat hx
â â
â âââ branch-1 âââââââââ
â â ââââââââââââââ
â ââ⤠branch-1-0 âââââââ
â âââââââ¬âââââââ
âââ branch-0 âââââââââ â
â
Tabs: âââââââââââââ⺠Tab = git branch + Agent
â
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â TUI tabs â â
â ââââââââ ââââââââââââ ââââââââââââ âââââââ´âââââââ â
â â main â â branch-0 â â branch-1 â â branch-1-0 â â
â ââââââââ ââââââ¬ââââââ ââââââââââââ ââââââââââââââ â
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â
Agents: ââââââââââââââââââââââââââââââââââââââââââ⺠Each tab runs its own Agent
â
ââââââ´ââââââââââââââââââââââââââââââââââââââ
â Agent â
â ââââââââââââââââââ ââââââââââââââââââ â
â â API: â â Tools: â â
â â Local (mlx-lm) â â Read Write â â
â â Gemini â â Edit Bash â â
â â Claude â â Grep Find â â
â â Codex â â Ls Skill â â
â â DeepSeek â â Agent ââââââââââââââââ⺠Recursively spawns sub-Agents
â ââââââââââââââââââ ââââââââââââââââââ â
â Git worktree â
â (isolation + session state) â
ââââââââââââââââââââââââââââââââââââââââââââ
[ 05_library_api ]
Use as a Library
Construct custom workflow pipelines, run programmatic background review checks, or coordinate distributed multi-agent workflows natively on your Mac.
from mlx_code.repl import Agent
from mlx_code.tools import ReadTool, WriteTool, EditTool
agent = Agent(api='claude', tool_names=['Read', 'Write', 'Edit'])
result = await agent.run('refactor utils.py to use dataclasses')
from mlx_code.tools import ReadTool, WriteTool, EditTool
agent = Agent(api='claude', tool_names=['Read', 'Write', 'Edit'])
result = await agent.run('refactor utils.py to use dataclasses')
[ 06_user_manual ]
slash commands
/branch [--rev N]Fork tab from checkpoint
/mergeMerge into parent branch
/diff [--all]Review worktree changes
/clear [--config F]Clear / reset session
/history [--raw]Show chat log
/toolsList active tools
!commandRun a shell command
$commandRun an interactive command
keyboard shortcuts
Ctrl-1 ⦠Ctrl-9Jump directly to N-th tab
Ctrl-, / Ctrl-.Cycle adjacent tabs
EnterSubmit
Ctrl-JInsert newline
Ctrl-RRecall last prompt
Ctrl-CClear input or abort agent
Ctrl-DClose branch tab, or exit app