@getfrontline/cli
v1.0.17
Published
Frontline CLI — Public API (agents, workflows, billing, tables, objects) + Max chat/admin REST from your terminal
Maintainers
Readme
@getfrontline/cli
Unified Frontline command-line toolbox. Ships two binaries:
frontline— public REST API: agents, workflows, billing, tables, objects, raw GET, Claude Code skills setup.max— Max chat & admin REST (per-user API key as Bearer, interactive chat).
Installation
npm install -g @getfrontline/cliOr run without installing:
npx @getfrontline/cli --helpOutput format
All frontline commands print JSON to stdout by default (scripting-friendly). Opt into human-readable output with:
--pretty— key/value blocks, spinners, icons (to stderr-safe channels)--table— tabular rendering for list endpoints
Errors always go to stderr in human form and to stdout as structured JSON when the command was invoked in its default (non-pretty) mode.
frontline binary
Login
frontline auth login <api-key>The API key is shared between frontline and max automatically.
Switch / inspect profiles
frontline auth profiles list # all saved profiles + active one
frontline auth profiles use prod # change active profile
frontline auth whoami # hits /me with current profile
frontline auth logout # remove active profile
frontline auth logout --profile stagingCommands
Agents
frontline agents list
frontline agents list --status active
frontline agents create --name "Support Agent"
frontline agents use <agentId>
frontline agents describe
frontline agents update --name "Support Agent v2"
frontline agents deploy --offline false
frontline agents agent-setting get
frontline agents agent-setting update --data '{"instructions":"Answer concisely.","temperature":0.2,"aiModelId":1}'
frontline ai-models list --type TEXT --table
frontline agents theme get
frontline agents theme update --data '{"title":"Support","initialMessage":"Hi! How can I help?","placeholder":"Type your message...","avatar":null,"bubbleImage":null,"bubbleColor":"#111827","userMessageColor":"#2563eb","agentMessageColor":"#f3f4f6","bubbleAlignment":"RIGHT","progressIndicator":"DYNAMIC","verticalPositionInPixels":24}'
frontline agents settings get livechat
frontline agents settings update whatsapp --data '{"splitMessages":true,"splitCharacterLimit":500,"conversationClose":"NEVER","closeAfter":null,"timeUnit":null,"sendCloseMessage":false,"closeMessageType":"STATIC","closeMessage":null,"closeInstruction":null}'
frontline agents delete
frontline agents flows <agentId>
frontline agents flows list
frontline agents flows create --name "Order Routing"
frontline agents flows use 101
frontline agents flows describe --include-nodes
frontline agents flows graph --table
frontline agents flows <agentId> --status active
frontline agents variables list --table
frontline agents variables create --name customer_name --description "Captured customer name"
frontline agents variables check-name customer_name
frontline agents intents list --table
frontline agents intents create --name cancellation --phrases '["cancel order","stop subscription"]'
frontline agents analytics <agentId> --start-date 2025-01-01 --end-date 2025-12-31Agent-scoped commands use the active agent saved in the current CLI profile.
create selects the new agent automatically and use <agentId> switches context.
--agent-id overrides saved context for scripts and CI. Flow commands additionally
use the active flow; --flow-id overrides that context.
agents agent-setting update validates referenced IDs in the same command before
mutating when the Public API exposes the referenced resource, including
aiModelId and customToolIds. The backend still
performs the final validation for all references and ownership checks.
Discover available AI models before setting aiModelId:
frontline ai-models list --type TEXT --table
frontline ai-models default --type TEXT
frontline ai-models describe 1Build agent flow graphs without the UI:
frontline agents flows nodes create --data '{"nodeId":"start_1","type":"START","position":{"positionX":0,"positionY":0}}'
frontline agents flows nodes create --data '{"nodeId":"say_1","type":"SAY_AI","position":{"positionX":320,"positionY":0},"data":{"type":"SAY_AI","sayWithAi":false,"message":"Hello!"}}'
frontline agents flows edges add --source start_1 --source-handle default --target say_1 --target-handle default
frontline agents flows nodes update say_1 --data '{"alias":"Greeting"}'
frontline agents flows nodes delete say_1Manage agent variables and intents:
frontline agents variables list
frontline agents variables all
frontline agents variables create --name customer_name --description "Customer name"
frontline agents variables describe 123
frontline agents variables update 123 --name customer_name --pattern "^[A-Za-z ]+$"
frontline agents variables delete 123
frontline agents variables check-name customer_name
frontline agents intents list
frontline agents intents all
frontline agents intents create --name cancellation --phrases '["cancel order","stop subscription"]'
frontline agents intents describe 10
frontline agents intents update 10 --name cancellation --phrases '[{"id":1,"phrase":"cancel order"},{"phrase":"stop order"}]'
frontline agents intents delete 10
frontline agents intents generate-phrases --name cancellation --samples '["cancel order"]' --amount 5Variables are referenced in text fields as {VARIABLE_NAME}. The name must match
the variable exactly, including case. Agent flow text fields that support
replacement include API url, headers[].value, parameters[].value, body;
Say AI message and prompt; Response AI instructions; Tools AI
instructions; Conditional Routing AI conditions[].expression; and Dynamic
Tables rowId, search, and rowData values.
Tools
frontline tools list
frontline tools list --status ACTIVE --filter-text contact
frontline tools create --name "Fetch contact" --description "Fetches a CRM contact" --method GET --url "https://api.example.com/contacts/{{contactId}}" --arguments '[{"name":"contactId","dataType":"STRING"}]'
frontline tools describe 123
frontline tools update 123 --status PAUSED
frontline tools update 123 --headers '[{"key":"Authorization","value":"Bearer {{apiKey}}"}]'
frontline tools delete 123Public tools currently support API call tools only. WhatsApp template tools are
not exposed in this Public API/CLI surface yet. Complex fields like arguments,
headers, and queryParams are JSON arrays.
AI Models
frontline ai-models list
frontline ai-models list --type TEXT --table
frontline ai-models list --type TRANSCRIPTION
frontline ai-models default --type TEXT
frontline ai-models describe 1Use TEXT model IDs as aiModelId in frontline agents agent-setting update.
The update command validates aiModelId before sending the mutation.
Incoming Webhooks
frontline incoming-webhooks create --name "CRM payload"
frontline incoming-webhooks create --name "CRM payload" --description "Receives contacts"
frontline incoming-webhooks create --name "Open endpoint" --no-authenticationThe create response includes url and, when authentication is enabled,
accessToken. Store the token when you create it; existing webhook tokens are
not exposed by list/detail commands in this CLI surface.
Workflows
frontline workflows list
frontline workflows list --status active
frontline workflows create --name "Daily CRM Sync"
frontline workflows use 42
frontline workflows describe --include-nodes
frontline workflows update --name "Daily CRM Sync" --status ACTIVE
frontline workflows graph --table
frontline workflows variables list --table
frontline workflows variables create --name order_id --description "Order ID"
frontline workflows variables check-name order_id
frontline workflows analytics --start-date 2025-01-01 --end-date 2025-12-31
frontline workflows deleteWorkflow commands use the active workflow saved in the current CLI profile. create
selects the new workflow automatically and use <workflowId> switches context.
Every workflow-scoped command also accepts --workflow-id <id> for scripts and CI.
Build graphs without the UI:
frontline workflows nodes create --data '{"nodeId":"trigger_1","type":"TRIGGER","position":{"positionX":0,"positionY":0},"data":{"type":"TRIGGER","triggerType":"CONTACT_CREATED"}}'
frontline workflows nodes create --data '{"nodeId":"api_1","type":"API","position":{"positionX":320,"positionY":0},"data":{"type":"API","url":"https://example.com","method":"GET","headers":[]}}'
frontline workflows edges add --source trigger_1 --source-handle default --target api_1 --target-handle default
frontline workflows nodes update api_1 --data '{"alias":"Fetch external data"}'
frontline workflows nodes delete api_1
frontline workflows edges remove --source trigger_1 --source-handle default --target api_1 --target-handle defaultManage workflow variables:
frontline workflows variables list
frontline workflows variables all
frontline workflows variables create --name order_id --description "Order ID"
frontline workflows variables describe 123
frontline workflows variables update 123 --name order_id --pattern "^[0-9]+$"
frontline workflows variables delete 123
frontline workflows variables check-name order_idWorkflow variables use the same {VARIABLE_NAME} interpolation syntax. Automation
workflows also expose one runtime variable per node, with name = nodeId; for
example, a node with nodeId api_1 can be referenced later as {api_1}.
Interpolable automation fields include API url, headers[].value,
parameters[].value, body; Send Message / Say AI message and prompt;
Response AI instructions; Tools AI instructions and prompt; AI Capture
prompt and instructions; Data Transformer prompt; Conditional Routing AI
conditions[].expression; Dynamic Tables rowId, search, rowData values;
Transcription audioUrl; and WhatsApp template variables in
templateVariables.header, templateVariables.body, and
templateVariables.buttons.
Billing
frontline billing getRaw API requests
For endpoints not yet mapped to a command:
frontline api get /agents
frontline api get /agents --query status=active
frontline api get /workflows/123/analytics --query startDate=2025-01-01 endDate=2025-12-31Objects (CRM entities)
frontline object list
frontline object get people
frontline object schema deals
frontline object create --data '{"name":"custom_obj","displayName":"Custom","fields":[...]}'
frontline object update deals --data '{"displayName":"Deals v2"}'
frontline object count deals
frontline object delete custom_objectTables (spreadsheet-like)
frontline table list
frontline table get my_table
frontline table create my_table --data '{"displayName":"My Table","columns":[{"name":"Name","type":"string","metadata":{"format":"text"}}]}'
frontline table delete my_tableShared sub-commands (object & table)
Both object and table expose the same set of sub-commands:
| Command | Description |
| ---------------- | ----------------------------------------------- |
| field | Manage fields (columns) — CRUD |
| option | Manage select-field options — CRUD |
| record / row | Manage rows — list, get, create, update, delete |
| relation | Link / unlink related records |
| view | Manage views (object only) — CRUD |
| record-type | Manage record types (object only) |
| note | Notes on rows — CRUD |
| task | Tasks on rows — CRUD + complete / uncomplete |
| file | Files on rows — list, get, download, delete |
| aggregation | Aggregations — CRUD + compute |
| export | Export data as XLSX or CSV |
Run frontline <resource> <subcommand> --help for details and examples.
Global flags
Every frontline command accepts:
--api-key <key>— override stored API key for a single call--profile <name>— use a specific saved profile--debug— verbose request/response logs--pretty— human-readable output--table— tabular output for list endpoints
Claude Code Skills
Optional: install Frontline skills into Claude Code (auto-detected on npm install):
frontline setup --claude-skills # install new skills
frontline setup --claude-skills --force # overwrite existingSkills currently shipped:
- Reference (read first):
crm-objects,frontline-internals,frontline-docs - Public API:
frontline-agents,agent-builder,ai-models,tools,incoming-webhooks,variables,flow-builder,frontline-workflows,workflow-builder,frontline-billing,frontline-api - Max:
max-chat,max-auth - Table / Object CRUD:
auth-and-profiles,crm-setup,crud-operations,pipeline-setup,schema-design,resource-creation,record-type-management,relations,filter-and-query,files,notes-and-tasks,export-and-delete,aggregations
Debugging
frontline agents list --debugTroubleshooting
- "No API key found" — run
frontline auth login <key>. - "No Max API key found" (Max CLI) — run
max auth login <key>orfrontline auth login <key>on the same profile. - "Missing or invalid API key" — key expired / revoked. Generate a new one.
- "Request timed out" — check network.
- Rate limit — public API allows 1000 req/min per account.
max binary
Authentication uses the same API key as frontline. Logging in with either CLI keeps them in sync.
max --help
max auth login <api-key>
max auth whoami
max auth logout # clears Max + matching Frontline profile
max auth logout --keep-frontline # only clears the Max storeResponse shape and stdout
Max Public API responses are typically { "ok": true|false, "data": ... }. HTTP errors still use 4xx/5xx; logical failures may return 200 with ok: false (the CLI treats those as errors).
max "…"(root) andmax chat send: default stdout is one-line JSON (JSON.stringifyof the last response: POST, or last GET after polling). Use--prettyfor assistant plain text fromdata. Use--jsonto print only the POST body and skip polling.max conversations …: same idea — default one-line JSON;--prettyfor plain text when the CLI can infer it.max chat/ REPL: stdout is assistant plain text fromdatawhen possible (interactive UX); otherwise one-line JSON. No progress spinners on stdout.
Public API — Max conversations
| Method | Path (after base) |
| ------- | ------------------------------------------------- |
| POST | /max/conversations/message |
| GET | /max/conversations/:conversationId |
| PATCH | /max/conversations/:conversationId |
| POST | /max/conversations/:conversationId/abortMessage |
| GET | /max/conversations/ |
CLI:
max conversations list
max conversations get 123
max conversations update 123 --data '{"title":"Renamed"}'
max conversations abort 123
# alias: max conv listGlobal flags: --profile, --api-key, --pretty, --debug (same resolution as max chat send).
Chat with Max
After max auth login, you can send messages:
# Send message (uses last conversation by default)
max "Hola"
# Start a new conversation
max --new "Hola"
# Explicit conversation id
max --conversation 123 "Hola"
# Default: one-line JSON from the API; human reply with --pretty
max "Hola" --pretty
# Override API key for one run
max "Hola" --api-key flk_...
# Alternative explicit command form
max chat send "Hola"You can also start an interactive session (so you don't have to type max every time):
max chatInside the interactive prompt, use:
:helpfor commands:newto start a new conversation:conv <id>to switch conversations:exitto quit
