AtomCode 首次运行向导与内置帮助系统分析
持续深度分析 — 新手引导、帮助命令、文档集成 2026-06-23
1. 首次运行向导 (Onboarding Wizard)
1.1 源文件
crates/atomcode-tuix/src/modals/onboarding_wizard.rs1.2 向导流程
首次启动 (没有 setup-state.json 种子)
│
▼
┌─────────────────────────────────────────────┐
│ "Welcome to AtomCode. Pick an option │
│ to get started:" │
│ │
│ 1. Choose your language / 选择语言 │
│ (en / zh-CN / zh-TW / zh-HK) │
│ │
│ 2. Sign in to AtomGit (OAuth) │
│ - 浏览器打开授权页面 │
│ - /login 命令也可随时触发 │
│ │
│ 3. Install seeds │
│ - 安装 skills / commands / hooks / MCP │
│ - 首次安装 atomcode-automation-recommender│
│ │
│ 4. Install ask skill │
│ - /plugin install atomcode@atomcode-skills│
│ - 自动安装 (auto_install_default_skills) │
│ │
│ Esc: skip / 直接进入 TUI │
└─────────────────────────────────────────────┘1.3 引导消息
首次启动消息:
"Welcome to AtomCode. Pick an option to get started:"
跳过提示:
"Esc skip/welcome will clear the screen. Continue? [y/N]"
引导模式:
"Launching TUI in onboarding mode"
重跑向导:
"/welcome" 命令可重新触发向导2. Setup 命令流程
atomcode setup [hooks|mcp|skills|all]
子命令:
hooks — 安装钩子种子文件
mcp — 安装 MCP 种子文件
skills — 安装 skills 种子文件
all — 安装所有种子文件(默认)
首次运行自动执行:
1. setup all(安装种子)
2. 安装 ask skill
3. 自动安装 atomcode@atomcode-skills 插件市场
4. 运行 setup skill("analyzing project and generating recommendations...")2.1 种子安装日志
Installing ask skill, please wait...
ask skill not installed — 安装失败
运行 setup skill:
"Running setup skill"
"setup skill not found" — 种子未正确安装
"analyzing project and generating recommendations..."
重新安装:
"/plugin install atomcode@atomcode-skills"
"PS: To reinstall, first run '/plugin uninstall <name>'"3. /guide 帮助系统
3.1 命令
/guide <question> — 提问帮助
/guide — 显示帮助主题
/guide Getting started — 入门指南3.2 帮助主题
| 主题 | 说明 |
|---|---|
| Getting started | 首次安装、登录、配置 |
| Switch models | /model / /provider 用法 |
| Using MCP | MCP 服务器配置与管理 |
| Skills and plugins | /skills / /plugin 用法 |
| Memory feature | /remember / /forget / /memory |
| Background tasks | /bg 后台执行 |
| Context management | /compact / /context / /cost |
| Keyboard shortcuts | 键盘快捷键参考 |
| Configuration | config.toml 参考 |
3.3 实现
/guide 实际触发一个内置的 guide skill:
"Ask atomcode-guide how to use"
引导响应:
"Common topics:"
"Getting started First install, login, config"
"Switch models /model /provider usage"
...4. 内置文档链接
| 链接 | 说明 |
|---|---|
https://atomcode.atomgit.com/docs/en/ | 在线文档 |
https://atomgit.com/atomgit_atomcode/atomcode/blob/main/docs/telemetry.md | 遥测隐私文档 |
5. 首次运行智能推荐
首次安装完成时:
1. 安装 "atomcode-automation-recommender" skill
2. 分析当前项目
3. 生成个性化推荐(语言/框架特定)
4. 输出推荐结果
5. 提示后续操作5.1 推荐 Skill 安装
setup-state.json 中标记:
{
"accepted": [
{ "kind": "skill", "slug": "atomcode-automation-recommender" }
]
}6. 自动安装流程
自动安装条件:
- 首次运行(种子不存在)
- PluginConfig.auto_install_default_skills = true
流程:
1. auto-installing atomcode@atomcode-skills...
2. 从 marketplace 安装
3. Installation complete
4. 检查 ask skill 是否存在
5. 不存在 → "Installation complete but ask skill not found"7. 新覆盖的盲区
| # | 之前未覆盖的领域 | 状态 | 发现 |
|---|---|---|---|
| 1 | Onboarding 完整流程 | ✅ | 4 步向导 + 跳过选项 |
| 2 | setup 命令详解 | ✅ | hooks/mcp/skills/all |
| 3 | /guide 帮助系统 | ✅ | 9 个帮助主题 |
| 4 | 首次运行推荐机制 | ✅ | atomcode-automation-recommender |
| 5 | 自动安装流程 | ✅ | auto_install_default_skills |
| 6 | 在线文档链接 | ✅ | 2 个 AtomGit 文档 URL |
本报告由持续分析循环生成
逆向命令索引
bash
# 提取入门向导相关
strings atomcode.bin.bak | grep -iE "onboard|welcome|guide|first.*run" | grep -v "https\?://" | sort -u | head -10
# 输出: /welcome /guide Setup
# 提取向导步骤
strings atomcode.bin.bak | grep -E "currentStep|Step [0-9]/[0-9]" | sort -u