SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

SCHEDULE A DEMO

CLI Reference

HIBE CLI Reference

Complete command reference for the public HIBE CLI. Use it directly, inside your own agents, or through the built-in Agents experience.

Copies all commands as an agent-ready markdown prompt.

Roles at a glance

  • sales — read, search, comment, intake, entity writes, stage set, scheduling. Calendar connection stays in Integrations.
  • admin-crew — everything sales can do, plus pipeline management and field required/optional toggles.
  • admin / admin-sales — everything above, plus lifecycle stage definition, sync, projection, bulk imports, and merge.
  • super-admin — full CLI surface, including field-definition updates, archive/unarchive, and merge.

Important reminders

  • Salespeople connect calendars from Integrations, not from the CLI prompt or agent chat.
  • Inspect current CRM state before proposing pipeline, field, or lifecycle-stage changes.
  • Use propose-then-confirm before mutations. Admin roles can toggle required fields; only super-admin can fully modify field definitions.

Getting Started

The public hibe CLI is distributed as an npm package. No backend repo access is needed. Install globally with pnpm or npm, or run directly with npx.

Agent runtime invocation

  • For agentic or sandbox execution, prefer npx -y hibe-cli@latest ....
  • Do not assume a plain hibe binary is already installed in ephemeral runtimes.
pnpm add -g hibe-cli
npm install -g hibe-cli
npx -y hibe-cli@latest whoami
pnpm add -g hibe-cli@latest
npm install -g hibe-cli@latest
hibe --version
npx -y hibe-cli@latest --version

The CLI prints JSON by default so agents can consume it directly.

  • Default output: pretty JSON.
  • --json: compact JSON for cleaner machine piping.
hibe crm jobs search --q "123 Main St"

Authentication

The CLI supports interactive login with a saved local session, personal access tokens for agents and CI, and direct bearer use of the normal app JWT.

Auth precedence

  • --token
  • HIBE_TOKEN
  • Saved session from hibe login

API base URL precedence

  • --api-url
  • HIBE_API_URL
  • Saved session API URL
  • http://localhost:3000/v1

Environment variables

export HIBE_API_URL="https://api.theunitedpayments.com/v1/"
export HIBE_TOKEN="hibe_pat_xxx.yyy"

If a frontend user is already authenticated with the normal app JWT, you can pass that JWT through directly or exchange it for a short-lived CLI token.

Direct JWT passthrough

export HIBE_API_URL="https://api.theunitedpayments.com/v1/"
export HIBE_TOKEN="<frontend-jwt>"
npx -y hibe-cli@latest crm pipeline list

Preferred sandbox exchange (tighter scope and TTL)

POST /v1/agent/cli-token
Authorization: Bearer <frontend-jwt>
Content-Type: application/json

{
  "purpose": "plan"
}

Purposes

  • plancrm.pipeline.read
  • executecrm.pipeline.read, crm.pipeline.write

The exchange token expires after 10 minutes and preserves the same user, org, and role identity.

hibe login --email "jane@example.com" --password "secret" --api-url "https://api.theunitedpayments.com/v1/"
hibe whoami
hibe logout

List available tokens, create scoped or full-access tokens, and revoke them.

hibe token list
hibe token create --name "agent-default"
hibe token create --name "pipeline-bot" --scope crm.pipeline.read crm.pipeline.write
hibe token create --name "temporary-ci" --scope crm.read schedule.read --expires-at "2026-12-31T23:59:59.000Z"
hibe token revoke 12

Supported scopes

*crm.readcrm.writecrm.field.readcrm.field.writecrm.pipelinecrm.pipeline.readcrm.pipeline.writecrm.stagecrm.importcrm.mergeschedule.readschedule.write

Legacy aliases

  • crm.pipeline still grants both crm.pipeline.read and crm.pipeline.write.
  • crm.read is accepted for crm.field.read.
  • crm.write is accepted for crm.field.write.

Pipeline

Pipeline commands are admin-only for admin-crew, admin-sales, admin, and super-admin.

Scope mapping

  • hibe crm pipeline listcrm.pipeline.read
  • hibe crm pipeline stages --pipeline jobscrm.pipeline.read
  • hibe crm pipeline create-stage ...crm.pipeline.write
  • hibe crm pipeline rename-stage ...crm.pipeline.write
  • hibe crm pipeline delete-stage ...crm.pipeline.write
  • hibe crm pipeline reorder ...crm.pipeline.write
  • hibe crm pipeline map-source-stage ...crm.pipeline.write
