Glaude
Description
A blazing-fast, zero-dependency AI coding agent written in Go, inspired by Claude Code.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Glaude
用 Go 语言实现的 AI Coding Agent,参照 Claude Code 架构设计。单二进制、零依赖、毫秒级启动。
特性
- Agentic Loop — LLM 自主决策工具调用,循环执行直到任务完成
- 8 种内置工具 — Bash、文件读写编辑、Glob、Grep、LS、子 Agent
- 多 Provider — Anthropic / OpenAI / Ollama,统一接口 + 流式输出
- 权限治理 — 4 种安全模式 + 30+ 条危险命令检测规则
- 上下文压缩 — Token 预算管理 + 自动摘要,支持长对话
- 会话持久化 — JSONL append-only,支持中断恢复和会话切换
- MCP 协议 — 连接外部 MCP 工具服务器,动态注册远端工具
- 生命周期 Hook — 在工具执行前后运行自定义脚本(格式化、静态分析等)
- 记忆系统 — 四层指令文件(企业/用户/项目/本地)+ 文件快照回滚
- 终端 UI — 基于 Bubble Tea 的交互界面,Markdown 渲染 + diff 展示
快速开始
安装
# 从源码构建
go build -o glaude ./cmd/glaude
# 或使用 Makefile
make build
配置 API Key
# Anthropic(默认)
export ANTHROPIC_API_KEY="sk-ant-..."
# OpenAI
export OPENAI_API_KEY="sk-..."
# Ollama(本地,无需 key)
# 默认连接 http://localhost:11434/v1
运行
# 交互模式(REPL)
./glaude
# 单次执行
./glaude -p "用 Go 写一个 HTTP server"
# 恢复上次会话
./glaude --continue
# 恢复指定会话
./glaude --resume
项目初始化
# 交互式生成 .glaude.json 配置文件
./glaude init
使用指南
CLI 参数
| 参数 | 短写 | 说明 |
|---|---|---|
--prompt |
-p |
运行单条 prompt 后退出 |
--continue |
-c |
恢复最近一次会话 |
--resume |
恢复指定 session ID 的会话 |
子命令:
| 命令 | 说明 |
|---|---|
glaude init |
交互式初始化项目配置 |
glaude version |
打印版本信息 |
REPL 斜杠命令
在交互模式下,输入以下命令:
| 命令 | 说明 |
|---|---|
/help |
显示可用命令 |
/exit, /quit |
退出 |
/clear |
清空对话历史 |
/undo |
撤销最近一次文件变更 |
/context |
显示上下文信息(消息数、token 用量、undo 栈) |
/mode [name] |
查看或切换权限模式 |
内置工具
Agent 在对话中自主调用这些工具:
| 工具 | 说明 | 只读 |
|---|---|---|
Bash |
执行 shell 命令,持久化 shell 状态(cd、环境变量跨调用保留) | 否 |
Read |
读取文件内容,支持行号分页,自动截断长行 | 是 |
Edit |
精准字符串替换(str_replace),替换前自动快照 | 否 |
Write |
创建或覆盖文件,自动创建父目录 | 否 |
Glob |
文件模式匹配(**/*.go),按修改时间排序,上限 100 条 |
是 |
Grep |
正则搜索文件内容,优先使用 ripgrep,支持多种输出模式 | 是 |
LS |
列出目录内容(名称、类型、大小) | 是 |
Agent |
派生子 Agent 处理独立子任务,仅返回结论 | 是 |
配置
配置文件层级
优先级从高到低:
| 层级 | 来源 | 路
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的
AI mem0
| Universal memory layer for AI Agents | 51341 | 221 | 1 |
AI