@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,102 @@
1
+ ---
2
+ name: auth-and-profiles
3
+ description: How to authenticate and manage CLI profiles for different environments
4
+ ---
5
+
6
+ # Authentication & Profiles
7
+
8
+ The Frontline CLI supports multiple named profiles for working with different environments (dev, staging, production).
9
+
10
+ ## Quick Start
11
+
12
+ ```bash
13
+ frontline auth login <api-key>
14
+ ```
15
+
16
+ This saves the key to the **default** profile with base URL `http://localhost:7010/public/v1`.
17
+
18
+ ## Managing Profiles
19
+
20
+ ### Create profiles for different environments
21
+
22
+ ```bash
23
+ frontline auth login <key> --profile production --base-url https://api.getfrontline.ai/public/v1
24
+ frontline auth login <key> --profile staging --base-url https://staging.example.com/public/v1
25
+ frontline auth login <key> # default profile, localhost
26
+ ```
27
+
28
+ ### Switch active profile
29
+
30
+ ```bash
31
+ frontline auth use production
32
+ ```
33
+
34
+ All commands will now use the production key and URL until you switch again.
35
+
36
+ ### See all profiles
37
+
38
+ ```bash
39
+ frontline auth status
40
+ ```
41
+
42
+ Output shows each profile's key preview, base URL, and which one is active.
43
+
44
+ ### Check identity
45
+
46
+ ```bash
47
+ frontline auth whoami
48
+ ```
49
+
50
+ Calls the `/me` endpoint and shows account/user info for the active profile.
51
+
52
+ ### Remove a profile
53
+
54
+ ```bash
55
+ frontline auth logout # removes current profile
56
+ frontline auth logout --profile staging # removes specific profile
57
+ ```
58
+
59
+ ## Per-Command Overrides
60
+
61
+ Any command can override the active profile for a single call:
62
+
63
+ ```bash
64
+ frontline object list --api-key <other-key> --base-url https://other.example.com/public/v1
65
+ ```
66
+
67
+ ## Resolution Priority
68
+
69
+ 1. `--api-key` / `--base-url` flags
70
+ 2. `FRONTLINE_API_KEY` / `FRONTLINE_BASE_URL` env vars
71
+ 3. Active profile
72
+ 4. Default: `http://localhost:7010/public/v1`
73
+
74
+ ## Typical Workflow
75
+
76
+ ```bash
77
+ # 1. Set up profiles once
78
+ frontline auth login flk_dev_abc --profile dev
79
+ frontline auth login flk_prod_xyz --profile prod --base-url https://api.getfrontline.ai/public/v1
80
+
81
+ # 2. Work in dev
82
+ frontline auth use dev
83
+ frontline object list
84
+ frontline table row list my_table
85
+
86
+ # 3. Switch to prod when needed
87
+ frontline auth use prod
88
+ frontline object count sor__deals
89
+
90
+ # 4. Quick one-off against staging without switching
91
+ frontline object list --api-key flk_stg_123 --base-url https://staging.example.com/public/v1
92
+ ```
93
+
94
+ ## Config Location
95
+
96
+ Config is stored automatically by the OS:
97
+
98
+ - **Linux**: `~/.config/frontline-cli/config.json`
99
+ - **macOS**: `~/Library/Preferences/frontline-cli/config.json`
100
+ - **Windows**: `%APPDATA%/frontline-cli/Config/config.json`
101
+
102
+ Run `frontline auth status` to see the exact path.
@@ -0,0 +1,385 @@
1
+ ---
2
+ name: crm-setup
3
+ description: >
4
+ End-to-end guide for building a CRM using the Frontline CLI.
5
+ Covers creating custom objects/tables with fields, setting up relations
6
+ between entities, adding pipeline stages, populating data, and querying
7
+ across related objects. Use as a reference when building any multi-entity
8
+ business workflow from scratch.
9
+ allowed-tools: Bash(frontline:*)
10
+ ---
11
+
12
+ # Building a CRM with the Frontline CLI
13
+
14
+ This skill walks through building a complete CRM system: Companies, Contacts,
15
+ and Deals — with relations, pipeline stages, record types, and views.
16
+
17
+ > The built-in `sor__companies`, `sor__people`, and `sor__deals` objects already
18
+ > exist. This guide uses **custom objects** to show how to build everything from
19
+ > scratch, but the same patterns apply when extending existing objects.
20
+
21
+ ## Available Field Types
22
+
23
+ | Type | Usage | Value format |
24
+ | --------------- | ---------------------------------------- | ------------------------ |
25
+ | `string` | Text fields (name, email, url) | `"text"` |
26
+ | `number` | Numeric fields (amounts, counts) | `42` |
27
+ | `date` | Timestamps | `"2026-04-17T00:00:00Z"` |
28
+ | `dateOnly` | Date without time | `"2026-04-17"` |
29
+ | `boolean` | True/false toggles | `true` / `false` |
30
+ | `select` | Single/multi-select (options with color) | `[1, 3]` (option IDs) |
31
+ | `relation` | Link to records in another table | `["record_id_1"]` |
32
+ | `autoIncrement` | Auto-generated sequential ID | _(auto)_ |
33
+ | `file` | File attachment | _(upload only)_ |
34
+
35
+ ## Available Option Colors
36
+
37
+ When creating options for select fields, use these color **names** (case-insensitive):
38
+
39
+ | Name | Hex |
40
+ | ---------- | --------- |
41
+ | Terracotta | `#D08F6D` |
42
+ | Amber | `#FFCA41` |
43
+ | Lime | `#D4F997` |
44
+ | Emerald | `#00DC71` |
45
+ | Lavender | `#B76FFF` |
46
+ | Sky | `#339AFF` |
47
+ | Magenta | `#FE55AA` |
48
+ | Bright Red | `#E90012` |
49
+ | Teal | `#00D1B7` |
50
+ | Gray | `#727272` |
51
+ | Brown | `#775B49` |
52
+ | Orange | `#8D4818` |
53
+ | Yellow | `#846826` |
54
+ | Green | `#237045` |
55
+ | Blue | `#215B9D` |
56
+ | Purple | `#7132A2` |
57
+ | Pink | `#A32662` |
58
+ | Red | `#A0362E` |
59
+
60
+ ## Step 1 — Create the Objects or Tables
61
+
62
+ Use `object create` for business entities and `table create` for simple data.
63
+
64
+ ```bash
65
+ # Create a new "Embarques" table
66
+ frontline table create embarques --data '{
67
+ "displayName": "Embarques",
68
+ "columns": [
69
+ { "name": "Nombre", "type": "string", "metadata": { "format": "text" } }
70
+ ]
71
+ }'
72
+
73
+ # Create a new "Pedidos" table
74
+ frontline table create pedidos --data '{
75
+ "displayName": "Pedidos",
76
+ "columns": [
77
+ { "name": "Nombre", "type": "string", "metadata": { "format": "text" } }
78
+ ]
79
+ }'
80
+ ```
81
+
82
+ The system also ships with these core objects:
83
+
84
+ ```
85
+ sor__companies — Companies
86
+ sor__people — People (contacts)
87
+ sor__deals — Deals (sales pipeline)
88
+ ```
89
+
90
+ Verify they exist:
91
+
92
+ ```bash
93
+ frontline object list
94
+ ```
95
+
96
+ ## Step 2 — Inspect & Extend the Schema
97
+
98
+ ### View current fields
99
+
100
+ ```bash
101
+ frontline object field list sor__companies
102
+ frontline object field list sor__people
103
+ frontline object field list sor__deals
104
+ ```
105
+
106
+ ### Add custom fields
107
+
108
+ ```bash
109
+ # Add a "Lead Source" select field to People
110
+ frontline object field create sor__people --data '{
111
+ "name": "Lead Source",
112
+ "type": "select",
113
+ "metadata": { "mode": "singleSelect" }
114
+ }'
115
+ # → Returns: { id: 15, name: "Lead Source", type: "select", ... }
116
+
117
+ # Add options to the new field (use the field ID from above)
118
+ frontline object option create sor__people 15 --data '{"name": "Website", "color": "Sky"}'
119
+ frontline object option create sor__people 15 --data '{"name": "Referral", "color": "Emerald"}'
120
+ frontline object option create sor__people 15 --data '{"name": "Cold Outreach", "color": "Gray"}'
121
+ frontline object option create sor__people 15 --data '{"name": "Event", "color": "Lavender"}'
122
+
123
+ # Add a "Probability %" number field to Deals
124
+ frontline object field create sor__deals --data '{
125
+ "name": "Probability",
126
+ "type": "number",
127
+ "metadata": {}
128
+ }'
129
+
130
+ # Add a "Next Follow-up" date field to Deals
131
+ frontline object field create sor__deals --data '{
132
+ "name": "Next Follow-up",
133
+ "type": "dateOnly",
134
+ "metadata": {}
135
+ }'
136
+ ```
137
+
138
+ ## Step 3 — Understand Relations
139
+
140
+ The built-in objects already have relations defined:
141
+
142
+ ```bash
143
+ frontline object schema sor__people
144
+ # → relations: [{ name: "companies", target: "sor__companies", mode: "multi" }]
145
+
146
+ frontline object schema sor__deals
147
+ # → relations: [
148
+ # { name: "people", target: "sor__people", mode: "multi" },
149
+ # { name: "company", target: "sor__companies", mode: "single" }
150
+ # ]
151
+ ```
152
+
153
+ The `name` field is what you use in all relation commands.
154
+
155
+ ## Step 4 — Populate Data
156
+
157
+ ### Create companies
158
+
159
+ ```bash
160
+ frontline object record create sor__companies --data '{
161
+ "Name": "Acme Corp",
162
+ "Domain": "acme.com",
163
+ "Primary Location": "New York, USA"
164
+ }'
165
+ # → { id: "6625aaa...", ... }
166
+
167
+ frontline object record create sor__companies --data '{
168
+ "Name": "TechStart Inc",
169
+ "Domain": "techstart.io",
170
+ "Primary Location": "San Francisco, USA"
171
+ }'
172
+ # → { id: "6625bbb...", ... }
173
+ ```
174
+
175
+ ### Create contacts
176
+
177
+ ```bash
178
+ frontline object record create sor__people --data '{
179
+ "First Name": "Alice",
180
+ "Last Name": "Johnson",
181
+ "Email": "alice@acme.com",
182
+ "Phone Number": "+1-555-0101",
183
+ "Role": "VP Sales"
184
+ }'
185
+ # → { id: "6625ccc...", ... }
186
+
187
+ frontline object record create sor__people --data '{
188
+ "First Name": "Bob",
189
+ "Last Name": "Smith",
190
+ "Email": "bob@techstart.io",
191
+ "Role": "CTO"
192
+ }'
193
+ # → { id: "6625ddd...", ... }
194
+ ```
195
+
196
+ ### Create deals
197
+
198
+ ```bash
199
+ # Use option IDs from `frontline object field list sor__deals`
200
+ # Stage options: 1=Lead, 2=In Progress, 3=Won, 4=Lost
201
+
202
+ frontline object record create sor__deals --data '{
203
+ "Name": "Acme Enterprise License",
204
+ "Stage": [2],
205
+ "Value": 150000
206
+ }'
207
+ # → { id: "6625eee...", ... }
208
+ ```
209
+
210
+ ## Step 5 — Link Records
211
+
212
+ ### Link person → company
213
+
214
+ ```bash
215
+ # Alice works at Acme
216
+ frontline object relation link sor__people 6625ccc... Companies 6625aaa...
217
+
218
+ # Bob works at TechStart
219
+ frontline object relation link sor__people 6625ddd... Companies 6625bbb...
220
+ ```
221
+
222
+ ### Link deal → company and deal → person
223
+
224
+ ```bash
225
+ # The Acme deal belongs to Acme Corp
226
+ frontline object relation link sor__deals 6625eee... Company 6625aaa...
227
+
228
+ # Alice is the contact for this deal
229
+ frontline object relation link sor__deals 6625eee... People 6625ccc...
230
+ ```
231
+
232
+ ### Verify links
233
+
234
+ ```bash
235
+ # What company does Alice belong to?
236
+ frontline object relation get sor__people 6625ccc... Companies
237
+
238
+ # Who are the contacts for the Acme deal?
239
+ frontline object relation get sor__deals 6625eee... People
240
+
241
+ # Which deals belong to Acme Corp? (reverse lookup)
242
+ frontline object relation find-by sor__deals Company 6625aaa...
243
+
244
+ # Which people work at Acme Corp? (reverse lookup)
245
+ frontline object relation find-by sor__people Companies 6625aaa...
246
+ ```
247
+
248
+ ## Step 6 — Set Up Pipeline Views
249
+
250
+ ### Create record types for deal stages
251
+
252
+ ```bash
253
+ # Get the field IDs to include in each record type
254
+ frontline object field list sor__deals
255
+ # → Use the IDs for Name, Stage, Value, People, Company
256
+
257
+ frontline object record-type create sor__deals --data '{
258
+ "name": "active_pipeline",
259
+ "displayName": "Active Pipeline",
260
+ "columnIds": [1, 2, 3, 5, 8]
261
+ }'
262
+ # → { id: 7, ... }
263
+ ```
264
+
265
+ ### Create a kanban board for the pipeline
266
+
267
+ ```bash
268
+ # Use the Stage field ID for grouping (e.g., field ID 2)
269
+ # Create directly on the object (no record type needed)
270
+ frontline object view create sor__deals --data '{
271
+ "name": "Pipeline Board",
272
+ "type": "KANBAN",
273
+ "metadata": { "groupingColumnId": 2 }
274
+ }'
275
+
276
+ # Or scoped to a specific record type with --record-type <id>
277
+ frontline object view create sor__deals --record-type 7 --data '{
278
+ "name": "Pipeline Board",
279
+ "type": "KANBAN",
280
+ "metadata": { "groupingColumnId": 2 }
281
+ }'
282
+ ```
283
+
284
+ > View types must be uppercase: `KANBAN`, `TABLE`, `RECORD`.
285
+
286
+ ## Step 7 — View Customization (Ordering and Visibility)
287
+
288
+ Refine your views to show only the most important information:
289
+
290
+ ```bash
291
+ # Set order of columns/fields
292
+ frontline object view update sor__deals <view-id> --column-order "Name, Stage, Value, Company"
293
+
294
+ # Hide less relevant fields
295
+ frontline object view update sor__deals <view-id> --hidden-columns "Created At, Updated At"
296
+
297
+ # Order fields in the record creation dialog
298
+ frontline object view update sor__deals <view-id> --dialog-field-order "Name, Stage, Value, Probability"
299
+ ```
300
+
301
+ ## Step 8 — Query Your CRM
302
+
303
+ ### Find high-value deals
304
+
305
+ ```bash
306
+ frontline object record list sor__deals --query '{
307
+ "operator": "and",
308
+ "conditions": [
309
+ { "path": "[Value]", "operator": "gte", "value": 50000 },
310
+ { "path": "[Stage]", "operator": "containsAny", "value": [2] }
311
+ ]
312
+ }' --sort '[{"path": "[Value]", "type": "desc"}]'
313
+ ```
314
+
315
+ ### Find contacts with no company
316
+
317
+ ```bash
318
+ frontline object record list sor__people --query '{
319
+ "path": "[Companies]", "operator": "isNull"
320
+ }'
321
+ ```
322
+
323
+ ### Search across fields
324
+
325
+ ```bash
326
+ frontline object record list sor__people --search "alice"
327
+ frontline object record list sor__companies --search "tech"
328
+ ```
329
+
330
+ ### Find all contacts at a specific company
331
+
332
+ ```bash
333
+ frontline object relation find-by sor__people Companies <company-id>
334
+ ```
335
+
336
+ ## Step 8 — Export & Backup
337
+
338
+ ```bash
339
+ # Export all deals to spreadsheet
340
+ frontline object export xlsx sor__deals --output deals_report.xlsx
341
+
342
+ # Export filtered data (only won deals)
343
+ frontline object export csv sor__deals \
344
+ --query '{"path": "[Stage]", "operator": "containsAny", "value": [3]}' \
345
+ --output won_deals.csv
346
+
347
+ # Export all contacts
348
+ frontline object export xlsx sor__people --output contacts_backup.xlsx
349
+ ```
350
+
351
+ ## Quick Command Reference
352
+
353
+ ```
354
+ ┌──────────────────────────────────────────────────────────────────┐
355
+ │ SCHEMA │
356
+ │ frontline object list │
357
+ │ frontline object schema <obj> │
358
+ │ frontline object field list <obj> │
359
+ │ frontline object field create <obj> --data '{...}' │
360
+ │ frontline object option create <obj> <field-id> --data '{..}' │
361
+ ├──────────────────────────────────────────────────────────────────┤
362
+ │ RECORDS │
363
+ │ frontline object record create <obj> --data '{...}' │
364
+ │ frontline object record list <obj> [--query] [--search] │
365
+ │ frontline object record get <obj> <id> │
366
+ │ frontline object record update <obj> <id> --data '{...}' │
367
+ │ frontline object record delete <obj> <id> │
368
+ ├──────────────────────────────────────────────────────────────────┤
369
+ │ RELATIONS │
370
+ │ frontline object relation link <obj> <id> <rel> <target> │
371
+ │ frontline object relation unlink <obj> <id> <rel> <target> │
372
+ │ frontline object relation get <obj> <id> <rel> │
373
+ │ frontline object relation find-by <obj> <rel> <target-id> │
374
+ ├──────────────────────────────────────────────────────────────────┤
375
+ │ VIEWS & RECORD TYPES │
376
+ │ frontline object record-type list <obj> │
377
+ │ frontline object record-type create <obj> --data '{...}' │
378
+ │ frontline object view list <obj> │
379
+ │ frontline object view create <rt-id> --data '{...}' │
380
+ ├──────────────────────────────────────────────────────────────────┤
381
+ │ EXPORT │
382
+ │ frontline object export xlsx <obj> [--query] [--output] │
383
+ │ frontline object export csv <obj> [--query] [--output] │
384
+ └──────────────────────────────────────────────────────────────────┘
385
+ ```