Files
myagents/README.md
T
Zhengshou Lai 593b7a85b3 refactor(docs): slim README and improve completion script UX
- Reduce README from 530+ lines to ~110 lines, focusing on CLI core
- Separate ecosystem extensions (cc-switch, Metabot, Skills) into
  an optional section
- Add unsupported shell hint in install_completion.sh
2026-05-27 11:23:13 +08:00

110 lines
2.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# MyClaude CLI
个人助理命令行工具,作为 Claude Code 的启动器和工作区管理器。
## 功能
- **启动 Claude Code**:默认在 `~/workspace` 目录运行
- **工作区切换**:通过 `--cwd` 指定任意目录
- **参数透传**:未识别的参数自动转发给 `claude`
- **自更新**`myclaude update` / `myclaude upgrade` 从本地仓库重新安装
- **自动补全**:安装时自动生成 zsh/bash 补全脚本
## 安装
**前置依赖**Python 3.10+、make、git,推荐 [uv](https://github.com/astral-sh/uv)
```bash
git clone <repository-url> ~/your-path/myclaude
cd ~/your-path/myclaude
make install
```
会在 `~/.local/bin/myclaude` 创建符号链接。移除:`make uninstall`
> 无 uv 时会自动创建 `.venv` 并用 pip 做可编辑安装。
## 使用
```bash
myclaude # 启动 Claude Codecwd = ~/workspace
myclaude --cwd . # cwd = 当前目录
myclaude --cwd /path/to/project # cwd = 指定目录
myclaude --dangerously-skip-permissions # 透传给 claude
myclaude update # 从本仓库重新安装
myclaude upgrade # update 的别名
```
**Shell 补全**(可选):
```bash
# ~/.zshrc 或 ~/.bashrc
if command -v myclaude >/dev/null 2>&1; then
eval "$(_MYCLAUDE_COMPLETE=zsh_source myclaude)"
fi
```
## 配置
**自定义工作区目录**
```bash
export MYCLAUDE_WORKSPACE_ROOT="/your/custom/workspace"
```
**自定义项目根目录**(开发时):
```bash
export MYCLAUDE_PROJECT_ROOT="/path/to/myclaude/repo"
```
## 项目结构
```
myclaude/
├── bin/ # Python 源码
│ ├── cli.py # CLI 入口
│ ├── commands/ # 子命令
│ └── project_root.py
├── templates/ # 模板目录
│ └── workspace/ # 工作区模板 (CLAUDE.md)
├── tests/ # 测试
├── scripts/ # 安装/卸载脚本
├── Makefile
├── pyproject.toml
└── README.md
```
## 生态系统扩展(可选)
以下组件可增强 myclaude 的功能,但**不属本 CLI 的必要依赖**:
| 组件 | 用途 | 安装 |
|------|------|------|
| cc-switch | 多模型切换(Claude/DeepSeek/Kimi | [GitHub releases](https://github.com/farion1231/cc-switch/releases) |
| Metabot | 飞书机器人远程交互 | `curl -fsSL https://raw.githubusercontent.com/xvirobotics/metabot/main/install.sh \| bash` |
| Skills | 自定义 Skill 增强功能 | `npx skills add -g <owner/repo@skill>` |
详细配置说明见原 [完整部署文档](https://www.bilibili.com/video/BV15TPrzeELm/)。
## 维护
**更新升级**
```bash
claude update # 更新 Claude Code
cc-switch upgrade # 更新 cc-switch(如已安装)
metabot update # 更新 Metabot(如已安装)
```
**卸载**
```bash
make uninstall # 卸载 myclaude CLI
claude uninstall # 卸载 Claude Code
```
## License
MIT