快速开始
快速开始
快速开始
安装
git clone https://github.com/variableway/spark-cli.git
cd spark-cli
make build
make build 编译二进制文件并安装到 ~/.local/bin/spark。确保该路径在 $PATH 中。
配置
创建 ~/.spark.yaml:
repo-path:
- ~/workspace
git:
username: your-name
email: your@email.com
常用命令
Git 仓库管理
spark git update -p ~/workspace # 更新所有仓库
spark git update -p ~/workspace --ssh # HTTPS 不稳定时强制通过 SSH 更新
spark hub registry scan ~/workspace # 扫描 references 目录,写入 registry
spark git batch-clone variableway -o ./repos # 克隆组织仓库
spark git push-all -p ~/workspace # 推送所有仓库的更改
spark git scan ~/workspace # 扫描仓库并保存到 SQLite
镜像源切换
spark magic pip use tsinghua # Python → 清华源
spark magic go use goproxy # Go → goproxy.cn
spark magic node use taobao # Node → 淘宝源
spark magic clean # 清理 node_modules 和 .venv
文档管理
spark docs init # 创建文档结构
spark docs site # 初始化 docmd 站点
docmd dev # 本地预览文档
进程诊断
spark witr nginx # 检查 nginx 进程
spark witr --port 8080 # 查找占用 8080 端口的进程
spark witr --pid 1234 # 按 PID 检查进程