hibe crm pipeline list
hibe crm pipeline stages --pipeline jobs
hibe crm pipeline create-stage --pipeline jobs --key inspection --label "Inspection" --order 3
hibe crm pipeline rename-stage --pipeline jobs --from inspection --label "Inspection Scheduled"
hibe crm pipeline rename-stage --pipeline jobs --from signed --to contract_signed
hibe crm pipeline delete-stage --pipeline jobs --key booking --reassign-to inspection
hibe crm pipeline create-stage --pipeline jobs --key lead --label "Lead" --order 1 --default
hibe crm pipeline create-stage --pipeline jobs --key lost --label "Lost" --order 7 --terminal --outcome lost
hibe crm pipeline reorder --pipeline jobs --order "lead,booking,inspection,in_signature,signed,job_scheduled,lost"
hibe crm pipeline map-source-stage --pipeline jobs --source "acculynx" --from "Signed Contract" --to "signed"

Role behavior

  • sales users can consume CRM data and run sales-safe commands, but cannot mutate pipeline configuration.

Fields

Sales can list active fields, admin roles can toggle required status, and only super-admin can fully modify definitions.

Scope mapping

  • hibe crm fields listcrm.field.read
  • hibe crm fields set-required ...crm.field.write
  • hibe crm fields update ...crm.field.write
  • hibe crm fields archive ...crm.field.write
  • hibe crm fields unarchive ...crm.field.write
  • hibe crm fields merge ...crm.field.write
hibe crm fields list
hibe crm fields list --entity opportunity
hibe crm fields list --entity person --status all
hibe crm fields set-required --id 41 --value true
hibe crm fields set-required --id 41 --value false
hibe crm fields update --id 41 --label "Insurance Carrier" --description "Carrier on the claim"
hibe crm fields update --id 41 --metadata '{"required":true,"group":"claims"}'
hibe crm fields update --id 41 --file ./examples/field-update.json
hibe crm fields archive --id 41 --reason "Replaced by normalized carrier field"
hibe crm fields unarchive --id 41
hibe crm fields merge --source 41 --target 12 --reason "Consolidate duplicate claim carrier fields"

Role behavior

  • sales users can list active field definitions.
  • admin, admin-sales, admin-crew, and super-admin can toggle required.
  • Only super-admin can update, archive, unarchive, or merge field definitions.

CRM Data

hibe crm schemas

If --job-name is omitted, --title is reused as the CRM job name. If the title looks like 001 - Ana Duque - Roof Replacement, intake also infers job_number = 001, so the record stays searchable even when only the title was supplied. Intake also upserts the homeowner as a CRM person and the address as a CRM property immediately, and the response includes personId.

hibe crm intake --name "Ana Duque" --title "001 - Ana Duque - Roof Replacement" --email "ana@example.com" --phone "555-1234" --address "936 Falling Water Rd" --city "Manchester" --state "FL" --zip "33326" --lead-source "referral" --notes "Requested inspection"
hibe crm intake --name "Ana Duque" --title "Roof Replacement" --job-name "001 - Ana Duque - Roof Replacement" --email "ana@example.com" --phone "555-1234" --address "936 Falling Water Rd" --city "Manchester" --state "FL" --zip "33326"

Immediately after intake

hibe crm show person "Ana Duque"
hibe crm card person 123
hibe crm graph person "Ana Duque"
hibe crm sync-user
hibe crm sync-user --user-id 42
hibe crm project-hibe-jobs --limit 200 --offset 0

Use this to confirm that an intake/opportunity exists. It searches CRM opportunities by job_number, job_name, customer name, title, and address, and also surfaces the linked hibe_integrations.hibe_jobs row when the opportunity has been approved.

hibe crm jobs search --q "JOB-10452"
hibe crm jobs search --q "123 Main St"
hibe crm jobs search --q "Jane Doe"
hibe crm jobs search --q "001"
hibe crm comment add --job 1872 --body "Customer confirmed for Friday"
hibe crm comment add --job-search "123 Main St" --body "Left voicemail"
hibe crm comment add --opportunity 44 --body "Insurance docs received"
hibe crm comment list --job 1872
hibe crm comment list --job-search "123 Main St"

You can send JSON with --file or --stdin, or use flags for common fields.

crm add supports

personcompanyinteractiontaskintroopportunityleadartifact

crm upsert supports

personcompany
hibe crm add person --first "Jane" --last "Doe" --email "jane@example.com" --phone "555-1234" --stage lead
hibe crm add company --file ./examples/company.json
cat ./examples/person.json | hibe crm upsert person --stdin
hibe crm add interaction --type meeting --summary "Roof inspection completed" --body "Measured hail damage and took photos" --person-ids "10,11" --company-ids "5"
hibe crm add task --title "Send estimate" --status not_started --priority high --assigned-to 42 --opportunity-ids "77"
hibe crm add opportunity --title "Jane Doe - Main St" --company-id 5 --person-ids "10" --stage inspection --status open --value 18000
hibe crm add opportunity --title "001 - Ana Duque - Roof Replacement" --stage lead --status open --custom-properties '{"job_number":"001","job_name":"Ana Duque - Roof Replacement"}'
hibe crm add lead --entity-type person --entity-id 10 --source-type form --source-name "Website Form"
hibe crm add artifact --upload ./photos/inspection-front.jpg --opportunity-id 77 --description "Front slope hail impact"
hibe crm add artifact --upload ./docs/signed-estimate.pdf --opportunity-id 77 --artifact-type pdf --description "Signed estimate"
hibe crm add artifact --url "https://example.com/files/inspection-report.pdf" --opportunity-id 77 --name "Inspection Report"

