@dreamor/atlas-cli 0.7.0 → 0.7.2

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.
package/README.md CHANGED
@@ -1,84 +1,7 @@
1
- # Atlas CLI
2
-
3
- > 斑马云图(Banma)人力基线管理工具
4
-
5
- ## 安装
1
+ # @dreamor/atlas-cli
6
2
 
7
3
  ```bash
8
4
  npm i -g @dreamor/atlas-cli
9
5
  ```
10
6
 
11
- > Node 20+ 是引擎基线(package.json 已声明 `engines.node: >=20`)。
12
-
13
- ## 升级
14
-
15
- ```bash
16
- npm update -g @dreamor/atlas-cli
17
- ```
18
-
19
- ## 首次使用
20
-
21
- ```bash
22
- atlas --help
23
- atlas auth login # 打开浏览器完成 SSO 登录
24
- atlas auth status # 检查登录态
25
- ```
26
-
27
- `auth login` 需要 Playwright 启动无头浏览器(仅首次):
28
-
29
- ```bash
30
- npm i -g playwright
31
- npx playwright install chromium
32
- ```
33
-
34
- 未安装时 CLI 会给清晰提示,不会阻塞主命令的安装与运行。
35
-
36
- ## 会话存储
37
-
38
- - macOS:默认使用 Keychain(依赖 `keytar`,通常随 Atlas 安装自动就绪)
39
- - 其他平台或 `keytar` 安装失败:自动降级到文件存储(`~/.atlas/cookies.json`)
40
-
41
- ## 命令速览
42
-
43
- | 命令 | 说明 |
44
- |------|------|
45
- | `atlas --help` | 帮助 |
46
- | `atlas auth {login,status}` | SSO 登录/状态 |
47
- | `atlas find <kind> <query>` | 搜索 project / department / mp-type / line-plan-type / area-code |
48
- | `atlas projects` | 列出你有权限的项目 |
49
- | `atlas link [project]` / `unlink` | 绑定/解绑默认项目 |
50
- | `atlas baseline month/summary/export` | 基线(计划)人力 |
51
- | `atlas actual show/month/summary/export` | 实际工时 |
52
- | `atlas compare` | 基线 vs 实际对比 |
53
- | `atlas schema {export,commands}` | CLI 自省(字典/参数 schema) |
54
- | `atlas daemon` | 本地守护进程 |
55
- | `atlas exec --plan-file <path>` | 批量执行(agent 用) |
56
- | `atlas update` | 由 npm registry 管理,CLI 只提示更新命令 |
57
- | `atlas suggest <query>` | 自然语言→命令翻译 |
58
-
59
- ## 全局选项
60
-
61
- - `--json` / `ATLAS_OUTPUT=json`:JSON 信封输出
62
- - `--quiet` / `ATLAS_QUIET=1`:静默
63
- - `--describe`:输出参数 schema(agent 自省)
64
-
65
- ## 退出码
66
-
67
- | 码 | 含义 |
68
- |----|------|
69
- | 0 | 成功 |
70
- | 1 | 通用错误 |
71
- | 2 | 会话过期 |
72
- | 3 | API 错误 |
73
- | 4 | 项目匹配歧义 |
74
- | 5 | 项目未找到 |
75
- | 6 | API 限流 |
76
- | 7 | 网络错误 |
77
- | 8 | 版本更新异常 |
78
- | 64 | 配置错误/未实现 |
79
-
80
- ## 文档
81
-
82
- - [INSTALL.md](./INSTALL.md) — 安装/环境变量/故障排查
83
- - [CHANGELOG.md](./CHANGELOG.md) — 变更日志
84
- - [CLAUDE.md](./CLAUDE.md) — 开发者指南(架构、命令、设计决策)
7
+ > Node 20+
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { buildProgram } from "../dist/adapters/atlas/cli.js";
2
+ import { buildProgram } from "./dist/adapters/atlas/cli.js";
3
3
  const program = buildProgram();
4
4
  program.parse(process.argv);
5
5
 
@@ -1 +1 @@
1
- export const ATLAS_VERSION = '0.7.0';
1
+ export const ATLAS_VERSION = '0.7.2';
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@dreamor/atlas-cli",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Atlas CLI - 斑马云图人力基线管理工具",
5
5
  "type": "module",
6
- "directories": {
7
- "bin": "bin"
6
+ "bin": {
7
+ "atlas": "./atlas.js"
8
8
  },
9
9
  "engines": {
10
10
  "node": ">=20"
11
11
  },
12
12
  "files": [
13
- "bin/atlas.js",
13
+ "atlas.js",
14
14
  "dist/adapters/**/*.js",
15
15
  "!dist/adapters/atlas/tests/**",
16
16
  "!dist/adapters/**/tests/**",
@@ -25,7 +25,7 @@
25
25
  "url": "git+https://github.com/dreamor/atlas-cli.git"
26
26
  },
27
27
  "scripts": {
28
- "build": "tsc -p tsconfig.json && rm -rf dist/adapters/atlas/bin && mkdir -p bin && echo '#!/usr/bin/env node\\nimport { buildProgram } from \"../dist/adapters/atlas/cli.js\";\\nconst program = buildProgram();\\nprogram.parse(process.argv);\\n' > bin/atlas.js && chmod +x bin/atlas.js",
28
+ "build": "tsc -p tsconfig.json && rm -rf dist/adapters/atlas/bin && echo '#!/usr/bin/env node\\nimport { buildProgram } from \"./dist/adapters/atlas/cli.js\";\\nconst program = buildProgram();\\nprogram.parse(process.argv);\\n' > atlas.js && chmod +x atlas.js",
29
29
  "lint": "tsc --noEmit --pretty false",
30
30
  "lint:watch": "tsc --noEmit --pretty false --watch",
31
31
  "test": "vitest run",
@@ -51,4 +51,4 @@
51
51
  "typescript": "^5.6.0",
52
52
  "vitest": "^2.1.0"
53
53
  }
54
- }
54
+ }