diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a33128f..b7a6565 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,13 +80,13 @@ jobs: run: echo "VERSION=${GITHUB_REF_NAME}" >> "$GITHUB_ENV" - name: Build package - run: task package GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} PACKAGE_NAME=cws_${VERSION}_${{ matrix.goos }}_${{ matrix.goarch }} + run: task package GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} PACKAGE_NAME=chaitin-cli_${VERSION}_${{ matrix.goos }}_${{ matrix.goarch }} - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: cws_${{ env.VERSION }}_${{ matrix.goos }}_${{ matrix.goarch }} - path: dist/cws_${{ env.VERSION }}_${{ matrix.goos }}_${{ matrix.goarch }}.* + name: chaitin-cli_${{ env.VERSION }}_${{ matrix.goos }}_${{ matrix.goarch }} + path: dist/chaitin-cli_${{ env.VERSION }}_${{ matrix.goos }}_${{ matrix.goarch }}.* if-no-files-found: error release: diff --git a/AGENTS.md b/AGENTS.md index f041e5d..7f1ab16 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,7 +8,7 @@ This repository is a Go CLI built around Cobra. [`main.go`](main.go) wires the r Use `task` for common workflows: -- `task build`: build `bin/cws`. +- `task build`: build `bin/chaitin-cli`. - `task test`: run `go test ./...`. - `task fmt`: run `go fmt ./...`. - `task lint`: run `go vet ./...`. diff --git a/Taskfile.yml b/Taskfile.yml index b51cd97..409c305 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,7 +1,7 @@ version: "3" vars: - BIN_NAME: cws + BIN_NAME: chaitin-cli BUILD_DIR: bin DIST_DIR: dist @@ -42,13 +42,13 @@ tasks: - go test ./... build: - desc: Build the cws binary + desc: Build the {{ .BIN_NAME }} binary cmds: - mkdir -p {{.BUILD_DIR}} - go build -o {{.BUILD_DIR}}/{{.BIN_NAME}} . build:target: - desc: Build the cws binary for a target platform + desc: Build the {{ .BIN_NAME }} binary for a target platform requires: vars: - GOOS @@ -61,7 +61,7 @@ tasks: - env CGO_ENABLED=0 GOOS={{.GOOS}} GOARCH={{.GOARCH}} go build -o {{.TARGET_DIR}}/{{.BIN_NAME}}{{.BIN_EXT}} . package: - desc: Build and archive the cws binary for a target platform + desc: Build and archive the {{ .BIN_NAME }} binary for a target platform requires: vars: - GOOS diff --git a/main.go b/main.go index e301d72..9fa7236 100644 --- a/main.go +++ b/main.go @@ -30,7 +30,7 @@ const defaultConfigPath = "config.yaml" func newApp() (*app, error) { root := &cobra.Command{ - Use: "cws", + Use: "chaitin-cli", Short: "CLI for Chaitin Tech products", SilenceUsage: true, SilenceErrors: true, diff --git a/products/safeline-ce/command.go b/products/safeline-ce/command.go index 04c13ba..93f2b5b 100644 --- a/products/safeline-ce/command.go +++ b/products/safeline-ce/command.go @@ -38,16 +38,16 @@ func NewCommand() *cobra.Command { api_key: your-api-key # 2. 查看帮助 - cws safeline-ce --help + chaitin-cli safeline-ce --help # 3. 查看站点列表 - cws safeline-ce site list + chaitin-cli safeline-ce site list # 4. 查看攻击日志 - cws safeline-ce log attack list + chaitin-cli safeline-ce log attack list # 5. 查看统计概览 - cws safeline-ce stat overview + chaitin-cli safeline-ce stat overview 文档: https://github.com/chaitin/safeline-ce`, PersistentPreRun: func(cmd *cobra.Command, args []string) {