Notes

  • crm add opportunity creates a CRM opportunity and can now accept custom_properties.
  • crm add opportunity no longer requires --company-id.
  • crm add artifact --upload ... uses authenticated multipart upload and supports image files plus PDFs.
  • crm add artifact --url ... skips file upload and registers an existing public file as a CRM artifact.
  • Artifacts create a crm_artifacts row and log a file_uploaded interaction tied to the target record for audit/timeline visibility.
  • If you later book the opportunity with hibe schedule book --opportunity <id> ..., the backend creates a crm_appointments row and calendar event. Booking does not write hibe_core, and it does not materialize hibe_integrations.hibe_jobs unless the opportunity is already approved.

Setting custom values on existing records

Use this when the record already exists and you want to set or correct custom field values without archiving/recreating it.

  • hibe crm values set ...crm.write
hibe crm values set opportunity --id 4 --values '{"job_number":"001"}'
hibe crm values set opportunity --id 4 --values '{"job_number":"001","job_name":"Ana Duque - Roof Replacement"}' --reason "Finalize searchable job values"
hibe crm stages list opportunity
hibe crm stage define opportunity --key inspection --label "Inspection" --order 1
hibe crm stage define opportunity --file ./examples/opportunity-stages.json
hibe crm stage set opportunity --id 77 --to signed --reason "Contract returned"
hibe crm stage validate opportunity --stage inspection

Viewers — local vs shared

All view commands support --open for local usage and --share for cloud/sandbox usage. Without either flag, commands print JSON.

hibe crm show person 10
hibe crm show person "Ana Duque"
hibe crm show company "Acme Roofing"
hibe crm card person "Ana Duque"
hibe crm card company "Acme Roofing"
hibe crm graph person 10
hibe crm graph person "Ana Duque"
hibe crm graph company "Acme Roofing"
hibe crm graph-path --from "person:10" --to "company:5"

Open the Persona360 viewer locally or generate a shared cloud viewer:

hibe crm show person 10 --open --json
hibe crm show person 10 --share --json
hibe crm card person "Ana Duque" --open --json
hibe crm card person "Ana Duque" --share --json
hibe crm graph person 10 --open --json
hibe crm graph person 10 --share --json
hibe crm graph-path --from "person:10" --to "company:5" --open --json

Viewer mode

  • Local terminal usage → --open
  • Cloud or sandbox usage → --share

Imports & extraction

hibe crm import csv person --file ./data/people.csv
hibe crm import text --file ./notes/customer-note.txt
hibe crm import text --file ./notes/customer-note.txt --apply
hibe crm extract --file ./notes/call-summary.txt
hibe crm extract --file ./notes/call-summary.txt --apply

hibe crm query is a plain keyword search helper. It is not the right command to render cards/graphs and it is not the right command to verify opportunities/jobs. For cards and graphs, use the explicit show / card / graph commands. For opportunity/job lookup, use hibe crm jobs search --q ....

hibe crm query --q "Jane Doe"
hibe crm query --q "Acme Roofing"
hibe crm show person "Jane Doe"
hibe crm card person "Jane Doe"
hibe crm graph person "Jane Doe"
hibe crm merge person --source 15 --target 10 --reason "Duplicate contact"

Scheduling

The public CLI handles scheduling operations like org-wide user inspection, role-scoped availability checks, per-user status inspection, coverage management, availability, and booking. Calendar connection setup still starts on frontend HTTP, but the CLI can inspect saved calendar state, availability, and read/write salesperson coverage.

Notes

  • hibe schedule users lists active organization users across all active org roles by default.
  • Repeat --role to limit the roster, for example --role sales --role super-admin.
  • --connected-only narrows to users with connected calendars.
  • --ready-only narrows to users whose saved scheduling state is ready.
  • hibe schedule availability considers all active org roles by default.
  • Repeat --role on availability to narrow the candidate pool.
  • hibe schedule status is per salesperson; without --salesperson, it inspects the authenticated user.
  • Do not use hibe crm query for calendar, coverage, availability, booking, or other scheduling questions.

Users

hibe schedule users
hibe schedule users --role sales
hibe schedule users --role super-admin
hibe schedule users --role sales --role super-admin
hibe schedule users --connected-only
hibe schedule users --ready-only

Status

hibe schedule status
hibe schedule status --salesperson 172

Coverage

