@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.
- package/README.md +319 -0
- package/dist/assets/logo3.png +0 -0
- package/dist/commands/agents/analytics.d.ts +3 -0
- package/dist/commands/agents/analytics.d.ts.map +1 -0
- package/dist/commands/agents/analytics.js +67 -0
- package/dist/commands/agents/analytics.js.map +1 -0
- package/dist/commands/agents/flows.d.ts +3 -0
- package/dist/commands/agents/flows.d.ts.map +1 -0
- package/dist/commands/agents/flows.js +47 -0
- package/dist/commands/agents/flows.js.map +1 -0
- package/dist/commands/agents/list.d.ts +3 -0
- package/dist/commands/agents/list.d.ts.map +1 -0
- package/dist/commands/agents/list.js +46 -0
- package/dist/commands/agents/list.js.map +1 -0
- package/dist/commands/api/raw.d.ts +3 -0
- package/dist/commands/api/raw.d.ts.map +1 -0
- package/dist/commands/api/raw.js +54 -0
- package/dist/commands/api/raw.js.map +1 -0
- package/dist/commands/auth/login.d.ts +3 -0
- package/dist/commands/auth/login.d.ts.map +1 -0
- package/dist/commands/auth/login.js +39 -0
- package/dist/commands/auth/login.js.map +1 -0
- package/dist/commands/auth/logout.d.ts +3 -0
- package/dist/commands/auth/logout.d.ts.map +1 -0
- package/dist/commands/auth/logout.js +16 -0
- package/dist/commands/auth/logout.js.map +1 -0
- package/dist/commands/auth/profiles.d.ts +3 -0
- package/dist/commands/auth/profiles.d.ts.map +1 -0
- package/dist/commands/auth/profiles.js +72 -0
- package/dist/commands/auth/profiles.js.map +1 -0
- package/dist/commands/auth/whoami.d.ts +3 -0
- package/dist/commands/auth/whoami.d.ts.map +1 -0
- package/dist/commands/auth/whoami.js +46 -0
- package/dist/commands/auth/whoami.js.map +1 -0
- package/dist/commands/billing/get.d.ts +3 -0
- package/dist/commands/billing/get.d.ts.map +1 -0
- package/dist/commands/billing/get.js +42 -0
- package/dist/commands/billing/get.js.map +1 -0
- package/dist/commands/object/aggregation.d.ts +3 -0
- package/dist/commands/object/aggregation.d.ts.map +1 -0
- package/dist/commands/object/aggregation.js +78 -0
- package/dist/commands/object/aggregation.js.map +1 -0
- package/dist/commands/object/export.d.ts +3 -0
- package/dist/commands/object/export.d.ts.map +1 -0
- package/dist/commands/object/export.js +98 -0
- package/dist/commands/object/export.js.map +1 -0
- package/dist/commands/object/field.d.ts +3 -0
- package/dist/commands/object/field.d.ts.map +1 -0
- package/dist/commands/object/field.js +76 -0
- package/dist/commands/object/field.js.map +1 -0
- package/dist/commands/object/file.d.ts +3 -0
- package/dist/commands/object/file.d.ts.map +1 -0
- package/dist/commands/object/file.js +105 -0
- package/dist/commands/object/file.js.map +1 -0
- package/dist/commands/object/index.d.ts +3 -0
- package/dist/commands/object/index.d.ts.map +1 -0
- package/dist/commands/object/index.js +136 -0
- package/dist/commands/object/index.js.map +1 -0
- package/dist/commands/object/note.d.ts +3 -0
- package/dist/commands/object/note.d.ts.map +1 -0
- package/dist/commands/object/note.js +62 -0
- package/dist/commands/object/note.js.map +1 -0
- package/dist/commands/object/option.d.ts +3 -0
- package/dist/commands/object/option.d.ts.map +1 -0
- package/dist/commands/object/option.js +78 -0
- package/dist/commands/object/option.js.map +1 -0
- package/dist/commands/object/record-type.d.ts +3 -0
- package/dist/commands/object/record-type.d.ts.map +1 -0
- package/dist/commands/object/record-type.js +73 -0
- package/dist/commands/object/record-type.js.map +1 -0
- package/dist/commands/object/record.d.ts +3 -0
- package/dist/commands/object/record.d.ts.map +1 -0
- package/dist/commands/object/record.js +128 -0
- package/dist/commands/object/record.js.map +1 -0
- package/dist/commands/object/relation.d.ts +3 -0
- package/dist/commands/object/relation.d.ts.map +1 -0
- package/dist/commands/object/relation.js +73 -0
- package/dist/commands/object/relation.js.map +1 -0
- package/dist/commands/object/task.d.ts +3 -0
- package/dist/commands/object/task.d.ts.map +1 -0
- package/dist/commands/object/task.js +88 -0
- package/dist/commands/object/task.js.map +1 -0
- package/dist/commands/object/view.d.ts +3 -0
- package/dist/commands/object/view.d.ts.map +1 -0
- package/dist/commands/object/view.js +118 -0
- package/dist/commands/object/view.js.map +1 -0
- package/dist/commands/setup/claudeSkills.d.ts +3 -0
- package/dist/commands/setup/claudeSkills.d.ts.map +1 -0
- package/dist/commands/setup/claudeSkills.js +84 -0
- package/dist/commands/setup/claudeSkills.js.map +1 -0
- package/dist/commands/table/aggregation.d.ts +3 -0
- package/dist/commands/table/aggregation.d.ts.map +1 -0
- package/dist/commands/table/aggregation.js +78 -0
- package/dist/commands/table/aggregation.js.map +1 -0
- package/dist/commands/table/export.d.ts +3 -0
- package/dist/commands/table/export.d.ts.map +1 -0
- package/dist/commands/table/export.js +97 -0
- package/dist/commands/table/export.js.map +1 -0
- package/dist/commands/table/field.d.ts +3 -0
- package/dist/commands/table/field.d.ts.map +1 -0
- package/dist/commands/table/field.js +76 -0
- package/dist/commands/table/field.js.map +1 -0
- package/dist/commands/table/file.d.ts +3 -0
- package/dist/commands/table/file.d.ts.map +1 -0
- package/dist/commands/table/file.js +106 -0
- package/dist/commands/table/file.js.map +1 -0
- package/dist/commands/table/index.d.ts +3 -0
- package/dist/commands/table/index.d.ts.map +1 -0
- package/dist/commands/table/index.js +142 -0
- package/dist/commands/table/index.js.map +1 -0
- package/dist/commands/table/note.d.ts +3 -0
- package/dist/commands/table/note.d.ts.map +1 -0
- package/dist/commands/table/note.js +62 -0
- package/dist/commands/table/note.js.map +1 -0
- package/dist/commands/table/option.d.ts +3 -0
- package/dist/commands/table/option.d.ts.map +1 -0
- package/dist/commands/table/option.js +78 -0
- package/dist/commands/table/option.js.map +1 -0
- package/dist/commands/table/relation.d.ts +3 -0
- package/dist/commands/table/relation.d.ts.map +1 -0
- package/dist/commands/table/relation.js +74 -0
- package/dist/commands/table/relation.js.map +1 -0
- package/dist/commands/table/row.d.ts +3 -0
- package/dist/commands/table/row.d.ts.map +1 -0
- package/dist/commands/table/row.js +124 -0
- package/dist/commands/table/row.js.map +1 -0
- package/dist/commands/table/task.d.ts +3 -0
- package/dist/commands/table/task.d.ts.map +1 -0
- package/dist/commands/table/task.js +88 -0
- package/dist/commands/table/task.js.map +1 -0
- package/dist/commands/workflows/analytics.d.ts +3 -0
- package/dist/commands/workflows/analytics.d.ts.map +1 -0
- package/dist/commands/workflows/analytics.js +60 -0
- package/dist/commands/workflows/analytics.js.map +1 -0
- package/dist/commands/workflows/list.d.ts +3 -0
- package/dist/commands/workflows/list.d.ts.map +1 -0
- package/dist/commands/workflows/list.js +47 -0
- package/dist/commands/workflows/list.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +73 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/auth.d.ts +13 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +40 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/config.d.ts +28 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +77 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/errors.d.ts +13 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +31 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/globalOpts.d.ts +23 -0
- package/dist/lib/globalOpts.d.ts.map +1 -0
- package/dist/lib/globalOpts.js +40 -0
- package/dist/lib/globalOpts.js.map +1 -0
- package/dist/lib/helpEpilog.d.ts +18 -0
- package/dist/lib/helpEpilog.d.ts.map +1 -0
- package/dist/lib/helpEpilog.js +56 -0
- package/dist/lib/helpEpilog.js.map +1 -0
- package/dist/lib/httpClient.d.ts +50 -0
- package/dist/lib/httpClient.d.ts.map +1 -0
- package/dist/lib/httpClient.js +196 -0
- package/dist/lib/httpClient.js.map +1 -0
- package/dist/lib/output.d.ts +38 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +131 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/max/browserLogin.d.ts +15 -0
- package/dist/max/browserLogin.d.ts.map +1 -0
- package/dist/max/browserLogin.js +164 -0
- package/dist/max/browserLogin.js.map +1 -0
- package/dist/max/commands/auth/login.d.ts +3 -0
- package/dist/max/commands/auth/login.d.ts.map +1 -0
- package/dist/max/commands/auth/login.js +58 -0
- package/dist/max/commands/auth/login.js.map +1 -0
- package/dist/max/commands/auth/logout.d.ts +3 -0
- package/dist/max/commands/auth/logout.d.ts.map +1 -0
- package/dist/max/commands/auth/logout.js +23 -0
- package/dist/max/commands/auth/logout.js.map +1 -0
- package/dist/max/commands/auth/whoami.d.ts +3 -0
- package/dist/max/commands/auth/whoami.d.ts.map +1 -0
- package/dist/max/commands/auth/whoami.js +46 -0
- package/dist/max/commands/auth/whoami.js.map +1 -0
- package/dist/max/commands/chat/repl.d.ts +3 -0
- package/dist/max/commands/chat/repl.d.ts.map +1 -0
- package/dist/max/commands/chat/repl.js +104 -0
- package/dist/max/commands/chat/repl.js.map +1 -0
- package/dist/max/commands/chat/send.d.ts +25 -0
- package/dist/max/commands/chat/send.d.ts.map +1 -0
- package/dist/max/commands/chat/send.js +163 -0
- package/dist/max/commands/chat/send.js.map +1 -0
- package/dist/max/commands/conversations/abort.d.ts +3 -0
- package/dist/max/commands/conversations/abort.d.ts.map +1 -0
- package/dist/max/commands/conversations/abort.js +55 -0
- package/dist/max/commands/conversations/abort.js.map +1 -0
- package/dist/max/commands/conversations/get.d.ts +3 -0
- package/dist/max/commands/conversations/get.d.ts.map +1 -0
- package/dist/max/commands/conversations/get.js +42 -0
- package/dist/max/commands/conversations/get.js.map +1 -0
- package/dist/max/commands/conversations/index.d.ts +3 -0
- package/dist/max/commands/conversations/index.d.ts.map +1 -0
- package/dist/max/commands/conversations/index.js +16 -0
- package/dist/max/commands/conversations/index.js.map +1 -0
- package/dist/max/commands/conversations/list.d.ts +3 -0
- package/dist/max/commands/conversations/list.d.ts.map +1 -0
- package/dist/max/commands/conversations/list.js +35 -0
- package/dist/max/commands/conversations/list.js.map +1 -0
- package/dist/max/commands/conversations/update.d.ts +3 -0
- package/dist/max/commands/conversations/update.d.ts.map +1 -0
- package/dist/max/commands/conversations/update.js +53 -0
- package/dist/max/commands/conversations/update.js.map +1 -0
- package/dist/max/jwtDecode.d.ts +5 -0
- package/dist/max/jwtDecode.d.ts.map +1 -0
- package/dist/max/jwtDecode.js +19 -0
- package/dist/max/jwtDecode.js.map +1 -0
- package/dist/max/lib/auth.d.ts +20 -0
- package/dist/max/lib/auth.d.ts.map +1 -0
- package/dist/max/lib/auth.js +53 -0
- package/dist/max/lib/auth.js.map +1 -0
- package/dist/max/lib/httpClient.d.ts +25 -0
- package/dist/max/lib/httpClient.d.ts.map +1 -0
- package/dist/max/lib/httpClient.js +138 -0
- package/dist/max/lib/httpClient.js.map +1 -0
- package/dist/max/lib/maxResponse.d.ts +30 -0
- package/dist/max/lib/maxResponse.d.ts.map +1 -0
- package/dist/max/lib/maxResponse.js +132 -0
- package/dist/max/lib/maxResponse.js.map +1 -0
- package/dist/max/lib/publicApiPaths.d.ts +12 -0
- package/dist/max/lib/publicApiPaths.d.ts.map +1 -0
- package/dist/max/lib/publicApiPaths.js +15 -0
- package/dist/max/lib/publicApiPaths.js.map +1 -0
- package/dist/max/maxConfig.d.ts +31 -0
- package/dist/max/maxConfig.d.ts.map +1 -0
- package/dist/max/maxConfig.js +50 -0
- package/dist/max/maxConfig.js.map +1 -0
- package/dist/max/ui/banner.d.ts +3 -0
- package/dist/max/ui/banner.d.ts.map +1 -0
- package/dist/max/ui/banner.js +96 -0
- package/dist/max/ui/banner.js.map +1 -0
- package/dist/max.d.ts +3 -0
- package/dist/max.d.ts.map +1 -0
- package/dist/max.js +94 -0
- package/dist/max.js.map +1 -0
- package/dist/scripts/postinstall.d.ts +8 -0
- package/dist/scripts/postinstall.d.ts.map +1 -0
- package/dist/scripts/postinstall.js +149 -0
- package/dist/scripts/postinstall.js.map +1 -0
- package/dist/skills/aggregations/SKILL.md +122 -0
- package/dist/skills/auth-and-profiles/SKILL.md +102 -0
- package/dist/skills/crm-setup/SKILL.md +385 -0
- package/dist/skills/crud-operations/SKILL.md +287 -0
- package/dist/skills/export-and-delete/SKILL.md +96 -0
- package/dist/skills/files/SKILL.md +70 -0
- package/dist/skills/filter-and-query/SKILL.md +199 -0
- package/dist/skills/frontline-agents/SKILL.md +99 -0
- package/dist/skills/frontline-api/SKILL.md +59 -0
- package/dist/skills/frontline-billing/SKILL.md +42 -0
- package/dist/skills/frontline-workflows/SKILL.md +72 -0
- package/dist/skills/max-auth/SKILL.md +76 -0
- package/dist/skills/max-chat/SKILL.md +111 -0
- package/dist/skills/notes-and-tasks/SKILL.md +128 -0
- package/dist/skills/pipeline-setup/SKILL.md +233 -0
- package/dist/skills/record-type-management/SKILL.md +104 -0
- package/dist/skills/relations/SKILL.md +153 -0
- package/dist/skills/resource-creation/SKILL.md +86 -0
- package/dist/skills/schema-design/SKILL.md +263 -0
- 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
|
+
```
|