JSPM

@getfrontline/cli

1.0.3
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 9
    • Score
      100M100P100Q71291F
    • License MIT

    Frontline CLI — Public API (agents, workflows, billing, tables, objects) + Max chat/admin REST from your terminal

    Package Exports

    • @getfrontline/cli
    • @getfrontline/cli/dist/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@getfrontline/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    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/cli

    Or run without installing:

    npx @getfrontline/cli --help

    Output 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 staging

    Commands

    Agents

    frontline agents list
    frontline agents list --status active
    frontline agents flows <agentId>
    frontline agents flows <agentId> --status active
    frontline agents analytics <agentId> --start-date 2025-01-01 --end-date 2025-12-31

    Workflows

    frontline workflows list
    frontline workflows list --status active
    frontline workflows analytics <workflowId> --start-date 2025-01-01 --end-date 2025-12-31

    Billing

    frontline billing get

    Raw 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-31

    Objects (CRM entities)

    frontline object list
    frontline object get standard__people
    frontline object schema standard__deals
    frontline object create --data '{"name":"custom_obj","displayName":"Custom","fields":[...]}'
    frontline object update standard__deals --data '{"displayName":"Deals v2"}'
    frontline object count standard__deals
    frontline object delete standard__custom_object

    Tables (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_table

    Shared 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 existing

    Skills currently shipped:

    • Public API: frontline-agents, frontline-workflows, 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 --debug

    Troubleshooting

    • "No API key found" — run frontline auth login <key>.
    • "No Max API key found" (Max CLI) — run max auth login <key> or frontline 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 100 req/min.

    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 store

    Response 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) and max chat send: default stdout is one-line JSON (JSON.stringify of the last response: POST, or last GET after polling). Use --pretty for assistant plain text from data. Use --json to print only the POST body and skip polling.
    • max conversations …: same idea — default one-line JSON; --pretty for plain text when the CLI can infer it.
    • max chat / REPL: stdout is assistant plain text from data when 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 list

    Global 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 chat

    Inside the interactive prompt, use:

    • :help for commands
    • :new to start a new conversation
    • :conv <id> to switch conversations
    • :exit to quit