openclaw
A personal AI assistant that runs on your own computer and answers through messaging channels such as Slack, Telegram and WhatsApp. Its skills cover browser automation, canvas panels, app previews and shareable diffs.
leavesfly/jimi is a pure Java AI agent system and open source CLI tool for Java developers, offering a Claude Code style experience. It ships skills and agents, including skills for Maven troubleshooting, code review, API design and database design.
Claude Code
$ npx -y skills add leavesfly/jimi --agent claude-code
Codex
$ npx skills add leavesfly/jimi -a codex
Cursor
$ npx skills add leavesfly/jimi -a cursor
Gemini CLI
$ npx skills add leavesfly/jimi -a gemini-cli
GitHub Copilot
$ npx skills add leavesfly/jimi -a github-copilot
OpenCode
$ npx skills add leavesfly/jimi -a opencode
Windsurf
$ npx skills add leavesfly/jimi -a windsurf
纯 Java 实现的 AI 编程助手,CLI 与 JavaFX Desktop 共用同一入口与运行时
JavaFX 桌面工作台已接入,交互对齐主流 Agent 桌面端:欢迎页英雄插画与居中输入、53 周年视图活跃度热力图(月份刻度轴)、左侧任务导航(折叠/后退/前进、工作区胶囊、分组会话、底部账户行)、窗口右上图标组、聊天式消息流(用户/助手气泡、流式生成卡片)、内联审批卡片、输入栏模型直切、可折叠详情抽屉(活动/Diff/检查点回滚)与底部全局任务状态栏。状态刷新由 SessionWatcher 节流 + revision 增量驱动。支持创建/恢复多会话、后台任务不中断切换、独立 Worktree 并行修改项目。CLI 和 Desktop 均从 JimiApplication.main 启动,没有独立桌面后端。
# 本机原生构建:需要 JDK 17、Maven、Python 3
python3 scripts/package-desktop.py
# 完整包中的 jimi 启动器:默认终端界面
jimi --trust-project -w /path/to/project
# 桌面工作台
jimi --ui desktop -w /path/to/project
默认以终端界面(--ui cli)启动,--ui desktop 切换 JavaFX 桌面工作台。轻量 exec JAR 不带 JavaFX,因此默认入口可直接运行;显式指定 --ui desktop 时会明确提示缺少桌面运行库。完整桌面包的 jimi/JimiDesktop 原生启动器在 jimi.cfg 中显式携带 --ui desktop,双击图标仍直接进入桌面。首次打开项目需确认信任(终端回答 y 或传 --trust-project,结果记入 ~/.jimi/trusted-projects.json,同目录后续启动不再询问;删除该文件即撤销),-y 不跳过信任确认;非交互 CLI 使用 --trust-project。桌面 -c 只填入草稿,不自动执行。
当前是可运行的实现版本,尚未达到完整方案的全部验收条件;接口迁移、展示细化、性能和跨平台验证的剩余项见 Desktop 技术与实现说明。
内置6个专业Agent覆盖开发全流程:
| Agent | 职责 |
|---|---|
| Default | 通用开发助手 |
| Architect | 架构设计 |
| Code | 编码实现 |
| Quality | 代码质量与审查 |
| Doc | 文档编写 |
| DevOps | 部署运维 |
内置6个开发技能包,领域知识模块化管理:
| 技能包 | 功能 |
|---|---|
| api-design | API设计规范 |
| code-quality-suite | 代码质量套件 |
| database-design | 数据库设计 |
| git-commit-guide | Git提交规范 |
| java-best-practices | Java最佳实践 |
| unit-testing | 单元测试 |
关键词自动激活,按需加载到上下文。
事件驱动的工作流自动化:
name: "auto-format-java"
trigger:
type: "POST_TOOL_CALL"
tools: ["WriteFile"]
file_patterns: ["*.java"]
execution:
type: "script"
script: "google-java-format -i ${MODIFIED_FILES}"
支持 15 种 Hook 事件(对齐 Claude Code 9 种 + Jimi 扩展 3 种 + Agent Teams 扩展 3 种),覆盖工具调用前后、Agent 切换、会话开始/结束、错误处理等多种触发时机。详细文档
YAML配置即可扩展命令:
name: "quick-build"
aliases: ["qb"]
execution:
type: "script"
script: "mvn clean install"
支持Script、Agent、Composite三种执行类型。详细文档
基于ReCAP论文的上下文优化:
通过统一的 ChatProvider 抽象支持 9 种 Provider:openai、kimi(Moonshot)、qwen(通义千问)、deepseek、claude、ollama、glm(智谱)、minimax、cursor。基于 OpenAI 兼容协议,支持流式响应、Caffeine 缓存、Token 估算与限流。
支持Model Context Protocol,集成外部工具服务(Git、GitHub、Database等)。
内置 15 个原生工具 + MCP 动态工具,覆盖五大类:
ReadFile、WriteFile、StrReplaceFile、Grep、GlobBashTool 命令执行、后台任务FetchURL 网页抓取、WebSearch 搜索SubAgent 同步/异步子代理、TeamAgent 团队协作Memory、Skills、SetTodoList、AskHuman、MetaTool所有工具基于响应式(Reactor Mono)执行,支持并发安全控制与 JSON Schema 自动生成。
将 Skills / Hooks / Commands / MCP / Agents 五种扩展点打包成统一可分发单元:
/plugin install owner/repo 从 GitHub、URL 或本地目录安装compatibility.jimi_version 版本门禁,VersionRange 语义化匹配provides 白名单显式声明对外暴露的扩展项PermissionGate,
按 deny > 模式 > allow > ask > 风险等级 依次判定BashTool(mvn test:*) / WriteFile(src/**) 类规则语法,四种权限模式
(default / acceptEdits / bypassPermissions / plan)/rewind 一键回滚"你不应该再手动 prompt Agent 了,你应该设计循环来自动驱动你的 Agent。"
Jimi 完整支持 Loop Engineering 六大原语,从"人手动驱动 Agent"进化为"系统自动驱动 Agent"。
# 每 5 分钟检查编译状态并修复错误
/loop 5m 检查项目编译状态,如果有错误就修复
# 每小时扫描并处理 TODO
/loop 1h 扫描 src/main 下的 TODO 注释,选择一个完成它
# 控制循环
/loop status # 查看状态
/loop pause # 暂停
/loop resume # 恢复
/loop stop # 停止
设定可验证的目标条件,Agent 持续工作直到条件满足。验证者和执行者分离,避免"自己批改自己作业"。
# 直到所有测试通过
/goal 所有 src/test 下的单元测试通过且 lint 无警告
# 直到覆盖率达标
/goal 测试覆盖率达到 80%
# 复合条件
/goal mvn test 通过且 checkstyle 无违规且覆盖率 > 80%
安全限制:最大 50 步迭代、60 分钟超时、50 万 token 预算(均可配置)。
多 Agent 并行工作时,通过 Git Worktree 实现文件系统级隔离,避免冲突:
# Agent 配置中启用 worktree 隔离
team:
teammates:
- teammate_id: dev-auth
agent_path: agents/developer
isolation: worktree # 独立 worktree
- teammate_id: reviewer
agent_path: agents/reviewer
isolation: shared # 共享主目录
Loop 的进度自动写入 .jimi/progress.md,Agent 上下文被压缩或重置后仍可恢复进度。
| 原语 | Jimi 实现 | 说明 |
|---|---|---|
| Automations | Hooks + /loop + /goal | 事件驱动 + 定时调度 + 目标迭代 |
| Worktrees | WorktreeManager + SubAgent | 文件系统级 + 上下文级隔离 |
| Skills | SkillRegistry + SKILL.md | 渐进式披露、依赖声明、自动激活 |
| Connectors | MCP (STDIO/HTTP) + Plugin | 连接 GitHub/Linear/Slack/DB |
| Sub-agents | SubAgentTool + TeamAgentTool | Maker/Checker 分离、团队协作 |
| State | MEMORY.md + Session + progress.md | 三层记忆 + 状态文件持久化 |
git clone https://github.com/leavesfly/Jimi.git
cd Jimi
./scripts/quick-install.sh
# 1. 检查环境
./scripts/check-env.sh
# 2. 构建项目
./scripts/build.sh
# 3. 初始化配置
./scripts/init-config.sh
# 4. 启动Jimi(默认终端界面)
./scripts/start.sh
# 桌面工作台
./scripts/start.sh --ui desktop
# 指定 Agent 规范文件启动
./scripts/start.sh --agent-file ~/.jimi/agents/architect/agent.yaml
# YOLO模式(自动批准所有操作)
./scripts/start.sh --yolo
JimiApplication 统一入口(基于 Picocli)支持以下选项,CLI 与 Desktop 共用:
| 参数 | 说明 |
|---|---|
--ui <cli|desktop> | 界面选择(默认 cli;桌面工作台需显式 --ui desktop) |
-w, --work-dir <path> | 指定工作目录(默认当前目录) |
-m, --model <name> | 覆盖使用的模型(优先级高于 Agent 与全局配置) |
-C, --continue | 继续上次会话(按工作目录恢复 lastSessionId) |
--session <id> | 恢复指定会话(与 -C 互斥) |
-y, --yolo, --yes | YOLO 模式:自动批准所有工具调用(慎用,不跳过项目信任) |
--trust-project | 明确允许当前项目的 Hook、脚本与 MCP 配置(非交互 CLI 必需;确认后记入本机信任记录) |
--worktree | 为新会话创建独立 Git Worktree(仅新会话) |
--agent-file <path> | 指定自定义 Agent 规范文件(YAML) |
--mcp-config-file <path> | 额外加载 MCP 服务配置(可重复指定) |
-c, --command <text> | CLI 执行单条命令后退出;桌面模式仅作为初始草稿 |
--verbose | 打印详细启动信息 |
--debug | 启用调试日志(LLM 请求/响应、工具调用) |
| 命令 | 说明 |
|---|---|
/help | 帮助信息 |
/status | 系统状态 |
/tools | 工具列表 |
/agents | Agent列表 |
/switch <agent> | 切换当前 Agent |
/skills | 技能包列表 |
/hooks list | Hooks列表 |
/plugin list | 插件列表 |
/async list | 异步任务 |
/memory | 记忆管理 |
/rewind | 查看检查点 / 回滚文件改动 |
/loop | Loop 循环调度 |
/goal | 目标驱动迭代 |
/reset | 清除上下文 |
/config | 查看配置 |
/version | 版本信息 |
graph TB
subgraph 用户交互层
CLI[CLI命令行]
end
subgraph 核心引擎层
Engine[JimiEngine]
Executor[AgentExecutor]
Memory[ReCAP记忆]
Approval[审批机制]
end
subgraph Agent系统
AgentRegistry[Agent注册表]
MultiAgents[专业Agent]
AsyncMgr[异步子代理]
end
subgraph 知识增强层
Skills[Skills系统]
Wiki[知识Wiki]
end
subgraph 自动化与扩展层
Hooks[Hooks系统]
Commands[自定义命令]
Plugins[插件系统]
end
subgraph 工具系统
ToolRegistry[工具注册表]
FileTools[文件工具]
MCPTools[MCP工具]
end
subgraph LLM层
LLMFactory[LLM工厂]
Providers[多提供商]
end
CLI --> Engine
Engine --> Executor
Engine --> Memory
Engine --> Approval
Executor --> AgentRegistry
Executor --> ToolRegistry
Executor --> LLMFactory
AgentRegistry --> MultiAgents
AgentRegistry --> AsyncMgr
Executor --> Skills
Engine --> Hooks
CLI --> Commands
Engine --> Plugins
Plugins --> Skills
Plugins --> Hooks
Plugins --> Commands
ToolRegistry --> FileTools
ToolRegistry --> MCPTools
LLMFactory --> Providers
| 类别 | 技术 |
|---|---|
| 核心框架 | Spring Boot 3.2.10, WebFlux + Reactor Netty |
| 命令行 | Picocli 4.7.6, JLine 3.25.1 |
| 数据处理 | Jackson 2.17.0, SnakeYAML 2.2 |
| 代码分析 | JavaParser + symbol-solver 3.26.4 |
| 协议集成 | MCP SDK 0.12.1 |
| 进程/文本 | Commons Exec 1.4.0, Commons Text 1.11.0, Jsoup 1.17.2 |
| 缓存 | Caffeine 3.2.0 |
Jimi 的配置文件位于 ~/.jimi/config.yml(YAML 格式,注意后缀是 .yml)。首次使用建议将内置默认配置 src/main/resources/.jimi/config.yml 拷贝到 ~/.jimi/config.yml,再按需修改 api_key。
一份最小可用配置示例:
# 默认模型(必须在 models 中已定义)
default_model: qwen3-max
providers:
qwen:
type: qwen # ProviderType 枚举之一
base_url: https://dashscope.aliyuncs.com/compatible-mode/v1
api_key: sk-xxxxxxxxxxxxxxxx
rate_limit: # 可选:限流
window_ms: 4000
max_requests: 4
sleep_ms: 3000
models:
qwen3-max:
provider: qwen # 对应 providers 的某个 key
model: qwen3-max # 发给 LLM API 的真实模型名
max_context_size: 200000 # 上下文窗口(Token)
type 支持:kimi / deepseek / qwen / ollama / openai / claude / cursor / glm / minimax。
# 切换Agent
/switch architect
# 查看Agent列表
/agents
# 使用指定Agent启动
./scripts/start.sh --agent-file ~/.jimi/agents/code/agent.yaml
自定义Agent:在~/.jimi/agents/目录下创建agent.yaml和system_prompt.md文件。
在~/.jimi/hooks/目录下创建YAML配置文件:
name: "auto-test"
trigger:
type: "POST_TOOL_CALL"
tools: ["WriteFile"]
file_patterns: ["*Test.java"]
execution:
type: "script"
script: "mvn test -Dtest=${MODIFIED_FILE%.*}"
在~/.jimi/commands/创建YAML配置:
name: "quick-build"
aliases: ["qb"]
execution:
type: "script"
script: "mvn clean install"
# 查看异步任务
/async list
# 查看状态
/async status <task_id>
# 取消任务
/async cancel <task_id>
插件将 Skills / Hooks / Commands / MCP / Agents 五种扩展点打包成一个有版本号、有清单、可整体安装/卸载/升级的分发单元。
# 从 GitHub 安装(支持 owner/repo#branch)
/plugin install leavesfly/java-dev-kit
# 从本地目录或 ZIP 安装
/plugin install ./my-plugin
/plugin install ./my-plugin.zip
# 列表 / 详情 / 启用 / 禁用 / 卸载
/plugin list
/plugin info <name>
/plugin enable <name>
/plugin disable <name>
/plugin uninstall <name>
name: java-dev-kit
version: 1.0.0
description: Java 开发全家桶
compatibility:
jimi_version: ">=0.1.0" # 版本门禁(VersionRange 语义匹配)
provides: # 对外暴露的扩展项白名单
skills: ["java-best-practices"]
hooks: ["auto-format-java"]
commands: ["quick-build"]
enabled: true # 可选,默认 true;为 false 时加载但不激活
插件遵循 classpath(内置)< user(~/.jimi/plugins/)< project(<project>/.jimi/plugins/) 三层作用域,同名后加载覆盖。详细文档
A personal AI assistant that runs on your own computer and answers through messaging channels such as Slack, Telegram and WhatsApp. Its skills cover browser automation, canvas panels, app previews and shareable diffs.
Gives your AI agent a learning loop: it turns past work into reusable skills, keeps notes across sessions, and searches its own earlier conversations. It can also run on a cheap server and be reached from chat apps like Telegram.
A single CLAUDE.md file with behavioral guidelines to reduce common LLM coding mistakes, such as overcomplication and unstated assumptions. It is derived from Andrej Karpathy's observations on coding pitfalls and helps Claude Code write, review, and refactor code more carefully.
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by running routine tasks, explaining complex code, and handling git workflows through natural language commands.
Install it with the command on its page. It includes maven-troubleshoot, api-design, code-quality-suite. Its skills do not fire on their own yet. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it