@zeyos/client 0.1.0
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/CHANGELOG.md +31 -0
- package/LICENSE +21 -0
- package/README.md +458 -0
- package/agents/README.md +66 -0
- package/agents/shared/business-app-benchmarks.md +111 -0
- package/agents/shared/zeyos-entity-map.md +142 -0
- package/agents/shared/zeyos-entity-reference.md +570 -0
- package/agents/shared/zeyos-query-patterns.md +89 -0
- package/agents/zeyos-account-intelligence/SKILL.md +34 -0
- package/agents/zeyos-account-intelligence/agents/openai.yaml +4 -0
- package/agents/zeyos-account-intelligence/references/workflows.md +84 -0
- package/agents/zeyos-billing-insights/SKILL.md +41 -0
- package/agents/zeyos-billing-insights/agents/openai.yaml +4 -0
- package/agents/zeyos-billing-insights/references/workflows.md +106 -0
- package/agents/zeyos-campaign-and-outreach/SKILL.md +44 -0
- package/agents/zeyos-campaign-and-outreach/agents/openai.yaml +4 -0
- package/agents/zeyos-campaign-and-outreach/references/workflows.md +100 -0
- package/agents/zeyos-collaboration-and-activity/SKILL.md +37 -0
- package/agents/zeyos-collaboration-and-activity/agents/openai.yaml +4 -0
- package/agents/zeyos-collaboration-and-activity/references/workflows.md +104 -0
- package/agents/zeyos-collections-and-dunning/SKILL.md +46 -0
- package/agents/zeyos-collections-and-dunning/agents/openai.yaml +4 -0
- package/agents/zeyos-collections-and-dunning/references/workflows.md +132 -0
- package/agents/zeyos-commerce-and-inventory/SKILL.md +38 -0
- package/agents/zeyos-commerce-and-inventory/agents/openai.yaml +4 -0
- package/agents/zeyos-commerce-and-inventory/references/workflows.md +101 -0
- package/agents/zeyos-mail-operations/SKILL.md +35 -0
- package/agents/zeyos-mail-operations/agents/openai.yaml +4 -0
- package/agents/zeyos-mail-operations/references/workflows.md +110 -0
- package/agents/zeyos-notes-and-sops/SKILL.md +31 -0
- package/agents/zeyos-notes-and-sops/agents/openai.yaml +4 -0
- package/agents/zeyos-notes-and-sops/references/workflows.md +85 -0
- package/agents/zeyos-platform-and-schema/SKILL.md +37 -0
- package/agents/zeyos-platform-and-schema/agents/openai.yaml +4 -0
- package/agents/zeyos-platform-and-schema/references/workflows.md +97 -0
- package/agents/zeyos-work-management/SKILL.md +45 -0
- package/agents/zeyos-work-management/agents/openai.yaml +4 -0
- package/agents/zeyos-work-management/references/workflows.md +148 -0
- package/docs/01-api-reference/01-data-retrieval.md +601 -0
- package/docs/01-api-reference/02-authentication.md +288 -0
- package/docs/01-api-reference/03-resources.md +270 -0
- package/docs/01-api-reference/04-schema.md +539 -0
- package/docs/01-api-reference/_category_.json +9 -0
- package/docs/02-javascript-client/01-getting-started.md +146 -0
- package/docs/02-javascript-client/02-authentication.md +287 -0
- package/docs/02-javascript-client/03-making-requests.md +572 -0
- package/docs/02-javascript-client/04-practical-guide.md +348 -0
- package/docs/02-javascript-client/_category_.json +9 -0
- package/docs/03-cli/01-getting-started.md +219 -0
- package/docs/03-cli/02-commands.md +407 -0
- package/docs/03-cli/03-configuration.md +220 -0
- package/docs/03-cli/_category_.json +9 -0
- package/docs/04-agent-workflows/00-coding-agents.md +35 -0
- package/docs/04-agent-workflows/01-agent-quickstart.md +147 -0
- package/docs/04-agent-workflows/02-agent-recipes.md +109 -0
- package/docs/04-agent-workflows/03-cli-coverage-and-escalation.md +65 -0
- package/docs/04-agent-workflows/_category_.json +9 -0
- package/docs/04-sample-apps/01-kanban.md +89 -0
- package/docs/04-sample-apps/02-crm.md +81 -0
- package/docs/04-sample-apps/03-dashboard.md +80 -0
- package/docs/04-sample-apps/_category_.json +9 -0
- package/docs/05-tutorials/00-application-developers.md +43 -0
- package/docs/05-tutorials/01-integration-architecture.md +60 -0
- package/docs/05-tutorials/02-build-your-own-zeyos-frontend.md +517 -0
- package/docs/05-tutorials/03-server-side-integrations.md +185 -0
- package/docs/05-tutorials/_category_.json +9 -0
- package/docs/intro.md +197 -0
- package/openapi/api.json +24308 -0
- package/openapi/auth.json +415 -0
- package/openapi/dbref.json +56223 -0
- package/openapi/oauth2.json +781 -0
- package/openapi/sdk.json +949 -0
- package/openapi/views.txt +642 -0
- package/package.json +49 -0
- package/samples/crm/README.md +28 -0
- package/samples/crm/index.html +327 -0
- package/samples/crm/js/api.js +208 -0
- package/samples/crm/js/auth.js +61 -0
- package/samples/crm/js/main.js +545 -0
- package/samples/crm/js/state.js +90 -0
- package/samples/crm/js/ui.js +51 -0
- package/samples/dashboard/README.md +28 -0
- package/samples/dashboard/index.html +280 -0
- package/samples/dashboard/js/api.js +197 -0
- package/samples/dashboard/js/auth.js +59 -0
- package/samples/dashboard/js/main.js +382 -0
- package/samples/dashboard/js/state.js +81 -0
- package/samples/dashboard/js/ui.js +48 -0
- package/samples/kanban/README.md +28 -0
- package/samples/kanban/index.html +263 -0
- package/samples/kanban/js/api.js +152 -0
- package/samples/kanban/js/auth.js +59 -0
- package/samples/kanban/js/constants.js +40 -0
- package/samples/kanban/js/kanban.js +246 -0
- package/samples/kanban/js/main.js +362 -0
- package/samples/kanban/js/modals.js +474 -0
- package/samples/kanban/js/settings.js +82 -0
- package/samples/kanban/js/state.js +118 -0
- package/samples/kanban/js/ui.js +49 -0
- package/scripts/generate-client.mjs +344 -0
- package/src/generated/operations.js +9772 -0
- package/src/generated/schema.js +8982 -0
- package/src/index.js +85 -0
- package/src/runtime/client.js +1208 -0
- package/src/runtime/error.js +29 -0
- package/src/runtime/http.js +174 -0
- package/src/runtime/request-shape.js +35 -0
- package/src/runtime/schema.js +206 -0
- package/src/runtime/suggest.js +74 -0
- package/src/runtime/token-store.js +105 -0
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_label: Commands Reference
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Commands Reference
|
|
6
|
+
|
|
7
|
+
Complete reference for every CLI command, with options and examples.
|
|
8
|
+
|
|
9
|
+
## Global Options
|
|
10
|
+
|
|
11
|
+
These options work with any command:
|
|
12
|
+
|
|
13
|
+
| Option | Description |
|
|
14
|
+
|--------|-------------|
|
|
15
|
+
| `--json` | Output as formatted JSON |
|
|
16
|
+
| `--yaml` | Output as YAML |
|
|
17
|
+
| `--no-color` | Disable ANSI color output |
|
|
18
|
+
| `-h`, `--help` | Show help for a command |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## login
|
|
23
|
+
|
|
24
|
+
Authenticate with a ZeyOS instance via OAuth 2.0 authorization code flow.
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
zeyos login [options]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
| Option | Description |
|
|
31
|
+
|--------|-------------|
|
|
32
|
+
| `--base-url <url>` | ZeyOS platform URL |
|
|
33
|
+
| `--client-id <id>` | OAuth application ID |
|
|
34
|
+
| `--secret <secret>` | OAuth application secret |
|
|
35
|
+
| `--scope <scope>` | OAuth scope |
|
|
36
|
+
| `--port <port>` | Local callback port (default: `9005`) |
|
|
37
|
+
| `--global` | Save credentials to global config |
|
|
38
|
+
| `--force` | Overwrite existing credentials |
|
|
39
|
+
| `--clean` | Discard saved config and re-prompt for everything |
|
|
40
|
+
| `--manual` | Don't open browser; paste code manually |
|
|
41
|
+
|
|
42
|
+
**Examples:**
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Interactive login (prompts for missing values)
|
|
46
|
+
zeyos login
|
|
47
|
+
|
|
48
|
+
# Pre-fill connection values; the OAuth browser/code step still runs
|
|
49
|
+
zeyos login --base-url https://cloud.zeyos.com/demo \
|
|
50
|
+
--client-id myapp --secret "$ZEYOS_CLIENT_SECRET"
|
|
51
|
+
|
|
52
|
+
# Start fresh, ignore any saved credentials
|
|
53
|
+
zeyos login --clean
|
|
54
|
+
|
|
55
|
+
# Manual mode (useful in SSH / headless environments)
|
|
56
|
+
zeyos login --manual
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
:::info
|
|
60
|
+
When values are not provided as flags, the CLI prompts interactively for the ZeyOS URL, application ID, and application secret. The secret prompt does not echo input. For CI or fully unattended agents, provide `ZEYOS_BASE_URL`, `ZEYOS_TOKEN`, and optionally `ZEYOS_REFRESH_TOKEN`, `ZEYOS_CLIENT_ID`, and `ZEYOS_CLIENT_SECRET` through the environment instead of running `zeyos login`.
|
|
61
|
+
:::
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## logout
|
|
66
|
+
|
|
67
|
+
Revoke the stored token and clear saved credentials.
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
zeyos logout [--global]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
| Option | Description |
|
|
74
|
+
|--------|-------------|
|
|
75
|
+
| `--global` | Clear global credentials instead of local |
|
|
76
|
+
|
|
77
|
+
**Examples:**
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
zeyos logout # Clear local .zeyos/auth.json tokens
|
|
81
|
+
zeyos logout --global # Clear ~/.config/zeyos/credentials.json tokens
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## whoami
|
|
87
|
+
|
|
88
|
+
Show information about the currently authenticated user.
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
zeyos whoami [--json|--yaml]
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Examples:**
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
zeyos whoami # Table output
|
|
98
|
+
zeyos whoami --json
|
|
99
|
+
zeyos whoami --show-token --json # explicitly include the current access token
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## list
|
|
105
|
+
|
|
106
|
+
Query and list records for a resource with filtering, sorting, and pagination.
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
zeyos list <resource> [options]
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
| Option | Description |
|
|
113
|
+
|--------|-------------|
|
|
114
|
+
| `--fields <fields>` | Field selection — comma-separated, JSON object, or JSON array (see below) |
|
|
115
|
+
| `--filter <json>` | Filter criteria — JSON object |
|
|
116
|
+
| `--sort <fields>` | Sort fields, comma-separated (prefix `+` asc, `-` desc) |
|
|
117
|
+
| `--limit <n>` | Maximum records to return (default: `50`) |
|
|
118
|
+
| `--offset <n>` | Skip the first n records |
|
|
119
|
+
| `--expand <fields>` | Expand JSON/binary columns (e.g. binfile, items) |
|
|
120
|
+
| `--extdata` | Include extended data fields |
|
|
121
|
+
| `--json` | JSON output |
|
|
122
|
+
| `--yaml` | YAML output |
|
|
123
|
+
|
|
124
|
+
**Fields format:**
|
|
125
|
+
|
|
126
|
+
The `--fields` option supports three formats:
|
|
127
|
+
|
|
128
|
+
| Format | Example |
|
|
129
|
+
|--------|---------|
|
|
130
|
+
| Comma-separated | `--fields ID,name,status` |
|
|
131
|
+
| JSON object (with aliases) | `--fields '{"Name":"lastname","City":"contact.city"}'` |
|
|
132
|
+
| JSON array | `--fields '["ID","name","status"]'` |
|
|
133
|
+
|
|
134
|
+
**Examples:**
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
# List tickets with default configured fields
|
|
138
|
+
zeyos list tickets
|
|
139
|
+
|
|
140
|
+
# Custom filters
|
|
141
|
+
zeyos list tickets --filter '{"status":1,"priority":3}'
|
|
142
|
+
|
|
143
|
+
# Specify fields with aliases
|
|
144
|
+
zeyos list accounts --fields '{"Name":"lastname","City":"contact.city"}'
|
|
145
|
+
|
|
146
|
+
# Comma-separated fields
|
|
147
|
+
zeyos list tickets --fields ID,name,status,priority
|
|
148
|
+
|
|
149
|
+
# Sort by multiple columns
|
|
150
|
+
zeyos list tickets --sort "+name,-lastmodified"
|
|
151
|
+
|
|
152
|
+
# Pagination
|
|
153
|
+
zeyos list tickets --limit 10 --offset 20
|
|
154
|
+
|
|
155
|
+
# Include extended data
|
|
156
|
+
zeyos list tickets --extdata
|
|
157
|
+
|
|
158
|
+
# JSON output for scripting
|
|
159
|
+
zeyos list tickets --json | jq length
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
:::tip Pagination Info
|
|
163
|
+
When results fill the page limit, the CLI makes a second API call to get the total count and displays:
|
|
164
|
+
```
|
|
165
|
+
Showing 1–10 of 47 (--offset 10 for next page)
|
|
166
|
+
```
|
|
167
|
+
:::
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## count
|
|
172
|
+
|
|
173
|
+
Count records for a resource, with optional filtering. Returns a plain number by default.
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
zeyos count <resource> [options]
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
| Option | Description |
|
|
180
|
+
|--------|-------------|
|
|
181
|
+
| `--filter <json>` | Filter criteria — JSON object |
|
|
182
|
+
| `--json` | Output as `{"count": N}` |
|
|
183
|
+
| `--yaml` | YAML output |
|
|
184
|
+
|
|
185
|
+
**Examples:**
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Total tickets
|
|
189
|
+
zeyos count tickets
|
|
190
|
+
# → 47
|
|
191
|
+
|
|
192
|
+
# Filtered count
|
|
193
|
+
zeyos count tickets --filter '{"status":1}'
|
|
194
|
+
# → 12
|
|
195
|
+
|
|
196
|
+
# JSON output for scripting
|
|
197
|
+
zeyos count accounts --json
|
|
198
|
+
# → {"count": 156}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## get
|
|
204
|
+
|
|
205
|
+
Fetch a single record by ID.
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
zeyos get <resource> <id> [options]
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
| Option | Description |
|
|
212
|
+
|--------|-------------|
|
|
213
|
+
| `--fields <fields>` | Field selection — comma-separated, JSON object, or JSON array |
|
|
214
|
+
| `--extdata` | Include extended data fields |
|
|
215
|
+
| `--tags` | Include tags |
|
|
216
|
+
| `--all` | Fetch all data (extdata + tags + all fields) |
|
|
217
|
+
| `--json` | JSON output |
|
|
218
|
+
| `--yaml` | YAML output |
|
|
219
|
+
|
|
220
|
+
**Aliases:** `show`
|
|
221
|
+
|
|
222
|
+
**Examples:**
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Get a ticket with configured fields
|
|
226
|
+
zeyos get ticket 42
|
|
227
|
+
|
|
228
|
+
# Include extended data
|
|
229
|
+
zeyos get ticket 42 --extdata
|
|
230
|
+
|
|
231
|
+
# Include tags
|
|
232
|
+
zeyos get ticket 42 --tags
|
|
233
|
+
|
|
234
|
+
# Include both extdata and tags
|
|
235
|
+
zeyos get ticket 42 --extdata --tags
|
|
236
|
+
|
|
237
|
+
# Get everything — all fields, extdata, and tags
|
|
238
|
+
zeyos get ticket 42 --all
|
|
239
|
+
|
|
240
|
+
# JSON output
|
|
241
|
+
zeyos get account 15 --json
|
|
242
|
+
|
|
243
|
+
# Using the alias
|
|
244
|
+
zeyos show ticket 42
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
:::info Date Formatting
|
|
248
|
+
Date fields like `duedate`, `lastmodified`, and `creationdate` are automatically formatted as `YYYY-MM-DD` in table/record output. Raw Unix timestamps are preserved in JSON and YAML output. The format is configurable via `dateFormat` in your auth config file.
|
|
249
|
+
:::
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## create
|
|
254
|
+
|
|
255
|
+
Create a new record. Fields can be provided as a JSON blob or as individual flags.
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
zeyos create <resource> [--data <json>] [--field value ...]
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
| Option | Description |
|
|
262
|
+
|--------|-------------|
|
|
263
|
+
| `--data <json>` | Complete record as a JSON string |
|
|
264
|
+
| `--<field> <value>` | Set individual field (any unknown flag becomes a field) |
|
|
265
|
+
|
|
266
|
+
**Examples:**
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
# Using --data JSON
|
|
270
|
+
zeyos create ticket --data '{"name":"Fix login bug","status":0,"priority":3}'
|
|
271
|
+
|
|
272
|
+
# Using individual field flags
|
|
273
|
+
zeyos create ticket --name "Fix login bug" --status 0 --priority 3
|
|
274
|
+
|
|
275
|
+
# Create an account (accounts use --lastname, not --name)
|
|
276
|
+
zeyos create account --lastname "ACME Corp" --currency EUR --visibility 0
|
|
277
|
+
|
|
278
|
+
# JSON output (returns the created record)
|
|
279
|
+
zeyos create ticket --name "New feature" --json
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
:::info Type Coercion
|
|
283
|
+
Field values are automatically coerced: `"true"` → `true`, `"false"` → `false`, `"null"` → `null`, and numeric strings become numbers. This means `--status 0` sends the integer `0`, not the string `"0"`.
|
|
284
|
+
:::
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## update
|
|
289
|
+
|
|
290
|
+
Update an existing record by ID. Same input modes as `create`.
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
zeyos update <resource> <id> [--data <json>] [--field value ...]
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**Aliases:** `edit`
|
|
297
|
+
|
|
298
|
+
**Examples:**
|
|
299
|
+
|
|
300
|
+
```bash
|
|
301
|
+
# Using --data JSON
|
|
302
|
+
zeyos update ticket 42 --data '{"status":4}'
|
|
303
|
+
|
|
304
|
+
# Using field flags
|
|
305
|
+
zeyos update ticket 42 --status 4 --priority 2
|
|
306
|
+
|
|
307
|
+
# Update account name (accounts use --lastname, not --name)
|
|
308
|
+
zeyos update account 15 --lastname "ACME Corporation"
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## delete
|
|
314
|
+
|
|
315
|
+
Delete a record by ID. Prompts for confirmation by default.
|
|
316
|
+
|
|
317
|
+
```
|
|
318
|
+
zeyos delete <resource> <id> [--force]
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
| Option | Description |
|
|
322
|
+
|--------|-------------|
|
|
323
|
+
| `--force` | Skip confirmation prompt |
|
|
324
|
+
|
|
325
|
+
**Aliases:** `rm`, `remove`
|
|
326
|
+
|
|
327
|
+
**Examples:**
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
# Interactive confirmation
|
|
331
|
+
zeyos delete ticket 42
|
|
332
|
+
|
|
333
|
+
# Skip confirmation
|
|
334
|
+
zeyos delete ticket 42 --force
|
|
335
|
+
|
|
336
|
+
# Using aliases
|
|
337
|
+
zeyos rm ticket 42
|
|
338
|
+
zeyos remove ticket 42
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## resources
|
|
344
|
+
|
|
345
|
+
List all curated CLI resources and their operations. This is the authoritative boundary for what the CLI supports directly.
|
|
346
|
+
|
|
347
|
+
```
|
|
348
|
+
zeyos resources
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
Shows a table of all CLI-supported resource types and available operations.
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
## describe
|
|
356
|
+
|
|
357
|
+
Show a resource's schema — fields, types, foreign keys and enum values — from the generated schema. Runs **offline** (no login required), so an agent can discover the data model before making any call.
|
|
358
|
+
|
|
359
|
+
```
|
|
360
|
+
# Field/type/enum/foreign-key listing for a resource
|
|
361
|
+
zeyos describe tickets
|
|
362
|
+
|
|
363
|
+
# Machine-readable schema
|
|
364
|
+
zeyos describe accounts --json
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
Foreign keys are shown as `→ <table>`, and enum fields list their valid values (e.g. `status` → `0=NOTSTARTED 1=AWAITINGACCEPTANCE …`). The operations available for the resource are listed at the bottom.
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## skills
|
|
372
|
+
|
|
373
|
+
Discover and install the bundled ZeyOS agent skill packs into the local project, so a coding agent (Claude, Codex, …) operates against ZeyOS with the right conventions out of the box.
|
|
374
|
+
|
|
375
|
+
```
|
|
376
|
+
# List the bundled skills
|
|
377
|
+
zeyos skills list
|
|
378
|
+
|
|
379
|
+
# Print a skill's instructions
|
|
380
|
+
zeyos skills show zeyos-work-management
|
|
381
|
+
|
|
382
|
+
# Install all skills (or named ones) into the project
|
|
383
|
+
zeyos skills install
|
|
384
|
+
zeyos skills install zeyos-billing-insights --target claude
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
Options for `install`:
|
|
388
|
+
|
|
389
|
+
| Option | Description |
|
|
390
|
+
|--------|-------------|
|
|
391
|
+
| `--target claude\|codex` | Where to install (default: auto-detect, fallback `.claude/skills`) |
|
|
392
|
+
| `--force` | Overwrite existing skill folders |
|
|
393
|
+
|
|
394
|
+
Skills are copied into `<target>/skills/<name>/`, with the shared reference files installed alongside (`<target>/skills/shared/`) so the skills' `../shared/…` links resolve.
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## Command Aliases
|
|
399
|
+
|
|
400
|
+
| Alias | Equivalent |
|
|
401
|
+
|-------|-----------|
|
|
402
|
+
| `show` | `get` |
|
|
403
|
+
| `edit` | `update` |
|
|
404
|
+
| `rm` | `delete` |
|
|
405
|
+
| `remove` | `delete` |
|
|
406
|
+
| `resource` | `resources` |
|
|
407
|
+
| `skill` | `skills` |
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_label: Configuration
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Configuration
|
|
6
|
+
|
|
7
|
+
The CLI uses a layered configuration system for credentials, output preferences, and per-resource field display.
|
|
8
|
+
|
|
9
|
+
:::info Coverage Boundary
|
|
10
|
+
These settings apply to the CLI's curated resource registry. If you need a resource or request shape outside that registry, switch to [`@zeyos/client`](../02-javascript-client/01-getting-started.md).
|
|
11
|
+
:::
|
|
12
|
+
|
|
13
|
+
## Credential Cascade
|
|
14
|
+
|
|
15
|
+
Credentials are resolved from three sources in priority order:
|
|
16
|
+
|
|
17
|
+
| Priority | Source | Location |
|
|
18
|
+
|----------|--------|----------|
|
|
19
|
+
| 1 (highest) | Environment variables | `ZEYOS_BASE_URL`, `ZEYOS_TOKEN`, etc. |
|
|
20
|
+
| 2 | Local config file | `.zeyos/auth.json` (walks up from CWD) |
|
|
21
|
+
| 3 (lowest) | Global config file | `~/.config/zeyos/credentials.json` |
|
|
22
|
+
|
|
23
|
+
Configuration is merged from global, then local, then environment variables. Higher-priority sources override individual fields from lower-priority sources. For example, setting `ZEYOS_TOKEN` as an environment variable overrides the stored token while still allowing `baseUrl` and client credentials to come from a config file.
|
|
24
|
+
|
|
25
|
+
## Environment Variables
|
|
26
|
+
|
|
27
|
+
| Variable | Maps to | Description |
|
|
28
|
+
|----------|---------|-------------|
|
|
29
|
+
| `ZEYOS_BASE_URL` | `baseUrl` | ZeyOS platform URL |
|
|
30
|
+
| `ZEYOS_INSTANCE` | `instance` | ZeyOS instance name |
|
|
31
|
+
| `ZEYOS_CLIENT_ID` | `clientId` | OAuth application ID |
|
|
32
|
+
| `ZEYOS_CLIENT_SECRET` | `clientSecret` | OAuth application secret |
|
|
33
|
+
| `ZEYOS_TOKEN` | `accessToken` | Access token |
|
|
34
|
+
| `ZEYOS_REFRESH_TOKEN` | `refreshToken` | Refresh token |
|
|
35
|
+
|
|
36
|
+
**Example:**
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Use environment variables for CI/CD pipelines
|
|
40
|
+
export ZEYOS_BASE_URL="https://cloud.zeyos.com/demo"
|
|
41
|
+
export ZEYOS_TOKEN="your-access-token"
|
|
42
|
+
|
|
43
|
+
zeyos list tickets
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If you want the CLI to auto-refresh expired access tokens, also provide `ZEYOS_CLIENT_ID`, `ZEYOS_CLIENT_SECRET`, and a refresh token via config or environment variables.
|
|
47
|
+
|
|
48
|
+
## Local Config File
|
|
49
|
+
|
|
50
|
+
The CLI stores credentials in `.zeyos/auth.json`, located in your project directory. When resolving config, the CLI walks up from the current working directory (like Git does for `.gitconfig`) until it finds a `.zeyos/auth.json` file.
|
|
51
|
+
|
|
52
|
+
**File format:**
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"baseUrl": "https://cloud.zeyos.com/demo",
|
|
57
|
+
"clientId": "myapp",
|
|
58
|
+
"clientSecret": "...",
|
|
59
|
+
"accessToken": "...",
|
|
60
|
+
"refreshToken": "...",
|
|
61
|
+
"expiresAt": 1735568880,
|
|
62
|
+
"refreshTokenExpiresAt": 1738160880,
|
|
63
|
+
"dateFormat": "YYYY-MM-DD"
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
This file is created automatically when you run `zeyos login`.
|
|
68
|
+
|
|
69
|
+
`expiresAt` and `refreshTokenExpiresAt` are stored as Unix timestamps in **seconds**.
|
|
70
|
+
|
|
71
|
+
:::warning
|
|
72
|
+
Always add `.zeyos/auth.json` to your `.gitignore` — it contains access tokens and secrets:
|
|
73
|
+
```gitignore
|
|
74
|
+
.zeyos/auth.json
|
|
75
|
+
```
|
|
76
|
+
:::
|
|
77
|
+
|
|
78
|
+
## Global Config File
|
|
79
|
+
|
|
80
|
+
For credentials shared across all projects, use the global config:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
zeyos login --global
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
This saves to `~/.config/zeyos/credentials.json` (same format as the local file). Local config values override global values field-by-field, so a project can override only the fields it needs.
|
|
87
|
+
|
|
88
|
+
## Resource Field Configuration
|
|
89
|
+
|
|
90
|
+
Customize which fields are displayed for each resource type. The CLI supports per-resource configs that control the `list` and `get` output.
|
|
91
|
+
|
|
92
|
+
### Config Cascade
|
|
93
|
+
|
|
94
|
+
Resource configs are also resolved in priority order:
|
|
95
|
+
|
|
96
|
+
| Priority | Location | Purpose |
|
|
97
|
+
|----------|----------|---------|
|
|
98
|
+
| 1 (highest) | `.zeyos/api/<resource>.json` | Project-specific overrides |
|
|
99
|
+
| 2 | `~/.zeyos/api/<resource>.json` | User-wide preferences |
|
|
100
|
+
| 3 (lowest) | `cli/config/<resource>.json` | Shipped defaults |
|
|
101
|
+
|
|
102
|
+
### Config Format
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"list": {
|
|
107
|
+
"fields": {
|
|
108
|
+
"ID": "ID",
|
|
109
|
+
"Name": "lastname",
|
|
110
|
+
"City": "contact.city",
|
|
111
|
+
"Country": "contact.country",
|
|
112
|
+
"Agent": "assigneduser.name",
|
|
113
|
+
"Modified": "lastmodified"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"get": {
|
|
117
|
+
"fields": [
|
|
118
|
+
"ID", "name", "status", "priority",
|
|
119
|
+
"description", "duedate", "lastmodified"
|
|
120
|
+
],
|
|
121
|
+
"params": {
|
|
122
|
+
"extdata": 1,
|
|
123
|
+
"tags": 1
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**`list.fields`** — An object mapping display aliases to API field paths. Keys become column headers; values are the actual API fields (supports dot-notation for joins).
|
|
130
|
+
|
|
131
|
+
**`get.fields`** — An array of field names to display in the detail view. Use `--all` to override and show everything.
|
|
132
|
+
|
|
133
|
+
**`get.params`** — An object of query parameters to include by default. These are sent as URL query parameters (e.g. `?extdata=1&tags=1`) and control which additional data sections are returned. Common params: `extdata` (extended data fields), `tags` (record tags).
|
|
134
|
+
|
|
135
|
+
:::note
|
|
136
|
+
The `--extdata` and `--tags` CLI flags override the corresponding values in `get.params`. For example, running `zeyos get ticket 42` with `"params": {"extdata": 1}` in the config is equivalent to running `zeyos get ticket 42 --extdata`.
|
|
137
|
+
:::
|
|
138
|
+
|
|
139
|
+
### Shipped Defaults
|
|
140
|
+
|
|
141
|
+
The CLI ships with configs for commonly used resources:
|
|
142
|
+
|
|
143
|
+
| File | Resource |
|
|
144
|
+
|------|----------|
|
|
145
|
+
| `cli/config/ticket.json` | Tickets |
|
|
146
|
+
| `cli/config/account.json` | Accounts |
|
|
147
|
+
| `cli/config/task.json` | Tasks |
|
|
148
|
+
| `cli/config/project.json` | Projects |
|
|
149
|
+
| `cli/config/item.json` | Items |
|
|
150
|
+
|
|
151
|
+
Resources without a config file return all fields from the API.
|
|
152
|
+
|
|
153
|
+
:::tip Customizing for Your Project
|
|
154
|
+
Create `.zeyos/api/ticket.json` in your project to override the default field display:
|
|
155
|
+
```bash
|
|
156
|
+
mkdir -p .zeyos/api
|
|
157
|
+
```
|
|
158
|
+
```json title=".zeyos/api/ticket.json"
|
|
159
|
+
{
|
|
160
|
+
"list": {
|
|
161
|
+
"fields": {
|
|
162
|
+
"ID": "ID",
|
|
163
|
+
"Title": "name",
|
|
164
|
+
"Client": "account.lastname",
|
|
165
|
+
"Sprint": "extdata.sprint",
|
|
166
|
+
"Due": "duedate"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
:::
|
|
172
|
+
|
|
173
|
+
## Date Formatting
|
|
174
|
+
|
|
175
|
+
Unix timestamps in table and record output are automatically formatted as human-readable dates. Configure the format in your auth config file:
|
|
176
|
+
|
|
177
|
+
```json title=".zeyos/auth.json"
|
|
178
|
+
{
|
|
179
|
+
"baseUrl": "https://cloud.zeyos.com/demo",
|
|
180
|
+
"dateFormat": "YYYY-MM-DD HH:mm"
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Available tokens:**
|
|
185
|
+
|
|
186
|
+
| Token | Output | Example |
|
|
187
|
+
|-------|--------|---------|
|
|
188
|
+
| `YYYY` | 4-digit year | `2026` |
|
|
189
|
+
| `MM` | 2-digit month | `03` |
|
|
190
|
+
| `DD` | 2-digit day | `02` |
|
|
191
|
+
| `HH` | 2-digit hour (24h) | `14` |
|
|
192
|
+
| `mm` | 2-digit minute | `30` |
|
|
193
|
+
| `ss` | 2-digit second | `00` |
|
|
194
|
+
|
|
195
|
+
**Default format:** `YYYY-MM-DD`
|
|
196
|
+
|
|
197
|
+
Date formatting only affects table and record output. JSON and YAML output always preserves raw Unix timestamps for programmatic use.
|
|
198
|
+
|
|
199
|
+
**Auto-detected date fields:** `duedate`, `lastmodified`, `creationdate`, `created`, `date`, `startdate`, `enddate`, and any field name ending in `date` or `modified`.
|
|
200
|
+
|
|
201
|
+
## Output Formats
|
|
202
|
+
|
|
203
|
+
| Flag | Format | Best For |
|
|
204
|
+
|------|--------|----------|
|
|
205
|
+
| *(none)* | Formatted table | Human reading in the terminal |
|
|
206
|
+
| `--json` | Pretty-printed JSON | Scripting, piping to `jq`, APIs |
|
|
207
|
+
| `--yaml` | YAML | Config files, readability |
|
|
208
|
+
|
|
209
|
+
**Table output** is the default — it shows aligned columns with optional date formatting and pagination info.
|
|
210
|
+
|
|
211
|
+
**JSON output** preserves all raw data exactly as returned by the API, including numeric timestamps and null values.
|
|
212
|
+
|
|
213
|
+
**YAML output** is similar to JSON but more readable for nested structures.
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
# Compare the outputs
|
|
217
|
+
zeyos get ticket 42 # Table with formatted dates
|
|
218
|
+
zeyos get ticket 42 --json # Raw JSON with Unix timestamps
|
|
219
|
+
zeyos get ticket 42 --yaml # YAML with readable structure
|
|
220
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 1
|
|
3
|
+
sidebar_label: Coding Agents
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Coding Agents
|
|
7
|
+
|
|
8
|
+
This path is for coding agents, automation scripts, and operational tools that need a deterministic way to read and write business data in ZeyOS.
|
|
9
|
+
|
|
10
|
+
ZeyOS should be treated as the central system for business records and business rules. For v1, these docs stay focused on **external integrations**: the CLI, the JavaScript client, and the REST/OpenAPI surface exposed by a ZeyOS instance.
|
|
11
|
+
|
|
12
|
+
## Start Here
|
|
13
|
+
|
|
14
|
+
For most agent workflows, start with the CLI:
|
|
15
|
+
|
|
16
|
+
| Need | Recommended interface | Why |
|
|
17
|
+
|------|-----------------------|-----|
|
|
18
|
+
| Fast CRUD against common business resources | [`zeyos`](../03-cli/01-getting-started.md) | Human-readable help, JSON output, built-in auth flow, safe delete confirmation |
|
|
19
|
+
| Reliable shell automation and pipelines | [`zeyos --json`](./01-agent-quickstart.md) | Stable machine-readable output, easy to combine with `jq` and scripts |
|
|
20
|
+
| Access beyond the CLI's curated resource registry | [`@zeyos/client`](../02-javascript-client/01-getting-started.md) | Covers the full generated API surface |
|
|
21
|
+
| Non-JavaScript or custom HTTP clients | [REST/OpenAPI](../01-api-reference/03-resources.md) | Raw endpoint and schema reference |
|
|
22
|
+
|
|
23
|
+
## Recommended Route
|
|
24
|
+
|
|
25
|
+
1. Follow the [Agent Quickstart](./01-agent-quickstart.md) to authenticate and make your first read/write calls.
|
|
26
|
+
2. Use [Agent Recipes](./02-agent-recipes.md) for common ticket, account, task, and project workflows.
|
|
27
|
+
3. Check [CLI Coverage and Escalation](./03-cli-coverage-and-escalation.md) whenever you need a resource or request shape the CLI does not expose directly.
|
|
28
|
+
|
|
29
|
+
## Working Rules
|
|
30
|
+
|
|
31
|
+
- Prefer `--json` for agent-driven flows.
|
|
32
|
+
- Prefer `filters`-style JSON payloads in CLI examples so the transition to `@zeyos/client` stays consistent.
|
|
33
|
+
- Include `visibility: 0` unless you intentionally want archived or deleted records.
|
|
34
|
+
- Treat `delete` as destructive. The CLI prompts by default; use `--force` only in deliberate automation.
|
|
35
|
+
- Switch to the JavaScript client when the task needs unsupported resources, browser/session behavior, or low-level request control.
|