本文件只说明 monorepo 目录约定、模块边界和 just 入口分层。
cmd/
{name}/
Package.swift
justfile
macosapp/
{name}/
Package.swift
justfile
swiftpkg/
{name}/
Package.swift
tool/
swift/
justfile
- 根入口在 justfile。这里只注册模块和项目级入口,不重复转发子模块已有 recipe。
- CLI 统一入口在 cmd/justfile。这里负责 command package 的
build cmd、run cmd。 - macOS app 统一入口在 macosapp/justfile。这里负责
build app、install app、restart app。 - Swift toolchain 通用入口在 tool/swift/justfile。这里负责
build、test、run、show-bin-path。 - Swift package 只有在存在独有行为时才保留
swiftpkg/{name}/justfile。纯库 package 不放 justfile,直接复用 tool/swift/justfile。
- cmd/llmswitch 是当前 CLI command package。
- macosapp/LLMSwitch 是当前 macOS app package。
- swiftpkg/LLMSwitchCore 是当前 Swift package,承载纯 core library。
just cmd run llmswitch servejust macosapp build LLMSwitchjust macosapp install LLMSwitchjust macosapp restart LLMSwitchjust swift test cmd/llmswitchjust swift test swiftpkg/LLMSwitchCore