@exonix/tchat-cli 1.0.5 → 1.0.7
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 +39 -4
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -10,10 +10,21 @@ npm install -g @exonix/tchat-cli
|
|
|
10
10
|
|
|
11
11
|
## Configure
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Token 获取方式(按优先级):
|
|
14
|
+
|
|
15
|
+
1. 环境变量 `TCHAT_ACCESSTOKEN`
|
|
16
|
+
2. 配置文件 `~/.tchat-cli/config.yaml`(`tchat-cli auth login` 自动保存)
|
|
17
|
+
3. 通过 `tchat-cli token get --uid <UID>` 获取并自动保存
|
|
14
18
|
|
|
15
19
|
```bash
|
|
20
|
+
# 方式一:环境变量
|
|
16
21
|
export TCHAT_ACCESSTOKEN="your_access_token"
|
|
22
|
+
|
|
23
|
+
# 方式二:H5 登录(自动保存到配置文件)
|
|
24
|
+
tchat-cli auth login
|
|
25
|
+
|
|
26
|
+
# 方式三:通过 IDM 接口获取 token
|
|
27
|
+
tchat-cli token get --uid <UID>
|
|
17
28
|
```
|
|
18
29
|
|
|
19
30
|
## Usage
|
|
@@ -22,22 +33,46 @@ export TCHAT_ACCESSTOKEN="your_access_token"
|
|
|
22
33
|
# Show help
|
|
23
34
|
tchat-cli --help
|
|
24
35
|
|
|
36
|
+
# Authentication
|
|
37
|
+
tchat-cli auth login
|
|
38
|
+
tchat-cli auth status
|
|
39
|
+
|
|
40
|
+
# Token management
|
|
41
|
+
tchat-cli token get --uid <UID>
|
|
42
|
+
|
|
25
43
|
# Widget categories
|
|
26
44
|
tchat-cli widget list
|
|
27
|
-
tchat-cli widget list --
|
|
45
|
+
tchat-cli widget list --keyword 考勤
|
|
28
46
|
|
|
29
47
|
# Message search
|
|
30
48
|
tchat-cli msg search --session "g@10000219039" --sender user001 --type SESSION_RECENT
|
|
31
49
|
|
|
32
50
|
# Contact search
|
|
33
|
-
tchat-cli contact search -k "
|
|
51
|
+
tchat-cli contact search -k "张三"
|
|
52
|
+
|
|
53
|
+
# File management
|
|
54
|
+
tchat-cli file list --type 1
|
|
55
|
+
tchat-cli file list --type 1 --name "项目"
|
|
56
|
+
|
|
57
|
+
# IM
|
|
58
|
+
tchat-cli im session-list
|
|
59
|
+
tchat-cli im message-search --session "g@10001" --limit 100
|
|
60
|
+
|
|
61
|
+
# Schedule
|
|
62
|
+
tchat-cli schedule list --uid zhangsan --date 1704067200000 --date2 1706745600000
|
|
63
|
+
tchat-cli schedule create -d '{"subject":"会议","startTime":1704182400000,"endTime":1704186000000}'
|
|
64
|
+
|
|
65
|
+
# Meeting
|
|
66
|
+
tchat-cli meeting create -d '{"type":0,"subject":"评审","startTime":1704182400000,"endTime":1704186000000,"meetingType":0}'
|
|
67
|
+
tchat-cli meeting list
|
|
68
|
+
tchat-cli meeting history
|
|
34
69
|
```
|
|
35
70
|
|
|
36
71
|
## Environment
|
|
37
72
|
|
|
38
73
|
| Flag | Default | Description |
|
|
39
74
|
|------|---------|-------------|
|
|
40
|
-
| `--env` | `
|
|
75
|
+
| `--env` | `prod` | `test` or `prod` |
|
|
41
76
|
|
|
42
77
|
## Docs
|
|
43
78
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exonix/tchat-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "TChat CLI - AI friendly command line tool for TChat platform",
|
|
5
5
|
"keywords": ["tchat", "cli", "teamwork", "ai"],
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"postinstall": "node scripts/install.js"
|
|
13
13
|
},
|
|
14
14
|
"optionalDependencies": {
|
|
15
|
-
"@exonix/tchat-cli-darwin-arm64": "1.0.
|
|
16
|
-
"@exonix/tchat-cli-darwin-x64": "1.0.
|
|
17
|
-
"@exonix/tchat-cli-linux-x64": "1.0.
|
|
18
|
-
"@exonix/tchat-cli-linux-arm64": "1.0.
|
|
19
|
-
"@exonix/tchat-cli-win32-x64": "1.0.
|
|
15
|
+
"@exonix/tchat-cli-darwin-arm64": "1.0.7",
|
|
16
|
+
"@exonix/tchat-cli-darwin-x64": "1.0.7",
|
|
17
|
+
"@exonix/tchat-cli-linux-x64": "1.0.7",
|
|
18
|
+
"@exonix/tchat-cli-linux-arm64": "1.0.7",
|
|
19
|
+
"@exonix/tchat-cli-win32-x64": "1.0.7"
|
|
20
20
|
},
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|