@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,287 @@
1
+ ---
2
+ name: crud-operations
3
+ description: >
4
+ How to create, update, and delete fields, options, rows, record types, and views
5
+ using the Frontline CLI. Use when managing the schema or data of tables and objects.
6
+ allowed-tools: Bash(frontline:*)
7
+ ---
8
+
9
+ # CRUD Operations
10
+
11
+ The Frontline CLI provides full CRUD for every entity on tables and objects.
12
+ The surface is symmetric: anything you can do on a table, you can do on an object
13
+ (objects additionally support record types, views, and relations).
14
+
15
+ ## Discovering the Schema
16
+
17
+ Before modifying anything, always inspect the schema first:
18
+
19
+ ```bash
20
+ # List all tables / objects
21
+ frontline table list
22
+ frontline object list
23
+
24
+ # Get detailed schema (fields, relations, record types)
25
+ frontline table schema <name>
26
+ frontline object schema <name>
27
+
28
+ # List fields (includes field IDs, types, options for select fields)
29
+ frontline table field list <name>
30
+ frontline object field list <name>
31
+ ```
32
+
33
+ ## Fields
34
+
35
+ Fields are the columns of a table/object. Each field has an `id`, `name`, `type`,
36
+ and optional metadata depending on the field type.
37
+
38
+ ### Field Types & Metadata Reference
39
+
40
+ | Type | Metadata keys | Example |
41
+ | ---------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------- |
42
+ | `string` | `format`: `text`, `email`, `url`, `phone` | `{"type":"string","metadata":{"format":"email"}}` |
43
+ | `number` | `format`: `decimal`, `integer`, `percent`, `currency`; `decimals`; `currency` | `{"type":"number","metadata":{"format":"currency","currency":"USD"}}` |
44
+ | `boolean` | _(none)_ | `{"type":"boolean","metadata":{}}` |
45
+ | `date` | `timezone`; `format`; `timeFormat` | `{"type":"date","metadata":{"timezone":"UTC"}}` |
46
+ | `dateOnly` | `format` | `{"type":"dateOnly","metadata":{}}` |
47
+ | `select` | `mode`: `singleSelect`, `multiSelect` | `{"type":"select","metadata":{"mode":"singleSelect"}}` |
48
+ | `relation` | `mode`: `single`, `multi`; `relatedTableId`; `displayColumn` | `{"type":"relation","metadata":{"mode":"multi"}}` |
49
+ | `file` | `showPreview`; `allowedFileTypes`; `maxFileSize` | `{"type":"file","metadata":{"showPreview":true}}` |
50
+
51
+ > **Note**: Field `type` in create/update is `select` (mapped internally to `tags`).
52
+ > The API response will also return `"type": "select"`.
53
+
54
+ ### Create
55
+
56
+ ```bash
57
+ # String field with email format
58
+ frontline table field create <table> --data '{
59
+ "name": "Email",
60
+ "type": "string",
61
+ "metadata": { "format": "email" }
62
+ }'
63
+
64
+ # Number field with currency
65
+ frontline table field create <table> --data '{
66
+ "name": "Amount",
67
+ "type": "number",
68
+ "metadata": { "format": "currency", "currency": "USD", "decimals": 2 }
69
+ }'
70
+
71
+ # Single-select field
72
+ frontline object field create <object> --data '{
73
+ "name": "Priority",
74
+ "type": "select",
75
+ "metadata": { "mode": "singleSelect" }
76
+ }'
77
+
78
+ # Date field with timezone
79
+ frontline table field create <table> --data '{
80
+ "name": "Due Date",
81
+ "type": "date",
82
+ "metadata": { "timezone": "America/New_York" }
83
+ }'
84
+ ```
85
+
86
+ ### Update
87
+
88
+ ```bash
89
+ # Rename a field
90
+ frontline table field update <table> <field-id> --data '{"name": "Renamed Field"}'
91
+
92
+ # Mark a field as required
93
+ frontline object field update <object> <field-id> --data '{"required": true}'
94
+
95
+ # Add a unique constraint
96
+ frontline table field update <table> <field-id> --data '{"unique": true}'
97
+
98
+ # Combine multiple changes
99
+ frontline object field update <object> <field-id> --data '{"name": "Email", "required": true, "unique": true}'
100
+ ```
101
+
102
+ Supported update keys: `name`, `metadata`, `required`, `unique`, `tags`, `defaultValue`.
103
+
104
+ ### Delete
105
+
106
+ ```bash
107
+ frontline table field delete <table> <field-id>
108
+ ```
109
+
110
+ ## Options (Select Field Values)
111
+
112
+ Options are the selectable values for `singleSelect` and `multiSelect` fields.
113
+ You need the **field ID** first (use `field list`).
114
+
115
+ ### Available Colors
116
+
117
+ Use color **names** (case-insensitive) or hex codes:
118
+
119
+ `Terracotta`, `Amber`, `Lime`, `Emerald`, `Lavender`, `Sky`, `Magenta`,
120
+ `Bright Red`, `Teal`, `Gray`, `Brown`, `Orange`, `Yellow`, `Green`,
121
+ `Blue`, `Purple`, `Pink`, `Red`
122
+
123
+ ### List
124
+
125
+ ```bash
126
+ frontline table option list <table> <field-id>
127
+ frontline object option list <object> <field-id>
128
+ ```
129
+
130
+ ### Create
131
+
132
+ ```bash
133
+ frontline object option create <object> <field-id> --data '{
134
+ "name": "Hot",
135
+ "color": "Magenta"
136
+ }'
137
+ ```
138
+
139
+ ### Update / Delete
140
+
141
+ ```bash
142
+ frontline object option update <object> <option-id> --data '{"name": "Warm", "color": "Amber"}'
143
+ frontline object option delete <object> <option-id>
144
+ ```
145
+
146
+ > **Note**: `option-id` is the option's own ID (not the field ID).
147
+
148
+ ## Rows (Records)
149
+
150
+ ### Create
151
+
152
+ ```bash
153
+ # Body is a flat key-value map: { "Field Name": value }
154
+ frontline table row create <table> --data '{
155
+ "Name": "Acme Corp",
156
+ "Amount": 50000,
157
+ "Status": [1]
158
+ }'
159
+
160
+ frontline object record create <object> --data '{
161
+ "First Name": "John",
162
+ "Last Name": "Doe",
163
+ "Email": "john@example.com"
164
+ }'
165
+ ```
166
+
167
+ > Select fields expect an array of option IDs: `[1, 3]`
168
+
169
+ ### Bulk Create
170
+
171
+ You can create multiple rows or records at once by passing a JSON array to `--data`.
172
+
173
+ ```bash
174
+ # Create multiple table rows
175
+ frontline table row bulk-create <table> --data '[
176
+ { "Name": "Acme Corp", "Amount": 50000 },
177
+ { "Name": "Globex Inc", "Amount": 120000 }
178
+ ]'
179
+
180
+ # Create multiple object records
181
+ frontline object record bulk-create <object> --data '[
182
+ { "First Name": "John", "Last Name": "Doe" },
183
+ { "First Name": "Jane", "Last Name": "Smith" }
184
+ ]'
185
+ ```
186
+
187
+ ### Update
188
+
189
+ ```bash
190
+ # Only send the fields you want to change
191
+ frontline table row update <table> <row-id> --data '{"Amount": 75000}'
192
+ frontline object record update <object> <row-id> --data '{"Status": [2]}'
193
+ ```
194
+
195
+ ### Delete
196
+
197
+ ```bash
198
+ frontline table row delete <table> <row-id>
199
+ frontline object record delete <object> <row-id>
200
+ ```
201
+
202
+ ### Get by ID
203
+
204
+ ```bash
205
+ frontline table row get <table> <row-id>
206
+ frontline object record get <object> <row-id>
207
+ ```
208
+
209
+ ## Record Types (objects only)
210
+
211
+ Record types group records into categories (e.g., "Lead", "Customer" in a People object).
212
+
213
+ ### List
214
+
215
+ ```bash
216
+ frontline object record-type list <object>
217
+ ```
218
+
219
+ ### Create
220
+
221
+ ```bash
222
+ frontline object record-type create <object> --data '{
223
+ "name": "lead",
224
+ "displayName": "Lead",
225
+ "columnIds": [1, 2, 3]
226
+ }'
227
+ ```
228
+
229
+ > Passing `columnIds` auto-creates default Table + Record views with those columns.
230
+
231
+ ### Update / Delete
232
+
233
+ ```bash
234
+ frontline object record-type update <object> <record-type-id> --data '{"displayName": "Qualified Lead"}'
235
+ frontline object record-type delete <object> <record-type-id>
236
+ ```
237
+
238
+ ## Views (objects only)
239
+
240
+ Views control how records are displayed in the UI (table grid, kanban board, single record).
241
+
242
+ ### List
243
+
244
+ ```bash
245
+ frontline object view list <object>
246
+ ```
247
+
248
+ ### Create
249
+
250
+ ```bash
251
+ # View types: table, kanban, record
252
+ frontline object view create <record-type-id> --data '{
253
+ "name": "Kanban Board",
254
+ "type": "kanban",
255
+ "metadata": { "groupingColumnId": 42 }
256
+ }'
257
+ ```
258
+
259
+ ### Update / Delete
260
+
261
+ ```bash
262
+ frontline object view update <record-type-id> <view-id> --data '{"name": "Updated Board"}'
263
+ frontline object view delete <record-type-id> <view-id>
264
+ ```
265
+
266
+ ## Workflow: Full Object Setup
267
+
268
+ Create a new record type with a kanban view for a deals pipeline:
269
+
270
+ ```bash
271
+ # 1. Check current fields
272
+ frontline object field list sor__deals
273
+
274
+ # 2. Create a record type (returns record_type_id)
275
+ frontline object record-type create sor__deals --data '{
276
+ "name": "enterprise",
277
+ "displayName": "Enterprise Deals",
278
+ "columnIds": [1, 2, 5, 8]
279
+ }'
280
+
281
+ # 3. Add a kanban view to the record type
282
+ frontline object view create <record-type-id> --data '{
283
+ "name": "Pipeline Board",
284
+ "type": "kanban",
285
+ "metadata": { "groupingColumnId": 5 }
286
+ }'
287
+ ```
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: export-and-delete
3
+ description: >
4
+ How to export data and delete tables or objects using the Frontline CLI.
5
+ Use when you need to download records as XLSX/CSV files or permanently
6
+ remove a table or object and all its data.
7
+ allowed-tools: Bash(frontline:*)
8
+ ---
9
+
10
+ # Export & Delete Operations
11
+
12
+ ## Exporting Data
13
+
14
+ Export records from a table or object as an XLSX spreadsheet or CSV file.
15
+ Exports support the same query/search/sort filters used for listing.
16
+
17
+ ### Export as XLSX
18
+
19
+ ```bash
20
+ frontline table export xlsx <name> [--output file.xlsx]
21
+ frontline object export xlsx <name> [--output file.xlsx]
22
+ ```
23
+
24
+ ```bash
25
+ # Export all people
26
+ frontline object export xlsx sor__people
27
+
28
+ # Export with filter (high-value deals only)
29
+ frontline object export xlsx sor__deals \
30
+ --query '{"path": "[Amount]", "operator": "gte", "value": 10000}' \
31
+ --output big_deals.xlsx
32
+
33
+ # Export with search + sort
34
+ frontline table export xlsx sales_data \
35
+ --search "enterprise" \
36
+ --sort '[{"path": "[Revenue]", "type": "desc"}]' \
37
+ --output enterprise_sales.xlsx
38
+ ```
39
+
40
+ ### Export as CSV
41
+
42
+ ```bash
43
+ frontline table export csv <name> [--output file.csv]
44
+ frontline object export csv <name> [--output file.csv]
45
+ ```
46
+
47
+ ```bash
48
+ # Export all records as CSV
49
+ frontline object export csv sor__people --output people_backup.csv
50
+ ```
51
+
52
+ ### Default Output
53
+
54
+ If `--output` is not specified:
55
+
56
+ - XLSX: `./<name>_export.xlsx`
57
+ - CSV: `./<name>_export.csv`
58
+
59
+ ## Deleting Tables/Objects
60
+
61
+ > [!CAUTION]
62
+ > These operations are **destructive and irreversible**. All rows, fields,
63
+ > views, record types, and associated data will be permanently deleted.
64
+
65
+ ### Delete a Table
66
+
67
+ ```bash
68
+ frontline table delete <name>
69
+ ```
70
+
71
+ ### Delete an Object
72
+
73
+ ```bash
74
+ frontline object delete <name>
75
+ ```
76
+
77
+ ### Response
78
+
79
+ ```json
80
+ { "deleted": true, "name": "my_table" }
81
+ ```
82
+
83
+ ## Workflow: Backup Then Delete
84
+
85
+ Always export before deleting:
86
+
87
+ ```bash
88
+ # 1. Export everything
89
+ frontline object export xlsx sor__legacy_deals --output legacy_deals_backup.xlsx
90
+
91
+ # 2. Verify the export file exists and looks right
92
+ ls -la legacy_deals_backup.xlsx
93
+
94
+ # 3. Delete the object
95
+ frontline object delete sor__legacy_deals
96
+ ```
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: files
3
+ description: >
4
+ How to list, get, download, and delete files attached to rows
5
+ in tables and objects using the Frontline CLI.
6
+ allowed-tools: Bash(frontline:*)
7
+ ---
8
+
9
+ # File Management
10
+
11
+ Files are binary attachments linked to individual rows. Each file has an
12
+ auto-incremented ID, original filename, content type, and size.
13
+
14
+ > **Note**: File _upload_ via CLI is not yet supported because it requires
15
+ > multipart form-data. Use the web UI or direct API calls for uploads.
16
+
17
+ ## List Files for a Row
18
+
19
+ ```bash
20
+ frontline object file list <object> <row-id>
21
+ frontline table file list <table> <row-id>
22
+ ```
23
+
24
+ Returns an array of file objects with `id`, `originalName`, `contentType`,
25
+ `size`, and `createdAt`.
26
+
27
+ ## Get File Metadata
28
+
29
+ ```bash
30
+ frontline object file get <object> <file-id>
31
+ frontline table file get <table> <file-id>
32
+ ```
33
+
34
+ ## Download a File
35
+
36
+ ```bash
37
+ # Download to current directory (uses original filename)
38
+ frontline object file download <object> <file-id>
39
+
40
+ # Download to a specific path
41
+ frontline object file download <object> <file-id> --output ./contracts/proposal.pdf
42
+ frontline table file download <table> <file-id> --output ./data/report.xlsx
43
+ ```
44
+
45
+ ## Delete a File
46
+
47
+ ```bash
48
+ frontline object file delete <object> <file-id>
49
+ frontline table file delete <table> <file-id>
50
+ ```
51
+
52
+ ---
53
+
54
+ ## Typical Workflow
55
+
56
+ ```bash
57
+ # 1. Find the row
58
+ frontline object row list sor__deals --search "Acme Corp"
59
+ # → row ID = 6625abc123def456
60
+
61
+ # 2. List attached files
62
+ frontline object file list sor__deals 6625abc123def456
63
+ # → [{ id: 15, originalName: "contract_v2.pdf", size: 245000, ... }]
64
+
65
+ # 3. Download a file
66
+ frontline object file download sor__deals 15 --output ./contract_v2.pdf
67
+
68
+ # 4. Delete an outdated file
69
+ frontline object file delete sor__deals 15
70
+ ```
@@ -0,0 +1,199 @@
1
+ ---
2
+ name: filter-and-query
3
+ description: >
4
+ How to filter, search, and sort records using the Frontline CLI.
5
+ Use when you need to find specific records in a table or object by
6
+ building query conditions, combining them with AND/OR logic,
7
+ searching by text, or sorting results.
8
+ allowed-tools: Bash(frontline:*)
9
+ ---
10
+
11
+ # Filtering and Querying Records
12
+
13
+ The `frontline table row list` and `frontline object record list` commands accept
14
+ `--query`, `--search`, and `--sort` flags for filtering data.
15
+
16
+ ## Quick Reference
17
+
18
+ ```bash
19
+ # Simple text search across all fields
20
+ frontline object record list sor__people --search "john"
21
+
22
+ # Filter by a single condition
23
+ # TIP: Use 'frontline object field list <name>' to find field names and tag IDs
24
+ frontline object record list sor__deals --query '{
25
+ "path": "[Amount]",
26
+ "operator": "gte",
27
+ "value": 10000
28
+ }'
29
+
30
+ # Multiple conditions (AND)
31
+ frontline object record list sor__deals --query '{
32
+ "operator": "and",
33
+ "conditions": [
34
+ { "path": "[Status]", "operator": "containsAny", "value": [1, 2] },
35
+ { "path": "[Amount]", "operator": "gte", "value": 5000 }
36
+ ]
37
+ }'
38
+
39
+ # Sort results
40
+ frontline object record list sor__people --sort '[{"path": "[Last Name]", "type": "asc"}]'
41
+ ```
42
+
43
+ ## Path Format
44
+
45
+ Field paths use bracket notation: `[Field Name]`
46
+
47
+ For relation fields (querying through a linked record's field):
48
+ `[Relation Field].[Target Field]`
49
+
50
+ ```jsonc
51
+ "path": "[Email]" // Direct field
52
+ "path": "[Company].[Name]" // Through a relation
53
+ ```
54
+
55
+ ## Operators by Field Type
56
+
57
+ ### String Fields
58
+
59
+ | Operator | Description | Value |
60
+ | ------------ | --------------- | ------------ |
61
+ | `equals` | Exact match | `"string"` |
62
+ | `ne` | Not equal | `"string"` |
63
+ | `contains` | Substring match | `"string"` |
64
+ | `startsWith` | Starts with | `"string"` |
65
+ | `endsWith` | Ends with | `"string"` |
66
+ | `regex` | Regex pattern | `"pattern"` |
67
+ | `isNull` | Field is empty | _(no value)_ |
68
+ | `isNotNull` | Field has value | _(no value)_ |
69
+
70
+ ### Number Fields
71
+
72
+ | Operator | Description | Value |
73
+ | ---------------------- | --------------------- | ------------ |
74
+ | `equals` | Equal to | `number` |
75
+ | `ne` | Not equal | `number` |
76
+ | `lt` | Less than | `number` |
77
+ | `lte` | Less than or equal | `number` |
78
+ | `gt` | Greater than | `number` |
79
+ | `gte` | Greater than or equal | `number` |
80
+ | `in` | In list | `[1, 2, 3]` |
81
+ | `notIn` | Not in list | `[1, 2, 3]` |
82
+ | `isNull` / `isNotNull` | Null checks | _(no value)_ |
83
+
84
+ ### Date / DateOnly Fields
85
+
86
+ | Operator | Description | Value |
87
+ | ---------------------- | ------------ | ------------------------------ |
88
+ | `equals` | Exact date | `"2026-04-17T00:00:00Z"` |
89
+ | `before` | Before date | `"2026-04-17T00:00:00Z"` |
90
+ | `after` | After date | `"2026-04-17T00:00:00Z"` |
91
+ | `onOrBefore` | On or before | `"2026-04-17T00:00:00Z"` |
92
+ | `onOrAfter` | On or after | `"2026-04-17T00:00:00Z"` |
93
+ | `between` | Date range | `["2026-01-01", "2026-12-31"]` |
94
+ | `isNull` / `isNotNull` | Null checks | _(no value)_ |
95
+
96
+ ### Tags (Select/Multi-select) Fields
97
+
98
+ > **Important**: Tag values must be numeric **tag IDs**, not names.
99
+ > Use `frontline table field list <table>` or `frontline object field list <object>`
100
+ > to find tag IDs in the `options` array of each field.
101
+
102
+ | Operator | Description | Value |
103
+ | ---------------------- | --------------------- | ------------------ |
104
+ | `containsAny` | Has any of these tags | `[1, 2]` (tag IDs) |
105
+ | `containsAll` | Has all of these tags | `[3, 5]` (tag IDs) |
106
+ | `notIn` | Does not have any of | `[4]` (tag IDs) |
107
+ | `isNull` / `isNotNull` | Null checks | _(no value)_ |
108
+
109
+ ### Relation Fields
110
+
111
+ | Operator | Description | Value |
112
+ | ------------- | -------------------- | ---------------- |
113
+ | `containsAny` | Linked to any of | `["id1", "id2"]` |
114
+ | `notIn` | Not linked to any of | `["id1"]` |
115
+ | `isNull` | No linked records | _(no value)_ |
116
+ | `isNotNull` | Has linked records | _(no value)_ |
117
+
118
+ ### Boolean Fields
119
+
120
+ | Operator | Description |
121
+ | ---------------------- | -------------- |
122
+ | `isTrue` | Value is true |
123
+ | `isFalse` | Value is false |
124
+ | `isNull` / `isNotNull` | Null checks |
125
+
126
+ ## Combining Conditions
127
+
128
+ Use `and` / `or` groups to combine conditions. Groups can be nested.
129
+
130
+ ```jsonc
131
+ {
132
+ "operator": "or",
133
+ "conditions": [
134
+ {
135
+ "operator": "and",
136
+ "conditions": [
137
+ { "path": "[Status]", "operator": "containsAny", "value": [1] },
138
+ { "path": "[Amount]", "operator": "gte", "value": 10000 },
139
+ ],
140
+ },
141
+ {
142
+ "path": "[Priority]",
143
+ "operator": "containsAny",
144
+ "value": [5],
145
+ },
146
+ ],
147
+ }
148
+ ```
149
+
150
+ This matches: (Status is Open AND Amount >= 10000) OR Priority is Urgent.
151
+
152
+ ## Sorting
153
+
154
+ Pass a JSON array of sort specs:
155
+
156
+ ```bash
157
+ # Single sort
158
+ frontline table row list my_table --sort '[{"path": "[Name]", "type": "asc"}]'
159
+
160
+ # Multi-sort (primary + secondary)
161
+ frontline table row list my_table --sort '[
162
+ {"path": "[Status]", "type": "desc"},
163
+ {"path": "[Created At]", "type": "asc"}
164
+ ]'
165
+ ```
166
+
167
+ ## Pagination
168
+
169
+ ```bash
170
+ frontline table row list my_table --page 1 --page-size 50
171
+ ```
172
+
173
+ - `--page`: Page number (default: 1)
174
+ - `--page-size`: Items per page (default: 50, max: 200)
175
+
176
+ ## Filter by Record Type (objects only)
177
+
178
+ ```bash
179
+ frontline object record list sor__people --record-type lead
180
+ frontline object record list sor__deals --record-type "all"
181
+ ```
182
+
183
+ ## Full Example
184
+
185
+ Find all open deals worth over $10k, owned by a specific company, sorted by amount:
186
+
187
+ ```bash
188
+ frontline object record list sor__deals \
189
+ --query '{
190
+ "operator": "and",
191
+ "conditions": [
192
+ { "path": "[Status]", "operator": "containsAny", "value": [1] },
193
+ { "path": "[Amount]", "operator": "gte", "value": 10000 },
194
+ { "path": "[Company]", "operator": "isNotNull" }
195
+ ]
196
+ }' \
197
+ --sort '[{"path": "[Amount]", "type": "desc"}]' \
198
+ --page-size 20
199
+ ```