@hust-open-atom-club/atomgit-cli 0.7.1 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.en.md +137 -0
  2. package/README.md +67 -51
  3. package/package.json +10 -9
package/README.en.md ADDED
@@ -0,0 +1,137 @@
1
+ # AtomGit CLI (ag)
2
+
3
+ [![License](https://img.shields.io/badge/license-MulanPSL--2.0-blue.svg)](LICENSE)
4
+ [![npm](https://img.shields.io/npm/v/%40hust-open-atom-club%2Fatomgit-cli?logo=npm)](https://www.npmjs.com/package/@hust-open-atom-club/atomgit-cli)
5
+ [![Latest Release](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.atomgit.com%2Fapi%2Fv5%2Frepos%2Fhust-open-atom-club%2Fatomgit-cli%2Freleases%2Flatest&query=%24.tag_name&label=release)](https://atomgit.com/hust-open-atom-club/atomgit-cli/releases)
6
+ [![CI Status](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.atomgit.com%2Fapi%2Fv8%2Frepos%2Fhust-open-atom-club%2Fatomgit-cli%2Factions%2Fruns%3Fworkflow_name%3DCI%26branch%3Dmain%26per_page%3D1&query=%24.workflow_runs%5B0%5D.status&label=CI%20status)](https://atomgit.com/hust-open-atom-club/atomgit-cli/actions)
7
+ [![Homebrew](https://img.shields.io/badge/homebrew-core-FBB040?logo=homebrew&logoColor=white)](https://formulae.brew.sh/formula/atomgit-cli)
8
+ [![Go Reference](https://pkg.go.dev/badge/atomgit.com/hust-open-atom-club/atomgit-cli.svg)](https://pkg.go.dev/atomgit.com/hust-open-atom-club/atomgit-cli)
9
+ [![GoReleaser](https://img.shields.io/badge/powered_by-GoReleaser-69D7E4?logo=goreleaser&logoColor=white)](https://goreleaser.com/)
10
+
11
+ A command-line client for AtomGit, developed with reference to GitHub CLI (`gh`).
12
+
13
+ 中文说明:[README.md](README.md)
14
+
15
+ ## Features
16
+
17
+ | Category | Capabilities |
18
+ | --- | --- |
19
+ | 📦 Repositories | List, view, create, edit, clone, delete, fork, and synchronize repositories; manage repository push rules |
20
+ | 👥 Collaborators | List, view, add, edit, and remove repository collaborators |
21
+ | 🔔 Webhooks | List, view, create, edit, delete, and test repository webhooks |
22
+ | 🌿 Branches | List, view, create, and delete branches; manage branch protection rules |
23
+ | 🔀 Pull Requests | List, view, create, edit, close, reopen, review, merge, and check out PRs; inspect diffs and checks; manage comments and linked Issues |
24
+ | 🐛 Issues | List, view, create, edit, close, and reopen Issues; manage labels and comments |
25
+ | 🔖 Labels | List, create, edit, and delete repository labels |
26
+ | 🎯 Milestones | List, view, create, edit, close, reopen, and delete milestones |
27
+ | 🏷️ Tags | List, create, and delete Git tags; manage protected tag rules |
28
+ | 🚀 Releases | List, view, create, and edit Releases; upload and download assets |
29
+ | ⚙️ Actions | List, validate, and trigger workflows; inspect workflow runs, jobs, logs, and artifacts; download logs and artifacts |
30
+ | 🏢 Organizations | List organizations joined by the current account |
31
+ | 🔍 Search | Search repositories, users, and Issues |
32
+ | 💬 Discussions | List repository Discussions |
33
+ | 🔔 Notifications | List repository notifications and mark them as read |
34
+ | 🔐 Authentication and SSH keys | OAuth login, token refresh, account switching, authentication status, and SSH public-key management |
35
+ | 🌐 API | Call AtomGit API v5 with pagination, JSON request bodies, and GET, POST, PATCH, PUT, and DELETE methods |
36
+
37
+ ## AI Agent Skills
38
+
39
+ [AtomGit Skills](https://atomgit.com/hust-open-atom-club/atomgit-skills) provides Codex Skills powered by `ag` for Issue, Pull Request, CLI release, and GitHub mirroring workflows. See that repository for installation instructions and the complete list.
40
+
41
+ ## Installation
42
+
43
+ ### npm
44
+
45
+ ```bash
46
+ npm install -g @hust-open-atom-club/atomgit-cli
47
+ ```
48
+
49
+ ### Homebrew
50
+
51
+ Install the latest stable release from Homebrew Core (recommended):
52
+
53
+ ```bash
54
+ brew install atomgit-cli
55
+ ```
56
+
57
+ To track a development snapshot from the latest commit on AtomGit `main`, use the project-maintained Homebrew tap instead:
58
+
59
+ ```bash
60
+ brew install hust-open-atom-club/tap/atomgit-cli
61
+ ```
62
+
63
+ Homebrew Core provides stable releases, while the project tap provides development snapshots. Both formulas use the same name and cannot be installed together. See the [complete installation guide](docs/installation.md#homebrew-安装) for differences and switching instructions.
64
+
65
+ ### WinGet
66
+
67
+ ```powershell
68
+ winget install HUSTOpenAtomClub.AtomGitCLI
69
+ ```
70
+
71
+ ### Scoop
72
+
73
+ ```powershell
74
+ scoop bucket add hust-open-atom-club https://github.com/hust-open-atom-club/ScoopBucket
75
+ scoop install atomgit-cli
76
+ ```
77
+
78
+ ### Nix / NixOS
79
+
80
+ `atomgit-cli` is currently available only in `nixos-unstable`. Make sure `nixpkgs` points to unstable; stable channels do not include it yet.
81
+
82
+ ```bash
83
+ nix profile install nixpkgs#atomgit-cli
84
+ ```
85
+
86
+ ### AUR / Arch Linux
87
+
88
+ `atomgit-cli` is available in the Arch User Repository (AUR). Use `yay` or `paru` to choose a stable source package, a stable prebuilt binary, or a development package.
89
+
90
+ ```bash
91
+ # Stable release built from source
92
+ yay -S atomgit-cli
93
+ # Stable prebuilt binary
94
+ yay -S atomgit-cli-bin
95
+ # Development version tracking the latest commit on main
96
+ yay -S atomgit-cli-git
97
+ ```
98
+
99
+ ### Go
100
+
101
+ ```bash
102
+ go install atomgit.com/hust-open-atom-club/atomgit-cli/cmd/ag@latest
103
+ ```
104
+
105
+ See the [complete installation guide](docs/installation.md) for requirements, upgrades, AtomGit Releases, and source installation.
106
+
107
+ ## Configuration
108
+
109
+ Run `ag auth login` for the initial OAuth login. In an environment without a browser, such as a sandbox, container, or CI job, use `echo "$TOKEN" | ag auth login --with-token` to authenticate with an existing access token. See the [configuration guide](docs/configuration.md) for credentials, output safety, and repository inference.
110
+
111
+ ## Usage
112
+
113
+ Run `ag --help` for a command overview or `ag <command> --help` for command-specific options. See the [usage guide](docs/usage.md) for complete examples and explanations.
114
+
115
+ See the [FAQ](docs/faq.md) for common installation, authentication, usage, and troubleshooting questions.
116
+
117
+ ## More Documentation
118
+
119
+ - [Release guide](docs/releasing.md)
120
+ - [Project structure](docs/project-structure.md)
121
+
122
+ ## API
123
+
124
+ General repository features use AtomGit API v5: `https://api.atomgit.com/api/v5`.
125
+
126
+ Actions run checks use the separate AtomGit API v8: `https://api.atomgit.com/api/v8`.
127
+
128
+ ### References
129
+
130
+ - [AtomGit API documentation](https://docs.atomgit.com/docs/apis/)
131
+ - [GitHub CLI](https://cli.github.com/)
132
+
133
+ ## License
134
+
135
+ [Mulan Permissive Software License, Version 2](LICENSE)
136
+
137
+ Copyright (c) 2026 HUST OpenAtom Club, AtomGit, and the AtomGit CLI contributors
package/README.md CHANGED
@@ -1,107 +1,123 @@
1
1
  # AtomGit CLI (ag)
2
2
 
3
+ [![License](https://img.shields.io/badge/license-MulanPSL--2.0-blue.svg)](LICENSE)
4
+ [![npm](https://img.shields.io/npm/v/%40hust-open-atom-club%2Fatomgit-cli?logo=npm)](https://www.npmjs.com/package/@hust-open-atom-club/atomgit-cli)
5
+ [![Latest Release](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.atomgit.com%2Fapi%2Fv5%2Frepos%2Fhust-open-atom-club%2Fatomgit-cli%2Freleases%2Flatest&query=%24.tag_name&label=release)](https://atomgit.com/hust-open-atom-club/atomgit-cli/releases)
6
+ [![CI Status](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.atomgit.com%2Fapi%2Fv8%2Frepos%2Fhust-open-atom-club%2Fatomgit-cli%2Factions%2Fruns%3Fworkflow_name%3DCI%26branch%3Dmain%26per_page%3D1&query=%24.workflow_runs%5B0%5D.status&label=CI%20status)](https://atomgit.com/hust-open-atom-club/atomgit-cli/actions)
7
+ [![Homebrew](https://img.shields.io/badge/homebrew-core-FBB040?logo=homebrew&logoColor=white)](https://formulae.brew.sh/formula/atomgit-cli)
8
+ [![Go Reference](https://pkg.go.dev/badge/atomgit.com/hust-open-atom-club/atomgit-cli.svg)](https://pkg.go.dev/atomgit.com/hust-open-atom-club/atomgit-cli)
9
+ [![GoReleaser](https://img.shields.io/badge/powered_by-GoReleaser-69D7E4?logo=goreleaser&logoColor=white)](https://goreleaser.com/)
10
+
3
11
  AtomGit 命令行工具,参考 GitHub CLI (gh) 开发。
4
12
 
13
+ English: [README.en.md](README.en.md)
14
+
15
+ ## 功能
16
+
17
+ | 类别 | 能力 |
18
+ | --- | --- |
19
+ | 📦 仓库 | 列出、查看、创建、编辑、克隆、删除、复刻和同步仓库,管理仓库级推送规则 |
20
+ | 👥 协作者 | 列出、查看、添加、修改和移除仓库协作者 |
21
+ | 🔔 Webhook | 列出、查看、创建、编辑、删除和测试仓库 Webhook |
22
+ | 🌿 分支 | 列出、查看、创建和删除分支,管理分支保护规则 |
23
+ | 🔀 Pull Request | 列出、查看、创建、编辑、关闭、重开、审查、合并和检出 PR,查看差异与检查结果,管理评论和关联 Issue |
24
+ | 🐛 Issue | 列出、查看、创建、编辑、关闭和重开 Issue,管理标签和评论 |
25
+ | 🔖 标签 | 列出、创建、编辑和删除仓库标签 |
26
+ | 🎯 里程碑 | 列出、查看、创建、编辑、关闭、重开和删除里程碑 |
27
+ | 🏷️ Tag | 列出、创建和删除 Git tag,管理保护 tag 规则 |
28
+ | 🚀 Release | 列出、查看、创建和编辑 Release,上传和下载附件 |
29
+ | ⚙️ Actions | 列出、校验和触发 workflow;查看 workflow 运行、job、日志与 artifact,并下载日志和 artifact |
30
+ | 🏢 组织 | 列出当前账号加入的组织 |
31
+ | 🔍 搜索 | 搜索仓库、用户和 Issue |
32
+ | 💬 Discussion | 列出仓库 Discussion |
33
+ | 🔔 通知 | 列出仓库通知并标记已读 |
34
+ | 🔐 认证与 SSH Key | OAuth 登录、刷新和切换账号,查看认证状态,管理 SSH 公钥 |
35
+ | 🌐 API | 调用 AtomGit API v5,支持分页、JSON 请求体和 GET、POST、PATCH、PUT、DELETE 方法 |
36
+
37
+ ## AI Agent Skills
38
+
39
+ [AtomGit Skills](https://atomgit.com/hust-open-atom-club/atomgit-skills) 提供由 `ag` 驱动的 Codex Skills,覆盖 Issue、Pull Request、CLI 发布和 GitHub 镜像工作流。安装方式和完整清单见该仓库。
40
+
5
41
  ## 安装
6
42
 
7
43
  ### npm
8
44
 
9
- 需要 Node.js 18 或更高版本:
10
-
11
45
  ```bash
12
- npm install --global @hust-open-atom-club/atomgit-cli
46
+ npm install -g @hust-open-atom-club/atomgit-cli
13
47
  ```
14
48
 
15
- npm 会通过当前操作系统和 CPU 对应的可选依赖安装预编译二进制,不需要运行 `postinstall` 脚本。
16
-
17
49
  ### Homebrew
18
50
 
19
- macOS 或 Linux 用户可以通过项目维护的 Homebrew tap 安装:
51
+ 安装 Homebrew Core 提供的最新稳定版(推荐):
20
52
 
21
53
  ```bash
22
- brew install hust-open-atom-club/tap/atomgit-cli
54
+ brew install atomgit-cli
23
55
  ```
24
56
 
57
+ 如需跟踪 AtomGit `main` 最新 commit 的开发快照,可改用项目维护的 Homebrew Tap:
25
58
 
26
- ### WinGet
27
-
28
- Windows 用户可以通过 Windows Package Manager 安装:
29
-
30
- ```powershell
31
- winget install hust-open-atom-club.atomgit-cli
59
+ ```bash
60
+ brew install hust-open-atom-club/tap/atomgit-cli
32
61
  ```
33
62
 
34
- 升级已安装的 AtomGit CLI:
63
+ Homebrew Core 面向稳定版,项目 Tap 面向开发快照;两者使用同名 Formula,不能同时安装。区别和切换方法请参阅[完整安装指南](docs/installation.md#homebrew-安装)。
64
+
65
+ ### WinGet
35
66
 
36
67
  ```powershell
37
- winget upgrade atomgit-cli
68
+ winget install HUSTOpenAtomClub.AtomGitCLI
38
69
  ```
39
70
 
40
- WinGet 安装的二进制由 WinGet 管理升级。
41
-
42
71
  ### Scoop
43
72
 
44
- Windows 用户可以通过组织维护的 scoop bucket 安装:
45
-
46
73
  ```powershell
47
- scoop install https://raw.githubusercontent.com/hust-open-atom-club/ScoopBucket/main/bucket/atomgit-cli.json
74
+ scoop bucket add hust-open-atom-club https://github.com/hust-open-atom-club/ScoopBucket
75
+ scoop install atomgit-cli
48
76
  ```
49
77
 
50
78
  ### Nix / NixOS
51
79
 
52
- AtomGit CLI 已进入 `nixos-unstable`,包名为 `atomgit-cli`,安装后提供 `ag` 命令。
53
-
54
- 如果你的 Nix registry 或 flake input 已指向 `nixos-unstable`:
80
+ 目前仅 `nixos-unstable` 提供 `atomgit-cli`,请确保 `nixpkgs` 指向 unstable;stable 尚未收录。
55
81
 
56
82
  ```bash
57
83
  nix profile install nixpkgs#atomgit-cli
58
84
  ```
59
85
 
60
- 如果你使用的是稳定版 nixpkgs,可以显式从 `nixos-unstable` 安装:
86
+ ### Aur / Archlinux
87
+
88
+ 目前atomgit 已经上传到aur 中,用户可以用yay/paru自行选择从二进制、源码或开发版安装
61
89
 
62
90
  ```bash
63
- nix profile install github:NixOS/nixpkgs/nixos-unstable#atomgit-cli
91
+ # 从源码安装(稳定版)
92
+ yay -S atomgit-cli
93
+ # 二进制安装(稳定版,免编译)
94
+ yay -S atomgit-cli-bin
95
+ # 开发版安装(跟随 main 分支最新提交)
96
+ yay -S atomgit-cli-git
64
97
  ```
65
98
 
66
99
  ### Go
67
100
 
68
- 需要 Go 1.24.2 或更高版本。项目正式支持 macOS、Linux 和 Windows;其他 Go 目标平台的兼容性不作保证:
69
-
70
101
  ```bash
71
102
  go install atomgit.com/hust-open-atom-club/atomgit-cli/cmd/ag@latest
72
103
  ```
73
104
 
74
- **注意:** 通过 Go 模块代理安装时,`ag version` 能显示模块版本,但由于模块代理提供的源码包不包含 Git 历史,文本输出会省略无法获得的 commit 和构建时间;`ag version --json` 中对应字段为 `unknown`。这不影响 CLI 功能;如需完整的版本元数据,请使用 npm、Homebrew 或 Release 页面提供的预编译版本。
75
-
76
- 其他安装方式请参阅[完整安装指南](docs/installation.md)。
105
+ 安装要求、升级方式、AtomGit Release 和源码安装请参阅[完整安装指南](docs/installation.md)。
77
106
 
78
107
  ## 配置
79
108
 
80
- 首次使用时运行 `ag auth login` 完成 OAuth 登录。访问令牌、手动配置、输出安全和仓库推断规则请参阅[配置指南](docs/configuration.md)。
81
-
82
- ## 命令
83
-
84
- 完成认证后,可以通过 `ag` 管理 AtomGit 仓库、Issue、Pull Request、Release 和其他资源:
85
-
86
- ```bash
87
- ag auth status
88
- ag repo view
89
- ag issue list
90
- ag pr list
91
- ag check-update
92
- ag org list
93
- ag --help
94
- ```
109
+ 首次使用时运行 `ag auth login` 完成 OAuth 登录;无浏览器环境(沙箱、容器、CI)可改用 `echo "$TOKEN" | ag auth login --with-token` 通过已有访问令牌登录。凭据、输出安全和仓库推断参阅[配置指南](docs/configuration.md)。
95
110
 
96
- 各命令的参数、行为说明和完整示例请参阅[命令使用指南](docs/usage.md)。
111
+ ## 使用
97
112
 
98
- ## 发布打包
113
+ 运行 `ag --help` 查看命令概览,或运行 `ag <command> --help` 查看具体命令的参数。完整示例和说明参阅[使用指南](docs/usage.md)。
99
114
 
100
- GoReleaser、npm 制品和 Nix package 的发布与维护流程请参阅[发布指南](docs/releasing.md)。
115
+ 安装、认证、使用和故障排查中的常见问题请参阅[常见问题(FAQ)](docs/faq.md)。
101
116
 
102
- ## 项目结构
117
+ ## 更多文档
103
118
 
104
- CLI 的主要执行流程为 `cmd/ag` → `internal/agcmd` → `pkg/cmd/root` → 各命令包。目录职责、命令包列表和扩展方式请参阅[项目结构说明](docs/project-structure.md)
119
+ - [发布指南](docs/releasing.md)
120
+ - [项目结构](docs/project-structure.md)
105
121
 
106
122
  ## API
107
123
 
@@ -109,7 +125,7 @@ CLI 的主要执行流程为 `cmd/ag` → `internal/agcmd` → `pkg/cmd/root`
109
125
 
110
126
  Actions 运行检查使用独立的 AtomGit API v8:`https://api.atomgit.com/api/v8`。
111
127
 
112
- ## 参考
128
+ ### 参考
113
129
 
114
130
  - [AtomGit API 文档](https://docs.atomgit.com/docs/apis/)
115
131
  - [GitHub CLI](https://cli.github.com/)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hust-open-atom-club/atomgit-cli",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "AtomGit command-line interface",
5
5
  "license": "MulanPSL-2.0",
6
6
  "repository": {
@@ -24,20 +24,21 @@
24
24
  "bin/ag.js"
25
25
  ],
26
26
  "scripts": {
27
+ "publish:npm": "node scripts/publish-npm-packages.js",
27
28
  "test": "node --test",
28
29
  "version:npm": "node scripts/set-npm-version.js"
29
30
  },
30
31
  "optionalDependencies": {
31
- "@hust-open-atom-club/atomgit-cli-darwin-arm64": "0.7.1",
32
- "@hust-open-atom-club/atomgit-cli-darwin-x64": "0.7.1",
33
- "@hust-open-atom-club/atomgit-cli-linux-arm64": "0.7.1",
34
- "@hust-open-atom-club/atomgit-cli-linux-loong64": "0.7.1",
35
- "@hust-open-atom-club/atomgit-cli-linux-x64": "0.7.1",
36
- "@hust-open-atom-club/atomgit-cli-win32-arm64": "0.7.1",
37
- "@hust-open-atom-club/atomgit-cli-win32-x64": "0.7.1"
32
+ "@hust-open-atom-club/atomgit-cli-darwin-arm64": "0.7.3",
33
+ "@hust-open-atom-club/atomgit-cli-darwin-x64": "0.7.3",
34
+ "@hust-open-atom-club/atomgit-cli-linux-arm64": "0.7.3",
35
+ "@hust-open-atom-club/atomgit-cli-linux-loong64": "0.7.3",
36
+ "@hust-open-atom-club/atomgit-cli-linux-x64": "0.7.3",
37
+ "@hust-open-atom-club/atomgit-cli-win32-arm64": "0.7.3",
38
+ "@hust-open-atom-club/atomgit-cli-win32-x64": "0.7.3"
38
39
  },
39
40
  "devDependencies": {
40
41
  "adm-zip": "^0.6.0",
41
- "tar": "^7.5.20"
42
+ "tar": "^7.5.22"
42
43
  }
43
44
  }