@getfrontline/cli 1.0.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.
Files changed (270) hide show
  1. package/README.md +319 -0
  2. package/dist/assets/logo3.png +0 -0
  3. package/dist/commands/agents/analytics.d.ts +3 -0
  4. package/dist/commands/agents/analytics.d.ts.map +1 -0
  5. package/dist/commands/agents/analytics.js +67 -0
  6. package/dist/commands/agents/analytics.js.map +1 -0
  7. package/dist/commands/agents/flows.d.ts +3 -0
  8. package/dist/commands/agents/flows.d.ts.map +1 -0
  9. package/dist/commands/agents/flows.js +47 -0
  10. package/dist/commands/agents/flows.js.map +1 -0
  11. package/dist/commands/agents/list.d.ts +3 -0
  12. package/dist/commands/agents/list.d.ts.map +1 -0
  13. package/dist/commands/agents/list.js +46 -0
  14. package/dist/commands/agents/list.js.map +1 -0
  15. package/dist/commands/api/raw.d.ts +3 -0
  16. package/dist/commands/api/raw.d.ts.map +1 -0
  17. package/dist/commands/api/raw.js +54 -0
  18. package/dist/commands/api/raw.js.map +1 -0
  19. package/dist/commands/auth/login.d.ts +3 -0
  20. package/dist/commands/auth/login.d.ts.map +1 -0
  21. package/dist/commands/auth/login.js +39 -0
  22. package/dist/commands/auth/login.js.map +1 -0
  23. package/dist/commands/auth/logout.d.ts +3 -0
  24. package/dist/commands/auth/logout.d.ts.map +1 -0
  25. package/dist/commands/auth/logout.js +16 -0
  26. package/dist/commands/auth/logout.js.map +1 -0
  27. package/dist/commands/auth/profiles.d.ts +3 -0
  28. package/dist/commands/auth/profiles.d.ts.map +1 -0
  29. package/dist/commands/auth/profiles.js +72 -0
  30. package/dist/commands/auth/profiles.js.map +1 -0
  31. package/dist/commands/auth/whoami.d.ts +3 -0
  32. package/dist/commands/auth/whoami.d.ts.map +1 -0
  33. package/dist/commands/auth/whoami.js +46 -0
  34. package/dist/commands/auth/whoami.js.map +1 -0
  35. package/dist/commands/billing/get.d.ts +3 -0
  36. package/dist/commands/billing/get.d.ts.map +1 -0
  37. package/dist/commands/billing/get.js +42 -0
  38. package/dist/commands/billing/get.js.map +1 -0
  39. package/dist/commands/object/aggregation.d.ts +3 -0
  40. package/dist/commands/object/aggregation.d.ts.map +1 -0
  41. package/dist/commands/object/aggregation.js +78 -0
  42. package/dist/commands/object/aggregation.js.map +1 -0
  43. package/dist/commands/object/export.d.ts +3 -0
  44. package/dist/commands/object/export.d.ts.map +1 -0
  45. package/dist/commands/object/export.js +98 -0
  46. package/dist/commands/object/export.js.map +1 -0
  47. package/dist/commands/object/field.d.ts +3 -0
  48. package/dist/commands/object/field.d.ts.map +1 -0
  49. package/dist/commands/object/field.js +76 -0
  50. package/dist/commands/object/field.js.map +1 -0
  51. package/dist/commands/object/file.d.ts +3 -0
  52. package/dist/commands/object/file.d.ts.map +1 -0
  53. package/dist/commands/object/file.js +105 -0
  54. package/dist/commands/object/file.js.map +1 -0
  55. package/dist/commands/object/index.d.ts +3 -0
  56. package/dist/commands/object/index.d.ts.map +1 -0
  57. package/dist/commands/object/index.js +136 -0
  58. package/dist/commands/object/index.js.map +1 -0
  59. package/dist/commands/object/note.d.ts +3 -0
  60. package/dist/commands/object/note.d.ts.map +1 -0
  61. package/dist/commands/object/note.js +62 -0
  62. package/dist/commands/object/note.js.map +1 -0
  63. package/dist/commands/object/option.d.ts +3 -0
  64. package/dist/commands/object/option.d.ts.map +1 -0
  65. package/dist/commands/object/option.js +78 -0
  66. package/dist/commands/object/option.js.map +1 -0
  67. package/dist/commands/object/record-type.d.ts +3 -0
  68. package/dist/commands/object/record-type.d.ts.map +1 -0
  69. package/dist/commands/object/record-type.js +73 -0
  70. package/dist/commands/object/record-type.js.map +1 -0
  71. package/dist/commands/object/record.d.ts +3 -0
  72. package/dist/commands/object/record.d.ts.map +1 -0
  73. package/dist/commands/object/record.js +128 -0
  74. package/dist/commands/object/record.js.map +1 -0
  75. package/dist/commands/object/relation.d.ts +3 -0
  76. package/dist/commands/object/relation.d.ts.map +1 -0
  77. package/dist/commands/object/relation.js +73 -0
  78. package/dist/commands/object/relation.js.map +1 -0
  79. package/dist/commands/object/task.d.ts +3 -0
  80. package/dist/commands/object/task.d.ts.map +1 -0
  81. package/dist/commands/object/task.js +88 -0
  82. package/dist/commands/object/task.js.map +1 -0
  83. package/dist/commands/object/view.d.ts +3 -0
  84. package/dist/commands/object/view.d.ts.map +1 -0
  85. package/dist/commands/object/view.js +118 -0
  86. package/dist/commands/object/view.js.map +1 -0
  87. package/dist/commands/setup/claudeSkills.d.ts +3 -0
  88. package/dist/commands/setup/claudeSkills.d.ts.map +1 -0
  89. package/dist/commands/setup/claudeSkills.js +84 -0
  90. package/dist/commands/setup/claudeSkills.js.map +1 -0
  91. package/dist/commands/table/aggregation.d.ts +3 -0
  92. package/dist/commands/table/aggregation.d.ts.map +1 -0
  93. package/dist/commands/table/aggregation.js +78 -0
  94. package/dist/commands/table/aggregation.js.map +1 -0
  95. package/dist/commands/table/export.d.ts +3 -0
  96. package/dist/commands/table/export.d.ts.map +1 -0
  97. package/dist/commands/table/export.js +97 -0
  98. package/dist/commands/table/export.js.map +1 -0
  99. package/dist/commands/table/field.d.ts +3 -0
  100. package/dist/commands/table/field.d.ts.map +1 -0
  101. package/dist/commands/table/field.js +76 -0
  102. package/dist/commands/table/field.js.map +1 -0
  103. package/dist/commands/table/file.d.ts +3 -0
  104. package/dist/commands/table/file.d.ts.map +1 -0
  105. package/dist/commands/table/file.js +106 -0
  106. package/dist/commands/table/file.js.map +1 -0
  107. package/dist/commands/table/index.d.ts +3 -0
  108. package/dist/commands/table/index.d.ts.map +1 -0
  109. package/dist/commands/table/index.js +142 -0
  110. package/dist/commands/table/index.js.map +1 -0
  111. package/dist/commands/table/note.d.ts +3 -0
  112. package/dist/commands/table/note.d.ts.map +1 -0
  113. package/dist/commands/table/note.js +62 -0
  114. package/dist/commands/table/note.js.map +1 -0
  115. package/dist/commands/table/option.d.ts +3 -0
  116. package/dist/commands/table/option.d.ts.map +1 -0
  117. package/dist/commands/table/option.js +78 -0
  118. package/dist/commands/table/option.js.map +1 -0
  119. package/dist/commands/table/relation.d.ts +3 -0
  120. package/dist/commands/table/relation.d.ts.map +1 -0
  121. package/dist/commands/table/relation.js +74 -0
  122. package/dist/commands/table/relation.js.map +1 -0
  123. package/dist/commands/table/row.d.ts +3 -0
  124. package/dist/commands/table/row.d.ts.map +1 -0
  125. package/dist/commands/table/row.js +124 -0
  126. package/dist/commands/table/row.js.map +1 -0
  127. package/dist/commands/table/task.d.ts +3 -0
  128. package/dist/commands/table/task.d.ts.map +1 -0
  129. package/dist/commands/table/task.js +88 -0
  130. package/dist/commands/table/task.js.map +1 -0
  131. package/dist/commands/workflows/analytics.d.ts +3 -0
  132. package/dist/commands/workflows/analytics.d.ts.map +1 -0
  133. package/dist/commands/workflows/analytics.js +60 -0
  134. package/dist/commands/workflows/analytics.js.map +1 -0
  135. package/dist/commands/workflows/list.d.ts +3 -0
  136. package/dist/commands/workflows/list.d.ts.map +1 -0
  137. package/dist/commands/workflows/list.js +47 -0
  138. package/dist/commands/workflows/list.js.map +1 -0
  139. package/dist/index.d.ts +3 -0
  140. package/dist/index.d.ts.map +1 -0
  141. package/dist/index.js +73 -0
  142. package/dist/index.js.map +1 -0
  143. package/dist/lib/auth.d.ts +13 -0
  144. package/dist/lib/auth.d.ts.map +1 -0
  145. package/dist/lib/auth.js +40 -0
  146. package/dist/lib/auth.js.map +1 -0
  147. package/dist/lib/config.d.ts +28 -0
  148. package/dist/lib/config.d.ts.map +1 -0
  149. package/dist/lib/config.js +77 -0
  150. package/dist/lib/config.js.map +1 -0
  151. package/dist/lib/errors.d.ts +13 -0
  152. package/dist/lib/errors.d.ts.map +1 -0
  153. package/dist/lib/errors.js +31 -0
  154. package/dist/lib/errors.js.map +1 -0
  155. package/dist/lib/globalOpts.d.ts +23 -0
  156. package/dist/lib/globalOpts.d.ts.map +1 -0
  157. package/dist/lib/globalOpts.js +40 -0
  158. package/dist/lib/globalOpts.js.map +1 -0
  159. package/dist/lib/helpEpilog.d.ts +18 -0
  160. package/dist/lib/helpEpilog.d.ts.map +1 -0
  161. package/dist/lib/helpEpilog.js +56 -0
  162. package/dist/lib/helpEpilog.js.map +1 -0
  163. package/dist/lib/httpClient.d.ts +50 -0
  164. package/dist/lib/httpClient.d.ts.map +1 -0
  165. package/dist/lib/httpClient.js +196 -0
  166. package/dist/lib/httpClient.js.map +1 -0
  167. package/dist/lib/output.d.ts +38 -0
  168. package/dist/lib/output.d.ts.map +1 -0
  169. package/dist/lib/output.js +131 -0
  170. package/dist/lib/output.js.map +1 -0
  171. package/dist/max/browserLogin.d.ts +15 -0
  172. package/dist/max/browserLogin.d.ts.map +1 -0
  173. package/dist/max/browserLogin.js +164 -0
  174. package/dist/max/browserLogin.js.map +1 -0
  175. package/dist/max/commands/auth/login.d.ts +3 -0
  176. package/dist/max/commands/auth/login.d.ts.map +1 -0
  177. package/dist/max/commands/auth/login.js +58 -0
  178. package/dist/max/commands/auth/login.js.map +1 -0
  179. package/dist/max/commands/auth/logout.d.ts +3 -0
  180. package/dist/max/commands/auth/logout.d.ts.map +1 -0
  181. package/dist/max/commands/auth/logout.js +23 -0
  182. package/dist/max/commands/auth/logout.js.map +1 -0
  183. package/dist/max/commands/auth/whoami.d.ts +3 -0
  184. package/dist/max/commands/auth/whoami.d.ts.map +1 -0
  185. package/dist/max/commands/auth/whoami.js +46 -0
  186. package/dist/max/commands/auth/whoami.js.map +1 -0
  187. package/dist/max/commands/chat/repl.d.ts +3 -0
  188. package/dist/max/commands/chat/repl.d.ts.map +1 -0
  189. package/dist/max/commands/chat/repl.js +104 -0
  190. package/dist/max/commands/chat/repl.js.map +1 -0
  191. package/dist/max/commands/chat/send.d.ts +25 -0
  192. package/dist/max/commands/chat/send.d.ts.map +1 -0
  193. package/dist/max/commands/chat/send.js +163 -0
  194. package/dist/max/commands/chat/send.js.map +1 -0
  195. package/dist/max/commands/conversations/abort.d.ts +3 -0
  196. package/dist/max/commands/conversations/abort.d.ts.map +1 -0
  197. package/dist/max/commands/conversations/abort.js +55 -0
  198. package/dist/max/commands/conversations/abort.js.map +1 -0
  199. package/dist/max/commands/conversations/get.d.ts +3 -0
  200. package/dist/max/commands/conversations/get.d.ts.map +1 -0
  201. package/dist/max/commands/conversations/get.js +42 -0
  202. package/dist/max/commands/conversations/get.js.map +1 -0
  203. package/dist/max/commands/conversations/index.d.ts +3 -0
  204. package/dist/max/commands/conversations/index.d.ts.map +1 -0
  205. package/dist/max/commands/conversations/index.js +16 -0
  206. package/dist/max/commands/conversations/index.js.map +1 -0
  207. package/dist/max/commands/conversations/list.d.ts +3 -0
  208. package/dist/max/commands/conversations/list.d.ts.map +1 -0
  209. package/dist/max/commands/conversations/list.js +35 -0
  210. package/dist/max/commands/conversations/list.js.map +1 -0
  211. package/dist/max/commands/conversations/update.d.ts +3 -0
  212. package/dist/max/commands/conversations/update.d.ts.map +1 -0
  213. package/dist/max/commands/conversations/update.js +53 -0
  214. package/dist/max/commands/conversations/update.js.map +1 -0
  215. package/dist/max/jwtDecode.d.ts +5 -0
  216. package/dist/max/jwtDecode.d.ts.map +1 -0
  217. package/dist/max/jwtDecode.js +19 -0
  218. package/dist/max/jwtDecode.js.map +1 -0
  219. package/dist/max/lib/auth.d.ts +20 -0
  220. package/dist/max/lib/auth.d.ts.map +1 -0
  221. package/dist/max/lib/auth.js +53 -0
  222. package/dist/max/lib/auth.js.map +1 -0
  223. package/dist/max/lib/httpClient.d.ts +25 -0
  224. package/dist/max/lib/httpClient.d.ts.map +1 -0
  225. package/dist/max/lib/httpClient.js +138 -0
  226. package/dist/max/lib/httpClient.js.map +1 -0
  227. package/dist/max/lib/maxResponse.d.ts +30 -0
  228. package/dist/max/lib/maxResponse.d.ts.map +1 -0
  229. package/dist/max/lib/maxResponse.js +132 -0
  230. package/dist/max/lib/maxResponse.js.map +1 -0
  231. package/dist/max/lib/publicApiPaths.d.ts +12 -0
  232. package/dist/max/lib/publicApiPaths.d.ts.map +1 -0
  233. package/dist/max/lib/publicApiPaths.js +15 -0
  234. package/dist/max/lib/publicApiPaths.js.map +1 -0
  235. package/dist/max/maxConfig.d.ts +31 -0
  236. package/dist/max/maxConfig.d.ts.map +1 -0
  237. package/dist/max/maxConfig.js +50 -0
  238. package/dist/max/maxConfig.js.map +1 -0
  239. package/dist/max/ui/banner.d.ts +3 -0
  240. package/dist/max/ui/banner.d.ts.map +1 -0
  241. package/dist/max/ui/banner.js +96 -0
  242. package/dist/max/ui/banner.js.map +1 -0
  243. package/dist/max.d.ts +3 -0
  244. package/dist/max.d.ts.map +1 -0
  245. package/dist/max.js +94 -0
  246. package/dist/max.js.map +1 -0
  247. package/dist/scripts/postinstall.d.ts +8 -0
  248. package/dist/scripts/postinstall.d.ts.map +1 -0
  249. package/dist/scripts/postinstall.js +149 -0
  250. package/dist/scripts/postinstall.js.map +1 -0
  251. package/dist/skills/aggregations/SKILL.md +122 -0
  252. package/dist/skills/auth-and-profiles/SKILL.md +102 -0
  253. package/dist/skills/crm-setup/SKILL.md +385 -0
  254. package/dist/skills/crud-operations/SKILL.md +287 -0
  255. package/dist/skills/export-and-delete/SKILL.md +96 -0
  256. package/dist/skills/files/SKILL.md +70 -0
  257. package/dist/skills/filter-and-query/SKILL.md +199 -0
  258. package/dist/skills/frontline-agents/SKILL.md +99 -0
  259. package/dist/skills/frontline-api/SKILL.md +59 -0
  260. package/dist/skills/frontline-billing/SKILL.md +42 -0
  261. package/dist/skills/frontline-workflows/SKILL.md +72 -0
  262. package/dist/skills/max-auth/SKILL.md +76 -0
  263. package/dist/skills/max-chat/SKILL.md +111 -0
  264. package/dist/skills/notes-and-tasks/SKILL.md +128 -0
  265. package/dist/skills/pipeline-setup/SKILL.md +233 -0
  266. package/dist/skills/record-type-management/SKILL.md +104 -0
  267. package/dist/skills/relations/SKILL.md +153 -0
  268. package/dist/skills/resource-creation/SKILL.md +86 -0
  269. package/dist/skills/schema-design/SKILL.md +263 -0
  270. package/package.json +47 -0