hibe schedule coverage get
hibe schedule coverage get --salesperson 172
hibe schedule coverage set --lat 29.7604 --lng -95.3698 --radius-miles 25
hibe schedule coverage set --salesperson 172 --lat 29.7604 --lng -95.3698 --radius-miles 25 --notes "Houston metro"

Availability

hibe schedule availability --date 2026-04-20 --lat 29.7604 --lng -95.3698 --role sales --role super-admin
hibe schedule availability --date 2026-04-20 --job 1872
hibe schedule availability --date 2026-04-20 --job-search "123 Main St"

Book

hibe schedule book --job 1872 --salesperson 42 --start "2026-04-20T15:00:00.000Z"
hibe schedule book --opportunity 77 --salesperson 42 --start "2026-04-20T15:00:00.000Z" --end "2026-04-20T16:00:00.000Z" --title "Inspection" --description "Initial roof inspection"

Reschedule and cancel

hibe schedule appointment get --appointment 12
hibe schedule reschedule --appointment 12 --start "2026-04-21T17:00:00.000Z"
hibe schedule cancel --appointment 12 --reason "Customer requested a later date"

Metrics

These commands answer "who sold what, in what" questions. They all exclude cancelled jobs (status = CANCELLED) and aggregate over approved_date.

hibe metrics sales leaderboard --preset this_month
hibe metrics sales leaderboard --preset last_month --limit 20
hibe metrics sales leaderboard --start-date 2026-04-01 --end-date 2026-04-30

hibe metrics sales by-person --email "jane@example.com" --preset this_month
hibe metrics sales by-person --name "Jane Doe" --preset last_month --limit 50

hibe metrics sales by-job-type --preset this_month
hibe metrics sales by-job-type --start-date 2026-01-01 --end-date 2026-03-31
  • leaderboard returns each salesperson with deals closed, total contract amount, average deal size, and rank.
  • by-person requires --name or --email. Use --email to disambiguate when names collide.
  • by-job-type returns one row per job type (GENERAL, REPLACEMENT, REPAIRS, MAINTENANCE, ROOF, ROOF_REJUVENATION, GUTTER, NEW_CONSTRUCTION, LIGHTNING).

AI review pipeline

The AI review pipeline compares each payment request against its work order and emits flags when the two disagree.

hibe metrics ai-review flagged-jobs --preset this_month
hibe metrics ai-review flagged-jobs --preset last_month --severity HIGH --limit 50
hibe metrics ai-review flagged-jobs --start-date 2026-04-01 --end-date 2026-04-30 --severity MEDIUM

Returns a summary (total reviews, flagged reviews, severity counts, top flag categories) and a list of reviewed payment requests with the linked job, crew job, severity, AI flags, and recommended next step.

Invoice verification

hibe metrics invoice-verification flagged-items --preset this_month
hibe metrics invoice-verification flagged-items --preset this_month --reason overcharge
hibe metrics invoice-verification flagged-items --preset last_month --supplier "ABC Supply" --reason overcharge
hibe metrics invoice-verification flagged-items --preset this_month --unresolved --limit 500

Groups flagged invoice line items by supplier. For each supplier the response includes:

  • Supplier name, email (from the registered supplier mapping when available, otherwise the email parsed from the invoice), and phone.
  • Total overcharge, total undercharge, net overcharge.
  • The flagged line items with invoice number, PO number, description, expected price, actual price, and delta.

This is the data shape to use when an agent is asked something like "give me items flagged this month with overcharge and prepare an email to the supplier with the items". The CLI returns the structured data; the agent composes and sends the email.

--reason accepts overcharge, undercharge, or any (default). --resolved and --unresolved filter by the invoice resolution flag.

Training

hibe metrics training users --preset this_month
hibe metrics training users --preset last_3_months --active-only --limit 50
hibe metrics training users

Returns the learners who have read at least one topic or submitted at least one quiz in the window, with topics read, quiz submissions, and average score. When run without a --preset or date range, returns all-time training activity.

The response carries a notes block flagging that time spent in training and money spent on training are not tracked in the current schema.

Reference

The backend enforces org-role access per command.

  • sales: read/search/comment/intake/entity writes/stage set/scheduling.
  • admin-crew: everything above plus pipeline management and field required/optional toggles.
  • admin-sales and admin: everything above plus lifecycle stage definition, sync, projection, bulk imports, merge.
  • super-admin: bypasses org-role gates and can use the full CLI surface.

Calendar connection setup still starts with frontend/API calls. The CLI can inspect saved calendar state and manage coverage, but the product UI still uses these endpoints for calendar connection setup and direct connection management.

  • POST /v1/scheduling/calendar/me/link-token
  • POST /v1/scheduling/calendar/me/connect
  • GET /v1/scheduling/calendar/me
  • DELETE /v1/scheduling/calendar/me/:id