跳转到主要内容

先决条件

  • Go 1.26+
  • git
  • make 在您的 shell 中可用

克隆仓库

git clone https://github.com/quiet-circles/hyperlocalise.git
cd hyperlocalise

Bootstrap 工具和模块

make bootstrap
这会下载 Go 模块并安装固定版本的 lint 工具链。

每日开发循环

make fmt
make lint
make test
make check-build

在本地运行 CLI

make run
# or
go run -ldflags "-X main.version=dev" main.go

安装本地二进制文件

make install
hyperlocalise version

关键代码位置

  • cmd/: Cobra 命令、标志和命令行输出行为
  • internal/config/: i18n.jsonc 解析与验证
  • internal/i18n/runsvc/: run 计划和执行流程
  • internal/i18n/syncsvc/:同步编排与冲突逻辑
  • internal/i18n/storage/: 适配器合约和提供商集成

在打开 PR 之前

make precommit
这将在贡献者使用的相同流程中运行格式化、代码检查、测试和构建检查。