@hostlink/hostlink-cli 1.0.0 → 1.0.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 +258 -235
- package/dist/bundle.js +32839 -29
- package/index.js +36 -34
- package/package.json +39 -38
package/README.md
CHANGED
|
@@ -1,235 +1,258 @@
|
|
|
1
|
-
# hostlink-cli
|
|
2
|
-
|
|
3
|
-
CLI
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
hostlink
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
hostlink quotations
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
|
226
|
-
|
|
227
|
-
|
|
|
228
|
-
|
|
|
229
|
-
| `--
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
1
|
+
# hostlink-cli
|
|
2
|
+
|
|
3
|
+
**CLI for the [HostLink](https://www.hostlink.com.hk) platform — built for humans and AI agents.**
|
|
4
|
+
|
|
5
|
+
<p>
|
|
6
|
+
<a href="https://www.npmjs.com/package/@hostlink/hostlink-cli"><img src="https://img.shields.io/npm/v/@hostlink/hostlink-cli" alt="npm version"></a>
|
|
7
|
+
<a href="https://github.com/HostLink/hostlink-cli/blob/main/LICENSE"><img src="https://img.shields.io/github/license/HostLink/hostlink-cli" alt="license"></a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g @hostlink/hostlink-cli
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Authentication
|
|
17
|
+
|
|
18
|
+
Obtain your access token from the HostLink portal, then save it:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
hostlink set-token YOUR_TOKEN
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## AI Agent Skills
|
|
27
|
+
|
|
28
|
+
This repo ships Agent Skills (`SKILL.md` files) for every command — ready to use with GitHub Copilot, Cursor, and any MCP-compatible AI agent.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Install all hostlink skills at once
|
|
32
|
+
npx skills add https://github.com/HostLink/hostlink-cli
|
|
33
|
+
|
|
34
|
+
# Or pick only what you need
|
|
35
|
+
npx skills add https://github.com/HostLink/hostlink-cli/tree/main/skills/hostlink-me
|
|
36
|
+
npx skills add https://github.com/HostLink/hostlink-cli/tree/main/skills/hostlink-clients
|
|
37
|
+
npx skills add https://github.com/HostLink/hostlink-cli/tree/main/skills/hostlink-domains
|
|
38
|
+
npx skills add https://github.com/HostLink/hostlink-cli/tree/main/skills/hostlink-quotations
|
|
39
|
+
npx skills add https://github.com/HostLink/hostlink-cli/tree/main/skills/hostlink-quotation-items
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Commands
|
|
45
|
+
|
|
46
|
+
### `hostlink me`
|
|
47
|
+
|
|
48
|
+
Show the current logged-in user's profile.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
hostlink me
|
|
52
|
+
hostlink me --json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
### `hostlink clients`
|
|
58
|
+
|
|
59
|
+
Manage clients.
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# List clients
|
|
63
|
+
hostlink clients list
|
|
64
|
+
hostlink clients list --limit 20 --offset 0
|
|
65
|
+
hostlink clients list --search "HostLink"
|
|
66
|
+
hostlink clients list --json
|
|
67
|
+
|
|
68
|
+
# Get a client by ID
|
|
69
|
+
hostlink clients get <id>
|
|
70
|
+
hostlink clients get <id> --json
|
|
71
|
+
|
|
72
|
+
# Update a client
|
|
73
|
+
hostlink clients update <id> --client-name "New Name" --client-email "email@example.com"
|
|
74
|
+
|
|
75
|
+
# Delete a client
|
|
76
|
+
hostlink clients delete <id>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Update options:**
|
|
80
|
+
|
|
81
|
+
| Option | Description |
|
|
82
|
+
|---|---|
|
|
83
|
+
| `--client-name` | Client name |
|
|
84
|
+
| `--client-email` | Email |
|
|
85
|
+
| `--client-phone` | Phone |
|
|
86
|
+
| `--client-fax` | Fax |
|
|
87
|
+
| `--client-addr1~3` | Address lines |
|
|
88
|
+
| `--client-city` | City |
|
|
89
|
+
| `--client-website` | Website |
|
|
90
|
+
| `--br-no` | BR number |
|
|
91
|
+
| `--br-expiry-date` | BR expiry date |
|
|
92
|
+
| `--remark` | Remark |
|
|
93
|
+
| `--join-date` | Join date |
|
|
94
|
+
| `--suspend-date` | Suspend date |
|
|
95
|
+
| `--termination-date` | Termination date |
|
|
96
|
+
| `--bill-name` | Billing name |
|
|
97
|
+
| `--bill-email` | Billing email |
|
|
98
|
+
| `--bill-phone` | Billing phone |
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
### `hostlink domains`
|
|
103
|
+
|
|
104
|
+
Manage domains.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# List domains
|
|
108
|
+
hostlink domains list
|
|
109
|
+
hostlink domains list --client <client_id>
|
|
110
|
+
hostlink domains list --search "example.com"
|
|
111
|
+
hostlink domains list --json
|
|
112
|
+
|
|
113
|
+
# Get a domain by ID
|
|
114
|
+
hostlink domains get <id>
|
|
115
|
+
hostlink domains get <id> --json
|
|
116
|
+
|
|
117
|
+
# Add a domain
|
|
118
|
+
hostlink domains add --client-id <id> --domain-name "example.com" --expiry-date "2027-01-01" --registrar "GoDaddy"
|
|
119
|
+
|
|
120
|
+
# Update a domain
|
|
121
|
+
hostlink domains update <id> --expiry-date "2028-01-01" --remark "renewed"
|
|
122
|
+
|
|
123
|
+
# Delete a domain
|
|
124
|
+
hostlink domains delete <id>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Add / Update options:**
|
|
128
|
+
|
|
129
|
+
| Option | Description |
|
|
130
|
+
|---|---|
|
|
131
|
+
| `--client-id` | Client ID |
|
|
132
|
+
| `--domain-name` | Domain name |
|
|
133
|
+
| `--expiry-date` | Expiry date |
|
|
134
|
+
| `--creation-date` | Creation date |
|
|
135
|
+
| `--registrar` | Registrar |
|
|
136
|
+
| `--primary-dns` | Primary DNS |
|
|
137
|
+
| `--secondary-dns` | Secondary DNS |
|
|
138
|
+
| `--domain-user-id` | Domain user ID |
|
|
139
|
+
| `--domain-password` | Domain password |
|
|
140
|
+
| `--domain-type` | Domain type |
|
|
141
|
+
| `--remark` | Remark |
|
|
142
|
+
| `--server-id` | Server ID |
|
|
143
|
+
| `--status` | Status |
|
|
144
|
+
| `--is-project` | Mark as project |
|
|
145
|
+
| `--is-vm` | Mark as VM |
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
### `hostlink quotations`
|
|
150
|
+
|
|
151
|
+
Manage quotations.
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
# List quotations
|
|
155
|
+
hostlink quotations list
|
|
156
|
+
hostlink quotations list --client <client_id>
|
|
157
|
+
hostlink quotations list --search "ABC Ltd"
|
|
158
|
+
hostlink quotations list --status "pending"
|
|
159
|
+
hostlink quotations list --json
|
|
160
|
+
|
|
161
|
+
# Get a quotation by ID
|
|
162
|
+
hostlink quotations get <id>
|
|
163
|
+
hostlink quotations get <id> --json
|
|
164
|
+
|
|
165
|
+
# Add a quotation
|
|
166
|
+
hostlink quotations add --client-id <id> --client-name "ABC Ltd" --quotation-date "2026-03-20" --due-date "2026-04-20"
|
|
167
|
+
|
|
168
|
+
# Update a quotation
|
|
169
|
+
hostlink quotations update <id> --status "approved" --sign-date "2026-03-25"
|
|
170
|
+
|
|
171
|
+
# Delete a quotation
|
|
172
|
+
hostlink quotations delete <id>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Add / Update options:**
|
|
176
|
+
|
|
177
|
+
| Option | Description |
|
|
178
|
+
|---|---|
|
|
179
|
+
| `--client-id` | Client ID |
|
|
180
|
+
| `--client-name` | Client name |
|
|
181
|
+
| `--quotation-date` | Quotation date (YYYY-MM-DD) |
|
|
182
|
+
| `--due-date` | Due date (YYYY-MM-DD) |
|
|
183
|
+
| `--sign-date` | Sign date (YYYY-MM-DD) |
|
|
184
|
+
| `--email` | Email |
|
|
185
|
+
| `--phone` | Phone |
|
|
186
|
+
| `--addr1~3` | Address lines |
|
|
187
|
+
| `--city` | City |
|
|
188
|
+
| `--note` | Note |
|
|
189
|
+
| `--remark` | Remark |
|
|
190
|
+
| `--header` | Header text |
|
|
191
|
+
| `--status` | Status |
|
|
192
|
+
| `--service-type` | Service type |
|
|
193
|
+
| `--quotation-type` | Quotation type |
|
|
194
|
+
| `--renew` | Mark as renewal |
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
### `hostlink quotation-items`
|
|
199
|
+
|
|
200
|
+
Manage items within a quotation. Each quotation can have multiple items.
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
# List all items in a quotation
|
|
204
|
+
hostlink quotation-items list <quotation_id>
|
|
205
|
+
hostlink quotation-items list <quotation_id> --json
|
|
206
|
+
|
|
207
|
+
# Get an item by ID
|
|
208
|
+
hostlink quotation-items get <id>
|
|
209
|
+
hostlink quotation-items get <id> --json
|
|
210
|
+
|
|
211
|
+
# Add an item to a quotation
|
|
212
|
+
hostlink quotation-items add --quotation-id <id> --name "Web Hosting" --unit-price 500 --unit-month 12 --unit-quantity 1
|
|
213
|
+
|
|
214
|
+
# Update an item
|
|
215
|
+
hostlink quotation-items update <id> --unit-price 600 --discount 10
|
|
216
|
+
|
|
217
|
+
# Delete an item
|
|
218
|
+
hostlink quotation-items delete <id>
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Add / Update options:**
|
|
222
|
+
|
|
223
|
+
| Option | Description |
|
|
224
|
+
|---|---|
|
|
225
|
+
| `--quotation-id` | Quotation ID *(required for add)* |
|
|
226
|
+
| `--name` | Item name *(required for add)* |
|
|
227
|
+
| `--unit-price` | Unit price |
|
|
228
|
+
| `--unit-month` | Number of months (default: 1) |
|
|
229
|
+
| `--unit-quantity` | Quantity |
|
|
230
|
+
| `--discount` | Discount percentage |
|
|
231
|
+
| `--remark` | Remark |
|
|
232
|
+
| `--sequence` | Display sequence order |
|
|
233
|
+
| `--service-id` | Service ID |
|
|
234
|
+
| `--domain-id` | Domain ID |
|
|
235
|
+
| `--optional` | Mark as optional item |
|
|
236
|
+
| `--accept` | Mark as accepted |
|
|
237
|
+
| `--hidden-price` | Hide price |
|
|
238
|
+
| `--hidden-quantity` | Hide quantity |
|
|
239
|
+
| `--hidden-number` | Hide number |
|
|
240
|
+
| `--page-break` | Insert page break after item |
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Global Options
|
|
245
|
+
|
|
246
|
+
All list commands support:
|
|
247
|
+
|
|
248
|
+
| Option | Description |
|
|
249
|
+
|---|---|
|
|
250
|
+
| `-l, --limit <n>` | Max records to return (default: 50) |
|
|
251
|
+
| `-o, --offset <n>` | Records to skip (default: 0) |
|
|
252
|
+
| `--json` | Output as JSON |
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## License
|
|
257
|
+
|
|
258
|
+
MIT © [HostLink](https://www.hostlink.com.hk)
|