@@ -0,0 +1,233 @@
1
+ ---
2
+ name: pipeline-setup
3
+ description: >
4
+ How to set up a pipeline workflow using the Frontline CLI: create stage
5
+ fields, configure options, create record types, and add kanban views.
6
+ Use when building any staged workflow like sales pipelines, support
7
+ ticket flows, or project tracking boards.
8
+ allowed-tools: Bash(frontline:*)
9
+ ---
10
+
11
+ # Pipeline Setup Guide
12
+
13
+ A pipeline is a visual workflow where records move through stages (e.g.,
14
+ Lead → Qualified → Proposal → Won/Lost). This skill walks through building
15
+ one from scratch using the Frontline CLI.
16
+
17
+ ## Anatomy of a Pipeline
18
+
19
+ A pipeline requires three things:
20
+
21
+ 1. **A select field** — holds the current stage of each record
22
+ 2. **A record type** — groups fields relevant to this pipeline
23
+ 3. **A kanban view** — visualizes records as cards grouped by stage
24
+
25
+ ```
26
+ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
27
+ │ Lead │ │ Qualified│ │ Proposal │ │ Won │
28
+ │ │ │ │ │ │ │ │
29
+ │ ┌──────┐ │ │ ┌──────┐ │ │ ┌──────┐ │ │ ┌──────┐ │
30
+ │ │Deal A│ │ │ │Deal C│ │ │ │Deal E│ │ │ │Deal F│ │
31
+ │ └──────┘ │ │ └──────┘ │ │ └──────┘ │ │ └──────┘ │
32
+ │ ┌──────┐ │ │ │ │ │ │ │
33
+ │ │Deal B│ │ │ │ │ │ │ │
34
+ │ └──────┘ │ │ │ │ │ │ │
35
+ └──────────┘ └──────────┘ └──────────┘ └──────────┘
36
+ ← Kanban view grouped by "Stage" field →
37
+ ```
38
+
39
+ ## Step 1 — Create the Stage Field
40
+
41
+ If the object doesn't already have a stage/status field, create one:
42
+
43
+ ```bash
44
+ # Check existing fields first
45
+ frontline object field list <object>
46
+
47
+ # Create a single-select field for stages
48
+ frontline object field create <object> --data '{
49
+ "name": "Stage",
50
+ "type": "select",
51
+ "metadata": { "mode": "singleSelect" }
52
+ }'
53
+ ```
54
+
55
+ Note the **field ID** from the response — you'll need it for the kanban view.
56
+
57
+ ## Step 2 — Add Stage Options
58
+
59
+ Add stages in the order they should appear on the board.
60
+ Use colors to visually distinguish stages:
61
+
62
+ ```bash
63
+ # Sales pipeline example
64
+ frontline object option create <object> <field-id> --data '{"name": "Lead", "color": "Gray"}'
65
+ frontline object option create <object> <field-id> --data '{"name": "Qualified", "color": "Sky"}'
66
+ frontline object option create <object> <field-id> --data '{"name": "Proposal Sent", "color": "Amber"}'
67
+ frontline object option create <object> <field-id> --data '{"name": "Negotiation", "color": "Lavender"}'
68
+ frontline object option create <object> <field-id> --data '{"name": "Won", "color": "Emerald"}'
69
+ frontline object option create <object> <field-id> --data '{"name": "Lost", "color": "Red"}'
70
+ ```
71
+
72
+ ### Color Suggestions by Stage Semantics
73
+
74
+ | Stage type | Suggested color |
75
+ | -------------------- | ---------------- |
76
+ | New / Unqualified | Gray |
77
+ | Active / In Progress | Sky, Blue |
78
+ | Waiting / Pending | Amber, Yellow |
79
+ | Positive outcome | Emerald, Green |
80
+ | Negative outcome | Red, Bright Red |
81
+ | Special / VIP | Lavender, Purple |
82
+
83
+ ## Step 3 — Create a Record Type
84
+
85
+ Record types let you define which fields are visible for this pipeline view.
86
+ Pick only the fields that are relevant to the workflow:
87
+
88
+ ```bash
89
+ # First, find the field IDs you want to include
90
+ frontline object field list <object>
91
+ # Note the IDs for: Name, Stage, Value, Company, Owner, etc.
92
+
93
+ # Create the record type with those field IDs
94
+ frontline object record-type create <object> --data '{
95
+ "name": "sales_pipeline",
96
+ "displayName": "Sales Pipeline",
97
+ "columnIds": [1, 2, 5, 8, 12]
98
+ }'
99
+ ```
100
+
101
+ Note the **record type ID** from the response.
102
+
103
+ ## Step 4 — Create a Kanban View
104
+
105
+ The kanban view groups records by the stage field. You can create it directly on
106
+ the object (uses the default record type) or on a specific record type:
107
+
108
+ ```bash
109
+ # Directly on the object (recommended for simple pipelines)
110
+ frontline object view create <object> --data '{
111
+ "name": "Pipeline Board",
112
+ "type": "KANBAN",
113
+ "metadata": { "groupingColumnId": <stage-field-id> }
114
+ }'
115
+
116
+ # On a specific record type (optional — use when you have multiple subtypes)
117
+ frontline object view create <object> --record-type <record-type-id> --data '{
118
+ "name": "Pipeline Board",
119
+ "type": "KANBAN",
120
+ "metadata": { "groupingColumnId": <stage-field-id> }
121
+ }'
122
+ ```
123
+
124
+ > `groupingColumnId` must be the ID of a single-select field.
125
+ > View type must be uppercase: `KANBAN`, `TABLE`, `RECORD`.
126
+
127
+ ## Step 5 — Polish the View (Ordering and Visibility)
128
+
129
+ After creating a view, you can refine which columns are visible and in what order
130
+ without manually editing JSON. This is useful for keeping boards clean:
131
+
132
+ ```bash
133
+ # Set a specific column order for the cards/table
134
+ frontline object view update <object> <view-id> --column-order "Subject, Priority, Status"
135
+
136
+ # Hide technical or system columns
137
+ frontline object view update <object> <view-id> --hidden-columns "Created At, Updated At"
138
+
139
+ # Freeze columns on the left (e.g., Name) for easier horizontal scrolling (TABLE views only)
140
+ frontline object view update <object> <view-id> --sticky-columns "Name, Stage"
141
+
142
+ # Configure the order of fields in the record creation/edit dialog
143
+ frontline object view update <object> <view-id> --dialog-field-order "Subject, Priority, Description"
144
+
145
+ # Set the order of columns (groups) in a Kanban board
146
+ frontline object view update <object> <view-id> --option-order "New, In Progress, Closed"
147
+ ```
148
+
149
+ > [!TIP]
150
+ > **Prioritize Ergonomics**: Only show fields that help users make decisions at a
151
+ > glance. For a Kanban board, 3-4 fields is usually the sweet spot. For tables,
152
+ > hide system fields (`autoId`, `updatedAt`) unless they are strictly necessary.
153
+
154
+ ## Step 6 — Populate and Verify
155
+
156
+ ```bash
157
+ # Create some records with stages
158
+ frontline object record create <object> --data '{
159
+ "Name": "Acme Enterprise Deal",
160
+ "Stage": [1],
161
+ "Value": 150000
162
+ }'
163
+
164
+ frontline object record create <object> --data '{
165
+ "Name": "TechCorp License",
166
+ "Stage": [2],
167
+ "Value": 75000
168
+ }'
169
+
170
+ # Verify by listing records filtered by stage
171
+ frontline object record list <object> --query '{
172
+ "path": "[Stage]", "operator": "containsAny", "value": [1]
173
+ }'
174
+ ```
175
+
176
+ ## Complete Example: Support Ticket Pipeline
177
+
178
+ ```bash
179
+ # 1. The Status field already exists on sor__tickets as a predefined field.
180
+ # Check its field ID and existing options:
181
+ frontline object field list sor__tickets
182
+ # → Status field ID = 64, existing options: New, On You, On Customer, On Hold, Closed
183
+
184
+ # 2. Add more stages to the existing Status field (optionsEditable: true)
185
+ frontline object option create sor__tickets 64 --data '{"name": "Escalated", "color": "Bright Red"}'
186
+ frontline object option create sor__tickets 64 --data '{"name": "Waiting on Vendor", "color": "Amber"}'
187
+
188
+ # 3. Also add a priority field
189
+ frontline object field create sor__tickets --data '{
190
+ "name": "Priority",
191
+ "type": "select",
192
+ "metadata": { "mode": "singleSelect" }
193
+ }'
194
+ # → { id: 11, ... }
195
+
196
+ frontline object option create sor__tickets 11 --data '{"name": "Critical", "color": "Bright Red"}'
197
+ frontline object option create sor__tickets 11 --data '{"name": "High", "color": "Magenta"}'
198
+ frontline object option create sor__tickets 11 --data '{"name": "Medium", "color": "Amber"}'
199
+ frontline object option create sor__tickets 11 --data '{"name": "Low", "color": "Gray"}'
200
+
201
+ # 4. Create record type with relevant fields
202
+ frontline object field list sor__tickets
203
+ # → Suppose: 1=Subject, 10=Status, 11=Priority, 5=Assignee, 3=Description
204
+
205
+ frontline object record-type create sor__tickets --data '{
206
+ "name": "support_board",
207
+ "displayName": "Support Board",
208
+ "columnIds": [1, 10, 11, 5, 3]
209
+ }'
210
+ # → { id: 4, ... }
211
+
212
+ # 5. Create kanban view grouped by Status — directly on the object
213
+ frontline object view create sor__tickets --data '{
214
+ "name": "Ticket Board",
215
+ "type": "KANBAN",
216
+ "metadata": { "groupingColumnId": 10 }
217
+ }'
218
+
219
+ # 6. Create a table view too (for list browsing)
220
+ frontline object view create sor__tickets --data '{
221
+ "name": "All Tickets",
222
+ "type": "TABLE",
223
+ "metadata": {}
224
+ }'
225
+ ```
226
+
227
+ ## Tips
228
+
229
+ - **Stage order can be customized** — use `--option-order` to control the Kanban board grouping order independently of the global select field settings.
230
+ - **One select field per board** — each kanban view groups by exactly one select field
231
+ - **Multiple pipelines** — create different record types for different workflows on the same object (e.g., "Sales Pipeline" and "Partner Pipeline" on Deals)
232
+ - **Add a table view too** — kanban is great for workflow, but a table view is useful for filtering and bulk operations
233
+ - **Use relations** — link pipeline records to people/companies for context (`frontline object relation link`)
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: record-type-management
3
+ description: >
4
+ How to manage record types and views for custom objects using the Frontline CLI.
5
+ Record types allow you to group fields, and views (Table/Kanban) allow
6
+ you to visualize records for a specific record type.
7
+ allowed-tools: Bash(frontline:*)
8
+ ---
9
+
10
+ # Record Type Management
11
+
12
+ Custom Objects support multiple **Record Types**. Each record type can have one or more **Views** (Table or Kanban).
13
+
14
+ > **Note:** These features are available for Objects created via `frontline object create`.
15
+ > Simple tables created via `frontline table create` do not support record types or views.
16
+
17
+ ## Record Types
18
+
19
+ A record type is a subset of fields (columns) from the object.
20
+
21
+ ### List Record Types
22
+
23
+ ```bash
24
+ frontline object record-type list <object-name>
25
+ ```
26
+
27
+ ### Create a Record Type
28
+
29
+ Pick the column IDs you want to include:
30
+
31
+ ```bash
32
+ frontline object record-type create <object-name> --data '{
33
+ "name": "my_type",
34
+ "displayName": "My Record Type",
35
+ "columnIds": [1, 2, 5]
36
+ }'
37
+ ```
38
+
39
+ ### Update a Record Type
40
+
41
+ ```bash
42
+ frontline object record-type update <object-name> <record-type-id> --data '{
43
+ "displayName": "Updated Name"
44
+ }'
45
+ ```
46
+
47
+ ### Delete a Record Type
48
+
49
+ ```bash
50
+ frontline object record-type delete <object-name> <record-type-id>
51
+ ```
52
+
53
+ ---
54
+
55
+ ## Views
56
+
57
+ Views always belong to a specific record type.
58
+
59
+ ### Create a Kanban View
60
+
61
+ Requires a `groupingColumnId` (must be a single-select field).
62
+
63
+ ```bash
64
+ frontline object view create <record-type-id> --data '{
65
+ "name": "Process Board",
66
+ "type": "kanban",
67
+ "metadata": { "groupingColumnId": 12 }
68
+ }'
69
+ ```
70
+
71
+ ### Create a Table View
72
+
73
+ ```bash
74
+ frontline object view create <record-type-id> --data '{
75
+ "name": "Full List",
76
+ "type": "table",
77
+ "metadata": {}
78
+ }'
79
+ ```
80
+
81
+ ### List Views
82
+
83
+ ```bash
84
+ frontline object view list <object-name>
85
+ ```
86
+
87
+ ### Update a View
88
+
89
+ ```bash
90
+ # Rename the view
91
+ frontline object view update <object-name> <view-id> --name "Renamed View"
92
+
93
+ # Refine view metadata (Table/Kanban)
94
+ frontline object view update <object-name> <view-id> --column-order "First Name, Last Name, Email"
95
+ frontline object view update <object-name> <view-id> --hidden-columns "ID, Created At"
96
+ frontline object view update <object-name> <view-id> --sticky-columns "First Name" # TABLE views only
97
+ frontline object view update <object-name> <view-id> --dialog-field-order "Email, Phone"
98
+ ```
99
+
100
+ ### Delete a View
101
+
102
+ ```bash
103
+ frontline object view delete <record-type-id> <view-id>
104
+ ```
@@ -0,0 +1,153 @@
1
+ ---
2
+ name: relations
3
+ description: >
4
+ How to manage relations between object records using the Frontline CLI.
5
+ Use when you need to link or unlink records between objects (e.g., assign
6
+ a Person to a Company), query related records, or perform reverse lookups.
7
+ allowed-tools: Bash(frontline:*)
8
+ ---
9
+
10
+ # Managing Relations
11
+
12
+ ## Creating Relation Fields
13
+
14
+ To link two objects, you must first create a **relation field** on the source object.
15
+
16
+ ```bash
17
+ frontline object field create <source-obj> --data '{
18
+ "name": "Target Link",
19
+ "type": "relation",
20
+ "metadata": {
21
+ "relatedTableId": <target-table-id>,
22
+ "displayColumn": <target-display-column-id>,
23
+ "mode": "single"
24
+ }
25
+ }'
26
+ ```
27
+
28
+ - `relatedTableId`: The numeric ID of the target table.
29
+ - `displayColumn`: The numeric ID of the column in the target table to show as the link title.
30
+ - `mode`: `single` for one-to-one/many-to-one, `multi` for one-to-many.
31
+
32
+ ## Discovering Relations
33
+
34
+ Before working with relations, inspect the object schema to find relation names:
35
+
36
+ ```bash
37
+ frontline object schema sor__people
38
+ ```
39
+
40
+ The output includes a `relations` array:
41
+
42
+ ```json
43
+ {
44
+ "relations": [
45
+ { "name": "company", "target": "sor__companies", "mode": "multi", "display_field": "Name" },
46
+ { "name": "deals", "target": "sor__deals", "mode": "multi", "display_field": "Name" }
47
+ ]
48
+ }
49
+ ```
50
+
51
+ The `name` field is what you use as the `<relation>` argument.
52
+
53
+ ## Link a Record
54
+
55
+ Connect a source record to a target record through a named relation:
56
+
57
+ ```bash
58
+ frontline object relation link <object> <source-id> <relation> <target-id>
59
+ ```
60
+
61
+ ```bash
62
+ # Link a person to a company
63
+ frontline object relation link sor__people 6625abc123def456 Companies 6625def789abc012
64
+ ```
65
+
66
+ - **Idempotent**: linking the same target twice won't create duplicates.
67
+ - Returns the updated source record.
68
+
69
+ ## Unlink a Record
70
+
71
+ Remove a link between two records:
72
+
73
+ ```bash
74
+ frontline object relation unlink <object> <source-id> <relation> <target-id>
75
+ ```
76
+
77
+ ```bash
78
+ # Remove person from company
79
+ frontline object relation unlink sor__people 6625abc123def456 Companies 6625def789abc012
80
+ ```
81
+
82
+ ## Get Related Records (Forward Lookup)
83
+
84
+ "What records does this person point to through `Companies`?"
85
+
86
+ ```bash
87
+ frontline object relation get <object> <source-id> <relation>
88
+ ```
89
+
90
+ ```bash
91
+ # Get all companies linked to this person
92
+ frontline object relation get sor__people 6625abc123def456 Companies
93
+ ```
94
+
95
+ Returns an array of related records with their full data.
96
+
97
+ ## Find by Relation (Reverse Lookup)
98
+
99
+ "Which people point to this company?"
100
+
101
+ ```bash
102
+ frontline object relation find-by <object> <relation> <target-id> [--page N] [--page-size N]
103
+ ```
104
+
105
+ ```bash
106
+ # Find all people linked to a specific company
107
+ frontline object relation find-by sor__people Companies 6625def789abc012
108
+
109
+ # With pagination
110
+ frontline object relation find-by sor__people Companies 6625def789abc012 --page 1 --page-size 20
111
+ ```
112
+
113
+ Returns a paginated result: `{ rows, total_count, total_pages, current_page }`.
114
+
115
+ ## Workflow: Transfer a Person Between Companies
116
+
117
+ ```bash
118
+ # 1. Show current company links
119
+ frontline object relation get sor__people <person-id> Companies
120
+
121
+ # 2. Unlink from old company
122
+ frontline object relation unlink sor__people <person-id> Companies <old-company-id>
123
+
124
+ # 3. Link to new company
125
+ frontline object relation link sor__people <person-id> Companies <new-company-id>
126
+
127
+ # 4. Verify
128
+ frontline object relation get sor__people <person-id> Companies
129
+ ```
130
+
131
+ ## Workflow: Find All Deals for a Company
132
+
133
+ ```bash
134
+ # Find deals linked to a company (reverse: deals that point to this company)
135
+ frontline object relation find-by sor__deals Company <company-id>
136
+ ```
137
+
138
+ ## Filtering by Relation
139
+
140
+ You can also filter records by relations using the query system
141
+ (see `filter-and-query` skill):
142
+
143
+ ```bash
144
+ # Find people with no company
145
+ frontline object record list sor__people --query '{"path": "[Company]", "operator": "isNull"}'
146
+
147
+ # Find people linked to specific companies
148
+ frontline object record list sor__people --query '{
149
+ "path": "[Company]",
150
+ "operator": "containsAny",
151
+ "value": ["6625def789abc012", "6625def789abc999"]
152
+ }'
153
+ ```
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: resource-creation
3
+ description: >
4
+ How to create new data tables and custom objects using the Frontline CLI.
5
+ Use this when you need to bootstrap a new entity from scratch.
6
+ allowed-tools: Bash(frontline:*)
7
+ ---
8
+
9
+ # Resource Creation Guide
10
+
11
+ This skill covers the creation of top-level entities: **Tables** and **Objects**.
12
+
13
+ ## Tables vs Objects: Which to Create?
14
+
15
+ | Entity Type | Use Case | Command |
16
+ | ----------- | -------------------------------------------------------------------------- | ------------------ |
17
+ | **Table** | Simple data structures, spreadsheet-like, no record types. | `frontline table` |
18
+ | **Object** | Business entities with record types (e.g. Leads, Tickets), advanced views. | `frontline object` |
19
+
20
+ ## Creating a Table
21
+
22
+ To create a new data table, use `frontline table create`. You MUST provide at least one column in the `--data` payload.
23
+
24
+ ```bash
25
+ frontline table create <name> --data '{
26
+ "displayName": "Display Name",
27
+ "emoji": "📁",
28
+ "columns": [
29
+ { "name": "Name", "type": "string", "metadata": { "format": "text" } }
30
+ ]
31
+ }'
32
+ ```
33
+
34
+ ### Example: Creating a "Shipments" Table
35
+
36
+ ```bash
37
+ frontline table create shipments --data '{
38
+ "displayName": "Shipments",
39
+ "columns": [
40
+ { "name": "Cargo", "type": "string", "metadata": { "format": "text" } },
41
+ { "name": "Weight", "type": "number", "metadata": { "format": "decimal", "decimals": 2 } }
42
+ ]
43
+ }'
44
+ ```
45
+
46
+ ## Creating a Custom Object
47
+
48
+ To create a new custom object, use `frontline object create`. This creates a more robust entity that supports multiple record types.
49
+
50
+ ```bash
51
+ frontline object create <name> --data '{
52
+ "displayName": "Display Name",
53
+ "emoji": "🎫",
54
+ "columns": [
55
+ { "name": "Subject", "type": "string", "metadata": { "format": "text" } }
56
+ ]
57
+ }'
58
+ ```
59
+
60
+ ### Example: Creating a "Support Tickets" Object
61
+
62
+ ```bash
63
+ frontline object create tickets --data '{
64
+ "displayName": "Support Tickets",
65
+ "columns": [
66
+ { "name": "Title", "type": "string", "metadata": { "format": "text" } },
67
+ { "name": "Priority", "type": "select", "metadata": { "mode": "singleSelect" } }
68
+ ]
69
+ }'
70
+ ```
71
+
72
+ ## Naming Rules
73
+
74
+ 1. **Name (slug)**: Lowercase, alphanumeric, and underscores only. E.g., `sales_leads`, `shipments_v2`.
75
+ 2. **Display Name**: Readable text with spaces. E.g., `Sales Leads`, `Shipments V2`.
76
+
77
+ ## Adding More Fields
78
+
79
+ Once the entity is created, you can add more fields using the `field create` subcommand:
80
+
81
+ ```bash
82
+ frontline table field create <table-name> --data '{...}'
83
+ frontline object field create <object-name> --data '{...}'
84
+ ```
85
+
86
+ For a full reference on field types and metadata, see the `schema-design` skill.