@getfrontline/cli 1.0.0 → 1.0.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.
- package/README.md +246 -319
- package/dist/commands/auth/login.d.ts.map +1 -1
- package/dist/commands/auth/login.js +29 -4
- package/dist/commands/auth/login.js.map +1 -1
- package/dist/commands/auth/profiles.d.ts.map +1 -1
- package/dist/commands/auth/profiles.js +7 -11
- package/dist/commands/auth/profiles.js.map +1 -1
- package/dist/commands/object/export.js +3 -3
- package/dist/commands/object/field.js +5 -5
- package/dist/commands/object/index.js +8 -8
- package/dist/commands/object/index.js.map +1 -1
- package/dist/commands/object/option.js +4 -4
- package/dist/commands/object/record-type.js +4 -4
- package/dist/commands/object/record.js +8 -8
- package/dist/commands/object/relation.js +4 -4
- package/dist/commands/object/view.js +9 -9
- package/dist/lib/cliVersion.d.ts +8 -0
- package/dist/lib/cliVersion.d.ts.map +1 -0
- package/dist/lib/cliVersion.js +26 -0
- package/dist/lib/cliVersion.js.map +1 -0
- package/dist/lib/config.js +1 -1
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/errors.d.ts +3 -0
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +10 -1
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/helpEpilog.d.ts.map +1 -1
- package/dist/lib/helpEpilog.js +35 -35
- package/dist/lib/helpEpilog.js.map +1 -1
- package/dist/lib/httpClient.d.ts.map +1 -1
- package/dist/lib/httpClient.js +35 -16
- package/dist/lib/httpClient.js.map +1 -1
- package/dist/lib/output.d.ts +10 -0
- package/dist/lib/output.d.ts.map +1 -1
- package/dist/lib/output.js +28 -12
- package/dist/lib/output.js.map +1 -1
- package/dist/max/commands/auth/login.d.ts.map +1 -1
- package/dist/max/commands/auth/login.js +22 -5
- package/dist/max/commands/auth/login.js.map +1 -1
- package/dist/max/commands/chat/repl.d.ts +9 -0
- package/dist/max/commands/chat/repl.d.ts.map +1 -1
- package/dist/max/commands/chat/repl.js +15 -11
- package/dist/max/commands/chat/repl.js.map +1 -1
- package/dist/max/commands/chat/send.d.ts.map +1 -1
- package/dist/max/commands/chat/send.js +17 -0
- package/dist/max/commands/chat/send.js.map +1 -1
- package/dist/max/lib/httpClient.d.ts.map +1 -1
- package/dist/max/lib/httpClient.js +11 -4
- package/dist/max/lib/httpClient.js.map +1 -1
- package/dist/max/ui/banner.d.ts.map +1 -1
- package/dist/max/ui/banner.js +21 -21
- package/dist/max/ui/banner.js.map +1 -1
- package/dist/max.js +15 -3
- package/dist/max.js.map +1 -1
- package/dist/skills/aggregations/SKILL.md +7 -7
- package/dist/skills/auth-and-profiles/SKILL.md +1 -1
- package/dist/skills/crm-setup/SKILL.md +58 -48
- package/dist/skills/crud-operations/SKILL.md +2 -2
- package/dist/skills/export-and-delete/SKILL.md +5 -5
- package/dist/skills/files/SKILL.md +4 -4
- package/dist/skills/filter-and-query/SKILL.md +7 -7
- package/dist/skills/frontline-internals/SKILL.md +209 -0
- package/dist/skills/max-auth/SKILL.md +76 -76
- package/dist/skills/max-chat/SKILL.md +111 -111
- package/dist/skills/notes-and-tasks/SKILL.md +4 -4
- package/dist/skills/pipeline-setup/SKILL.md +13 -13
- package/dist/skills/relations/SKILL.md +20 -15
- package/dist/skills/schema-design/SKILL.md +13 -13
- package/package.json +51 -47
|
@@ -176,33 +176,33 @@ frontline object record list <object> --query '{
|
|
|
176
176
|
## Complete Example: Support Ticket Pipeline
|
|
177
177
|
|
|
178
178
|
```bash
|
|
179
|
-
# 1. The Status field already exists on
|
|
179
|
+
# 1. The Status field already exists on standard__tickets as a predefined field.
|
|
180
180
|
# Check its field ID and existing options:
|
|
181
|
-
frontline object field list
|
|
181
|
+
frontline object field list standard__tickets
|
|
182
182
|
# → Status field ID = 64, existing options: New, On You, On Customer, On Hold, Closed
|
|
183
183
|
|
|
184
184
|
# 2. Add more stages to the existing Status field (optionsEditable: true)
|
|
185
|
-
frontline object option create
|
|
186
|
-
frontline object option create
|
|
185
|
+
frontline object option create standard__tickets 64 --data '{"name": "Escalated", "color": "Bright Red"}'
|
|
186
|
+
frontline object option create standard__tickets 64 --data '{"name": "Waiting on Vendor", "color": "Amber"}'
|
|
187
187
|
|
|
188
188
|
# 3. Also add a priority field
|
|
189
|
-
frontline object field create
|
|
189
|
+
frontline object field create standard__tickets --data '{
|
|
190
190
|
"name": "Priority",
|
|
191
191
|
"type": "select",
|
|
192
192
|
"metadata": { "mode": "singleSelect" }
|
|
193
193
|
}'
|
|
194
194
|
# → { id: 11, ... }
|
|
195
195
|
|
|
196
|
-
frontline object option create
|
|
197
|
-
frontline object option create
|
|
198
|
-
frontline object option create
|
|
199
|
-
frontline object option create
|
|
196
|
+
frontline object option create standard__tickets 11 --data '{"name": "Critical", "color": "Bright Red"}'
|
|
197
|
+
frontline object option create standard__tickets 11 --data '{"name": "High", "color": "Magenta"}'
|
|
198
|
+
frontline object option create standard__tickets 11 --data '{"name": "Medium", "color": "Amber"}'
|
|
199
|
+
frontline object option create standard__tickets 11 --data '{"name": "Low", "color": "Gray"}'
|
|
200
200
|
|
|
201
201
|
# 4. Create record type with relevant fields
|
|
202
|
-
frontline object field list
|
|
202
|
+
frontline object field list standard__tickets
|
|
203
203
|
# → Suppose: 1=Subject, 10=Status, 11=Priority, 5=Assignee, 3=Description
|
|
204
204
|
|
|
205
|
-
frontline object record-type create
|
|
205
|
+
frontline object record-type create standard__tickets --data '{
|
|
206
206
|
"name": "support_board",
|
|
207
207
|
"displayName": "Support Board",
|
|
208
208
|
"columnIds": [1, 10, 11, 5, 3]
|
|
@@ -210,14 +210,14 @@ frontline object record-type create sor__tickets --data '{
|
|
|
210
210
|
# → { id: 4, ... }
|
|
211
211
|
|
|
212
212
|
# 5. Create kanban view grouped by Status — directly on the object
|
|
213
|
-
frontline object view create
|
|
213
|
+
frontline object view create standard__tickets --data '{
|
|
214
214
|
"name": "Ticket Board",
|
|
215
215
|
"type": "KANBAN",
|
|
216
216
|
"metadata": { "groupingColumnId": 10 }
|
|
217
217
|
}'
|
|
218
218
|
|
|
219
219
|
# 6. Create a table view too (for list browsing)
|
|
220
|
-
frontline object view create
|
|
220
|
+
frontline object view create standard__tickets --data '{
|
|
221
221
|
"name": "All Tickets",
|
|
222
222
|
"type": "TABLE",
|
|
223
223
|
"metadata": {}
|
|
@@ -34,7 +34,7 @@ frontline object field create <source-obj> --data '{
|
|
|
34
34
|
Before working with relations, inspect the object schema to find relation names:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
frontline object schema
|
|
37
|
+
frontline object schema standard__people
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
The output includes a `relations` array:
|
|
@@ -42,8 +42,13 @@ The output includes a `relations` array:
|
|
|
42
42
|
```json
|
|
43
43
|
{
|
|
44
44
|
"relations": [
|
|
45
|
-
{
|
|
46
|
-
|
|
45
|
+
{
|
|
46
|
+
"name": "company",
|
|
47
|
+
"target": "standard__companies",
|
|
48
|
+
"mode": "multi",
|
|
49
|
+
"display_field": "Name"
|
|
50
|
+
},
|
|
51
|
+
{ "name": "deals", "target": "standard__deals", "mode": "multi", "display_field": "Name" }
|
|
47
52
|
]
|
|
48
53
|
}
|
|
49
54
|
```
|
|
@@ -60,7 +65,7 @@ frontline object relation link <object> <source-id> <relation> <target-id>
|
|
|
60
65
|
|
|
61
66
|
```bash
|
|
62
67
|
# Link a person to a company
|
|
63
|
-
frontline object relation link
|
|
68
|
+
frontline object relation link standard__people 6625abc123def456 Companies 6625def789abc012
|
|
64
69
|
```
|
|
65
70
|
|
|
66
71
|
- **Idempotent**: linking the same target twice won't create duplicates.
|
|
@@ -76,7 +81,7 @@ frontline object relation unlink <object> <source-id> <relation> <target-id>
|
|
|
76
81
|
|
|
77
82
|
```bash
|
|
78
83
|
# Remove person from company
|
|
79
|
-
frontline object relation unlink
|
|
84
|
+
frontline object relation unlink standard__people 6625abc123def456 Companies 6625def789abc012
|
|
80
85
|
```
|
|
81
86
|
|
|
82
87
|
## Get Related Records (Forward Lookup)
|
|
@@ -89,7 +94,7 @@ frontline object relation get <object> <source-id> <relation>
|
|
|
89
94
|
|
|
90
95
|
```bash
|
|
91
96
|
# Get all companies linked to this person
|
|
92
|
-
frontline object relation get
|
|
97
|
+
frontline object relation get standard__people 6625abc123def456 Companies
|
|
93
98
|
```
|
|
94
99
|
|
|
95
100
|
Returns an array of related records with their full data.
|
|
@@ -104,10 +109,10 @@ frontline object relation find-by <object> <relation> <target-id> [--page N] [--
|
|
|
104
109
|
|
|
105
110
|
```bash
|
|
106
111
|
# Find all people linked to a specific company
|
|
107
|
-
frontline object relation find-by
|
|
112
|
+
frontline object relation find-by standard__people Companies 6625def789abc012
|
|
108
113
|
|
|
109
114
|
# With pagination
|
|
110
|
-
frontline object relation find-by
|
|
115
|
+
frontline object relation find-by standard__people Companies 6625def789abc012 --page 1 --page-size 20
|
|
111
116
|
```
|
|
112
117
|
|
|
113
118
|
Returns a paginated result: `{ rows, total_count, total_pages, current_page }`.
|
|
@@ -116,23 +121,23 @@ Returns a paginated result: `{ rows, total_count, total_pages, current_page }`.
|
|
|
116
121
|
|
|
117
122
|
```bash
|
|
118
123
|
# 1. Show current company links
|
|
119
|
-
frontline object relation get
|
|
124
|
+
frontline object relation get standard__people <person-id> Companies
|
|
120
125
|
|
|
121
126
|
# 2. Unlink from old company
|
|
122
|
-
frontline object relation unlink
|
|
127
|
+
frontline object relation unlink standard__people <person-id> Companies <old-company-id>
|
|
123
128
|
|
|
124
129
|
# 3. Link to new company
|
|
125
|
-
frontline object relation link
|
|
130
|
+
frontline object relation link standard__people <person-id> Companies <new-company-id>
|
|
126
131
|
|
|
127
132
|
# 4. Verify
|
|
128
|
-
frontline object relation get
|
|
133
|
+
frontline object relation get standard__people <person-id> Companies
|
|
129
134
|
```
|
|
130
135
|
|
|
131
136
|
## Workflow: Find All Deals for a Company
|
|
132
137
|
|
|
133
138
|
```bash
|
|
134
139
|
# Find deals linked to a company (reverse: deals that point to this company)
|
|
135
|
-
frontline object relation find-by
|
|
140
|
+
frontline object relation find-by standard__deals Company <company-id>
|
|
136
141
|
```
|
|
137
142
|
|
|
138
143
|
## Filtering by Relation
|
|
@@ -142,10 +147,10 @@ You can also filter records by relations using the query system
|
|
|
142
147
|
|
|
143
148
|
```bash
|
|
144
149
|
# Find people with no company
|
|
145
|
-
frontline object record list
|
|
150
|
+
frontline object record list standard__people --query '{"path": "[Company]", "operator": "isNull"}'
|
|
146
151
|
|
|
147
152
|
# Find people linked to specific companies
|
|
148
|
-
frontline object record list
|
|
153
|
+
frontline object record list standard__people --query '{
|
|
149
154
|
"path": "[Company]",
|
|
150
155
|
"operator": "containsAny",
|
|
151
156
|
"value": ["6625def789abc012", "6625def789abc999"]
|
|
@@ -174,17 +174,17 @@ frontline object option create <obj> <field-id> --data '{ "name": "Low", "color"
|
|
|
174
174
|
A single-select field with ordered stages:
|
|
175
175
|
|
|
176
176
|
```bash
|
|
177
|
-
frontline object field create
|
|
177
|
+
frontline object field create standard__deals --data '{
|
|
178
178
|
"name": "Stage",
|
|
179
179
|
"type": "select",
|
|
180
180
|
"metadata": { "mode": "singleSelect" }
|
|
181
181
|
}'
|
|
182
182
|
# Then add stages in order:
|
|
183
|
-
frontline object option create
|
|
184
|
-
frontline object option create
|
|
185
|
-
frontline object option create
|
|
186
|
-
frontline object option create
|
|
187
|
-
frontline object option create
|
|
183
|
+
frontline object option create standard__deals <field-id> --data '{"name": "Lead", "color": "Gray"}'
|
|
184
|
+
frontline object option create standard__deals <field-id> --data '{"name": "Qualified", "color": "Sky"}'
|
|
185
|
+
frontline object option create standard__deals <field-id> --data '{"name": "Proposal", "color": "Amber"}'
|
|
186
|
+
frontline object option create standard__deals <field-id> --data '{"name": "Won", "color": "Emerald"}'
|
|
187
|
+
frontline object option create standard__deals <field-id> --data '{"name": "Lost", "color": "Red"}'
|
|
188
188
|
```
|
|
189
189
|
|
|
190
190
|
### 2. Contact Info Set
|
|
@@ -236,28 +236,28 @@ Field names are **display names** shown in the UI. Use natural, readable names.
|
|
|
236
236
|
|
|
237
237
|
```bash
|
|
238
238
|
# 1. Check what fields already exist
|
|
239
|
-
frontline object field list
|
|
239
|
+
frontline object field list standard__companies
|
|
240
240
|
|
|
241
241
|
# 2. Check schema for relations
|
|
242
|
-
frontline object schema
|
|
242
|
+
frontline object schema standard__companies
|
|
243
243
|
|
|
244
244
|
# 3. Add new fields — only add what's missing
|
|
245
|
-
frontline object field create
|
|
245
|
+
frontline object field create standard__companies --data '{
|
|
246
246
|
"name": "Annual Revenue",
|
|
247
247
|
"type": "number",
|
|
248
248
|
"metadata": { "format": "currency", "currency": "USD", "decimals": 0 }
|
|
249
249
|
}'
|
|
250
250
|
|
|
251
251
|
# 4. Add a categorization field
|
|
252
|
-
frontline object field create
|
|
252
|
+
frontline object field create standard__companies --data '{
|
|
253
253
|
"name": "Industry",
|
|
254
254
|
"type": "select",
|
|
255
255
|
"metadata": { "mode": "singleSelect" }
|
|
256
256
|
}'
|
|
257
257
|
# Add options
|
|
258
|
-
frontline object option create
|
|
259
|
-
frontline object option create
|
|
258
|
+
frontline object option create standard__companies <field-id> --data '{"name":"Technology","color":"Sky"}'
|
|
259
|
+
frontline object option create standard__companies <field-id> --data '{"name":"Finance","color":"Amber"}'
|
|
260
260
|
|
|
261
261
|
# 5. Verify the final schema
|
|
262
|
-
frontline object field list
|
|
262
|
+
frontline object field list standard__companies
|
|
263
263
|
```
|
package/package.json
CHANGED
|
@@ -1,47 +1,51 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@getfrontline/cli",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Frontline CLI — Public API (agents, workflows, billing, tables, objects) + Max chat/admin REST from your terminal",
|
|
5
|
-
"private": false,
|
|
6
|
-
"type": "commonjs",
|
|
7
|
-
"main": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"bin": {
|
|
10
|
-
"frontline": "
|
|
11
|
-
"max": "
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"dist"
|
|
15
|
-
],
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "node ./scripts/clean.mjs && tsc -p tsconfig.json && node ./scripts/addShebang.mjs && node ./scripts/copyStatic.mjs",
|
|
18
|
-
"dev:frontline": "ts-node src/index.ts",
|
|
19
|
-
"dev:max": "ts-node src/max.ts",
|
|
20
|
-
"postinstall": "node dist/scripts/postinstall.js || true",
|
|
21
|
-
"pack": "npm pack --dry-run",
|
|
22
|
-
"prepublishOnly": "npm run build"
|
|
23
|
-
},
|
|
24
|
-
"keywords": [
|
|
25
|
-
"frontline",
|
|
26
|
-
"cli",
|
|
27
|
-
"api",
|
|
28
|
-
"max"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"node": "
|
|
46
|
-
|
|
47
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@getfrontline/cli",
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "Frontline CLI — Public API (agents, workflows, billing, tables, objects) + Max chat/admin REST from your terminal",
|
|
5
|
+
"private": false,
|
|
6
|
+
"type": "commonjs",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"bin": {
|
|
10
|
+
"frontline": "dist/index.js",
|
|
11
|
+
"max": "dist/max.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "node ./scripts/clean.mjs && tsc -p tsconfig.json && node ./scripts/addShebang.mjs && node ./scripts/copyStatic.mjs",
|
|
18
|
+
"dev:frontline": "ts-node src/index.ts",
|
|
19
|
+
"dev:max": "ts-node src/max.ts",
|
|
20
|
+
"postinstall": "node dist/scripts/postinstall.js || true",
|
|
21
|
+
"pack": "npm pack --dry-run",
|
|
22
|
+
"prepublishOnly": "npm run build"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"frontline",
|
|
26
|
+
"cli",
|
|
27
|
+
"api",
|
|
28
|
+
"max",
|
|
29
|
+
"agents",
|
|
30
|
+
"getfrontline",
|
|
31
|
+
"workflows",
|
|
32
|
+
"crm"
|
|
33
|
+
],
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"chalk": "^4.1.2",
|
|
37
|
+
"commander": "^13.1.0",
|
|
38
|
+
"conf": "^10.2.0",
|
|
39
|
+
"ora": "^5.4.1",
|
|
40
|
+
"terminal-image": "^3.1.1"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/js-yaml": "^4.0.9",
|
|
44
|
+
"@types/node": "^22.0.0",
|
|
45
|
+
"ts-node": "^10.9.2",
|
|
46
|
+
"typescript": "^5.7.0"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=18.0.0"
|
|
50
|
+
}
|
|
51
|
+
}
|