/kaseya-bms:kaseya-bms <command> [args] | install cli|mcpfrom kaseya-bms
CLI and MCP server for Kaseya BMS PSA: tickets, CRM, contracts, finance, projects with offline sync and analytics. Use for queue triage, contract-burn checks, unbilled time review, and pipeline walks.
Ships in kaseya-bms. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill drives the kaseya-bms-cli binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
bash <(curl -fsSL https://raw.githubusercontent.com/Servosity/msp-skills/main/skills/kaseya-bms/install.sh)
iwr -useb https://raw.githubusercontent.com/Servosity/msp-skills/main/skills/kaseya-bms/install.ps1 | iex
kaseya-bms-cli --version~/.local/bin (macOS / Linux) or %LOCALAPPDATA%\Programs\msp-skills (Windows) is on $PATH.The installer downloads the kaseya-bms-cli and kaseya-bms-mcp binaries into ~/.local/bin
(macOS / Linux) or %LOCALAPPDATA%\Programs\msp-skills (Windows). It does not
register the skill with your agent and writes no MCP client config - see
mcp-install.md for that wire-up.
If --version reports "command not found" after install, the runtime cannot see the binary directory on $PATH. Do not proceed with skill commands until verification succeeds.
Kaseya BMS has a 433-operation official API and zero CLI ecosystem. This binary covers the whole surface - tickets, CRM, contracts, finance, projects - and mirrors core entities into local SQLite so dispatch questions like 'queue-health', 'stale-tickets', and 'contract-burn' answer instantly without burning the 500/hour/endpoint rate limit.
Use this CLI when an agent or operator needs Kaseya BMS PSA data or actions from the terminal: triaging service-desk queues, checking contract hours before authorizing work, reviewing unbilled time, walking the sales pipeline, or creating and updating tickets. The local SQLite mirror makes it the right choice for repeated analytical questions that would otherwise hammer the rate-limited API.
Do not use this CLI for:
queue-health - See open ticket volume by queue, priority, and status in one shot, with stale counts flagged before the morning standup.
Reach for this when asked how the service desk looks right now - it answers in one local query instead of paging the tickets endpoint.
kaseya-bms-cli queue-health --agent
stale-tickets - List open tickets that have not been touched in N days, oldest first, with account and assignee so nothing rots in the queue.
Use this for SLA-risk and aging-ticket questions instead of listing all tickets and filtering by hand.
kaseya-bms-cli stale-tickets --days 7 --agent
workload - Open and in-progress ticket load per assignee, flagging who is overloaded and who has slack before you dispatch the next ticket.
Pick this when deciding who should take a ticket; it is one command instead of one query per technician.
kaseya-bms-cli workload --agent
contract-burn - Per-contract burn picture: hours consumed, open tickets, and how much of the contract period has elapsed - at-risk agreements surface first.
Use this before authorizing work on an account - it answers whether the contract still has hours left, fleet-wide, in one call.
kaseya-bms-cli contract-burn --agent --select items.account,items.contract,items.hours_consumed
unbilled - Billable, approved, not-yet-billed time grouped by account, in hours - the month-end ready-to-bill review without the Excel export.
Reach for this for any what-is-ready-to-bill question; the answer is local, grouped, and JSON-shaped.
kaseya-bms-cli unbilled --agent
pipeline - Open opportunities grouped by stage with counts, total and weighted value, and slipped-close flags for the Monday sales call.
Use this for pipeline and forecast questions instead of paging the opportunities endpoint and aggregating by hand.
kaseya-bms-cli pipeline --agent
admin - Manage admin
kaseya-bms-cli admin clone-workflow - Clone workflowkaseya-bms-cli admin delete-k1-access-control-mapping - Delete k1 access control mappingkaseya-bms-cli admin delete-service - Delete servicekaseya-bms-cli admin delete-services - Delete serviceskaseya-bms-cli admin delete-teams-channel - Delete teams channelkaseya-bms-cli admin delete-teams-channels - Delete teams channelskaseya-bms-cli admin delete-webhook-configuration - Delete webhook configurationkaseya-bms-cli admin delete-webhooks - Delete webhookskaseya-bms-cli admin delete-workflow - Delete workflowkaseya-bms-cli admin get-account-codes-lookup - Get account codes lookupkaseya-bms-cli admin get-agent-procedure-logs - Get agent procedure logskaseya-bms-cli admin get-chart-of-account-types - Get chart of account typeskaseya-bms-cli admin get-chart-of-account-types-look-up - Get chart of account types look upkaseya-bms-cli admin get-chart-of-accounts - Get chart of accountskaseya-bms-cli admin get-chart-of-accounts-lookup - Get chart of accounts lookupkaseya-bms-cli admin get-company-settings - Get company settingskaseya-bms-cli admin get-copilot-configurations - Get copilot configurationskaseya-bms-cli admin get-custom-field-operators - Get custom field operatorskaseya-bms-cli admin get-departments-lookup - Get departments lookupkaseya-bms-cli admin get-job-titles-lookup - Get job titles lookupkaseya-bms-cli admin get-k1-access-control-access-groups - Get k1 access control access groupskaseya-bms-cli admin get-k1-access-control-mappings - Get k1 access control mappingskaseya-bms-cli admin get-k1-access-control-settings - Get k1 access control settingskaseya-bms-cli admin get-k1-launcher-url - Get k1 launcher urlkaseya-bms-cli admin get-k1-product-organization-mappings - Get k1 product organization mappingskaseya-bms-cli admin get-k1-ssomodules - Get k1 ssomoduleskaseya-bms-cli admin get-k1-status - Get k1 statuskaseya-bms-cli admin get-related-services-list - Get related services listkaseya-bms-cli admin get-satisfaction-score-options-lookup - Get satisfaction score options lookupkaseya-bms-cli admin get-security-roles-lookup - Get security roles lookupkaseya-bms-cli admin get-service - Get servicekaseya-bms-cli admin get-service-categories-lookup - Get service categories lookupkaseya-bms-cli admin get-service-in-progress-job - Get service in progress jobkaseya-bms-cli admin get-service-sub-categories-lookup - Get service sub categories lookupkaseya-bms-cli admin get-service-type-options-lookup - Get service type options lookupkaseya-bms-cli admin get-services-list - Get services listkaseya-bms-cli admin get-services-lookup - Get services lookupkaseya-bms-cli admin get-teams-channel - Get teams channelkaseya-bms-cli admin get-teams-channel-lookup - Get teams channel lookupkaseya-bms-cli admin get-teams-channel-status - Get teams channel statuskaseya-bms-cli admin get-teams-channels-activity-logs-list - Get teams channels activity logs listkaseya-bms-cli admin get-teams-channels-list - Get teams channels listkaseya-bms-cli admin get-webhook-configuration - Get webhook configurationkaseya-bms-cli admin get-webhook-configurations-list - Get webhook configurations listkaseya-bms-cli admin get-webhook-delivery-log - Get webhook delivery logkaseya-bms-cli admin get-webhook-delivery-logs-list - Get webhook delivery logs listkaseya-bms-cli admin get-webhook-events-lookup - Get webhook events lookupkaseya-bms-cli admin get-workflow - Get workflowkaseya-bms-cli admin get-workflow-time-zone-and-working-hours - Get workflow time zone and working hourskaseya-bms-cli admin get-workflows-list - Get workflows listkaseya-bms-cli admin get-workforce-planner-logs-list - Get workforce planner logs listkaseya-bms-cli admin patch-services - Patch serviceskaseya-bms-cli admin patch-teams-channel - Patch teams channelkaseya-bms-cli admin patch-webhooks - Patch webhookskaseya-bms-cli admin patch-workflow - Patch workflowkaseya-bms-cli admin post-copilot-configuration - Post copilot configurationkaseya-bms-cli admin post-k1-access-control-mapping - Post k1 access control mappingkaseya-bms-cli admin post-k1-access-control-settings - Post k1 access control settingskaseya-bms-cli admin post-k1-product-organization-mappings - Post k1 product organization mappingskaseya-bms-cli admin post-service - Post servicekaseya-bms-cli admin post-teams-channel - Post teams channelkaseya-bms-cli admin post-webhook-configuration - Post webhook configurationkaseya-bms-cli admin post-webhook-delivery-logs-redelivery - Post webhook delivery logs redeliverykaseya-bms-cli admin post-workflow - Post workflowkaseya-bms-cli admin put-copilot-configuration - Put copilot configurationkaseya-bms-cli admin put-k1-access-control-mapping - Put k1 access control mappingkaseya-bms-cli admin put-k1-access-control-settings - Put k1 access control settingskaseya-bms-cli admin put-service - Put servicekaseya-bms-cli admin put-teams-channel - Put teams channelkaseya-bms-cli admin put-webhook-configuration - Put webhook configurationkaseya-bms-cli admin put-workflow - Put workflowkaseya-bms-cli admin search-k1-product-organization-mappings - Search k1 product organization mappingskaseya-bms-cli admin update - Updatekaseya-bms-cli admin update-related-services-list - Update related services listcalendar - Manage calendar
kaseya-bms-cli calendar dismiss-workforce-planner-period-warning - Dismiss workforce planner period warningkaseya-bms-cli calendar get-workforce-planner - Get workforce plannerkaseya-bms-cli calendar put-workforce-planner-period - Put workforce planner periodkaseya-bms-cli calendar split-workforce-planner-period - Split workforce planner periodclientportal - Manage clientportal
kaseya-bms-cli clientportal get-client-portal-ticket-activities - Get client portal ticket activitieskaseya-bms-cli clientportal get-client-portal-ticket-by-id - Get client portal ticket by idkaseya-bms-cli clientportal post-client-portal-ticket - Post client portal ticketkaseya-bms-cli clientportal post-client-portal-ticket-note - Post client portal ticket notekaseya-bms-cli clientportal search-client-portal-my-tickets - Search client portal my ticketskaseya-bms-cli clientportal search-client-portal-tickets - Search client portal ticketscrm - Manage crm
kaseya-bms-cli crm delete-contact - Delete contactkaseya-bms-cli crm get-account-alert - Get account alertkaseya-bms-cli crm get-account-contact-summary-info - Get account contact summary infokaseya-bms-cli crm get-account-contacts - Get account contactskaseya-bms-cli crm get-account-location - Get account locationkaseya-bms-cli crm get-account-locations - Get account locationskaseya-bms-cli crm get-account-summary - Get account summarykaseya-bms-cli crm get-accounts - Get accountskaseya-bms-cli crm get-accounts-list-summary - Get accounts list summarykaseya-bms-cli crm get-activities-due - Get activities duekaseya-bms-cli crm get-all-opportunities - Get all opportunitieskaseya-bms-cli crm get-contact-summary - Get contact summarykaseya-bms-cli crm get-contacts-list-summary - Get contacts list summarykaseya-bms-cli crm get-contacts-search - Get contacts searchkaseya-bms-cli crm get-dashboard-quotations-summary - Get dashboard quotations summarykaseya-bms-cli crm get-line-item - Get line itemkaseya-bms-cli crm get-next-opportunities - Get next opportunitieskaseya-bms-cli crm get-open-pipelines - Get open pipelineskaseya-bms-cli crm get-opportunity - Get opportunitykaseya-bms-cli crm get-opportunity-notes - Get opportunity noteskaseya-bms-cli crm get-opportunity-status-lookups - Get opportunity status lookupskaseya-bms-cli crm get-pipeline-totals - Get pipeline totalskaseya-bms-cli crm get-product-quotation - Get product quotationkaseya-bms-cli crm get-product-quotations-list-summary - Get product quotations list summarykaseya-bms-cli crm get-quotation - Get quotationkaseya-bms-cli crm get-quotations-list-summary - Get quotations list summarykaseya-bms-cli crm get-recurring-services-performance - Get recurring services performancekaseya-bms-cli crm get-recurring-services-performance-totals - Get recurring services performance totalskaseya-bms-cli crm get-sales-accelerator-data - Get sales accelerator datakaseya-bms-cli crm get-sales-accelerator-summary - Get sales accelerator summarykaseya-bms-cli crm get-sales-leaderboard - Get sales leaderboardkaseya-bms-cli crm get-top-opportunities - Get top opportunitieskaseya-bms-cli crm patch-account - Patch accountkaseya-bms-cli crm patch-contact - Patch contactkaseya-bms-cli crm post-account - Post accountkaseya-bms-cli crm post-contact-summary-info - Post contact summary infokaseya-bms-cli crm post-opportunity - Post opportunitykaseya-bms-cli crm post-opportunity-note - Post opportunity notekaseya-bms-cli crm post-quotation-line-item - Post quotation line itemkaseya-bms-cli crm put-account - Put accountkaseya-bms-cli crm put-contact - Put contactkaseya-bms-cli crm put-opportunity - Put opportunitykaseya-bms-cli crm put-opportunity-note - Put opportunity notekaseya-bms-cli crm put-quotation-line-item - Put quotation line itemfinance - Manage finance
kaseya-bms-cli finance activate-contract - Activate contractkaseya-bms-cli finance deactivate-contract - Deactivate contractkaseya-bms-cli finance get-contract-lookups - Get contract lookupskaseya-bms-cli finance get-contracts-summary - Get contracts summarykaseya-bms-cli finance get-invoice - Get invoicekaseya-bms-cli finance get-invoice-details-list - Get invoice details listkaseya-bms-cli finance get-invoice-discounts-list - Get invoice discounts listkaseya-bms-cli finance get-invoices-summary-list - Get invoices summary listkaseya-bms-cli finance mark-invoices-as-sent - Mark invoices as sentkaseya-bms-cli finance post-recurring-service-contract - Post recurring service contractkaseya-bms-cli finance post-recurring-services - Post recurring serviceskaseya-bms-cli finance put-recurring-service-contract - Put recurring service contracthr - Manage hr
kaseya-bms-cli hr get-assignee-lookups - Get assignee lookupskaseya-bms-cli hr get-assignees - Get assigneeskaseya-bms-cli hr get-assignees-count - Get assignees countkaseya-bms-cli hr get-employee-role-lookups - Get employee role lookupskaseya-bms-cli hr get-employees-list-search-select - Get employees list search selectkaseya-bms-cli hr get-employees-lookup - Get employees lookupintegration - Manage integration
kaseya-bms-cli integration get-account-codes - Get account codeskaseya-bms-cli integration get-account-codes-by-ids - Get account codes by idskaseya-bms-cli integration get-bill-details - Get bill detailskaseya-bms-cli integration get-bills - Get billskaseya-bms-cli integration get-class-lists - Get class listskaseya-bms-cli integration get-class-lists-by-ids - Get class lists by idskaseya-bms-cli integration get-client-by-ids - Get client by idskaseya-bms-cli integration get-clients - Get clientskaseya-bms-cli integration get-discounts - Get discountskaseya-bms-cli integration get-discounts-by-ids - Get discounts by idskaseya-bms-cli integration get-expenses - Get expenseskaseya-bms-cli integration get-expenses-by-ids - Get expenses by idskaseya-bms-cli integration get-invoice-details - Get invoice detailskaseya-bms-cli integration get-invoices - Get invoiceskaseya-bms-cli integration get-job-info - Get job infokaseya-bms-cli integration get-products - Get productskaseya-bms-cli integration get-products-by-ids - Get products by idskaseya-bms-cli integration get-reimbursement-details - Get reimbursement detailskaseya-bms-cli integration get-reimbursements - Get reimbursementskaseya-bms-cli integration get-sales-tax-items - Get sales tax itemskaseya-bms-cli integration get-sales-tax-items-by-ids - Get sales tax items by idskaseya-bms-cli integration get-services - Get serviceskaseya-bms-cli integration get-services-by-ids - Get services by idskaseya-bms-cli integration get-vendors - Get vendorskaseya-bms-cli integration get-vendors-by-ids - Get vendors by idskaseya-bms-cli integration get-work-types - Get work typeskaseya-bms-cli integration get-work-types-by-ids - Get work types by idskaseya-bms-cli integration import-account-codes - Import account codeskaseya-bms-cli integration import-class-lists - Import class listskaseya-bms-cli integration import-clients - Import clientskaseya-bms-cli integration import-discounts - Import discountskaseya-bms-cli integration import-expenses - Import expenseskaseya-bms-cli integration import-payments - Import paymentskaseya-bms-cli integration import-products - Import productskaseya-bms-cli integration import-services - Import serviceskaseya-bms-cli integration import-vendors - Import vendorskaseya-bms-cli integration import-work-types - Import work typeskaseya-bms-cli integration post-entity-mappings - Post entity mappingskaseya-bms-cli integration update-bill-qb-reference - Update bill qb referencekaseya-bms-cli integration update-invoice-qb-reference - Update invoice qb referencekaseya-bms-cli integration update-reimbursement-qb-reference - Update reimbursement qb referenceintegrations - Manage integrations
kaseya-bms-cli integrations get-distributors-pricing - Get distributors pricingkaseya-bms-cli integrations get-distributors-status - Get distributors statuskaseya-bms-cli integrations get-etilize-product - Get etilize productkaseya-bms-cli integrations get-itg-account-lookup - Get itg account lookupkaseya-bms-cli integrations get-itg-asset-lookup - Get itg asset lookupkaseya-bms-cli integrations get-itg-checklist-tasks - Get itg checklist taskskaseya-bms-cli integrations get-itg-checklists - Get itg checklistskaseya-bms-cli integrations get-itg-contact-lookup - Get itg contact lookupkaseya-bms-cli integrations get-itg-contact-notes - Get itg contact noteskaseya-bms-cli integrations get-itg-location-lookup - Get itg location lookupkaseya-bms-cli integrations get-itg-organization-notes - Get itg organization noteskaseya-bms-cli integrations get-itg-status - Get itg statuskaseya-bms-cli integrations get-itgaccess-info - Get itgaccess infokaseya-bms-cli integrations get-itgpassword-value - Get itgpassword valuekaseya-bms-cli integrations get-itgsuggested-resources - Get itgsuggested resourceskaseya-bms-cli integrations get-itgsuggested-resources-count - Get itgsuggested resources countkaseya-bms-cli integrations get-survey-settings - Get survey settingskaseya-bms-cli integrations get-ticket-global-search - Get ticket global searchkaseya-bms-cli integrations get-ticket-sync - Get ticket synckaseya-bms-cli integrations get-tickets-sync - Get tickets synckaseya-bms-cli integrations get-vsa-access-info - Get vsa access infokaseya-bms-cli integrations put-itgcontact-notes - Put itgcontact noteskaseya-bms-cli integrations put-itgorganization-notes - Put itgorganization noteskaseya-bms-cli integrations search-products - Search productsinventory - Manage inventory
kaseya-bms-cli inventory get-polookups - Get polookupskaseya-bms-cli inventory get-pricing-levels - Get pricing levelskaseya-bms-cli inventory get-product-categories-lookup - Get product categories lookupkaseya-bms-cli inventory get-product-default-cost - Get product default costkaseya-bms-cli inventory get-product-weighted-cost - Get product weighted costkaseya-bms-cli inventory get-products-in-stock - Get products in stockkaseya-bms-cli inventory get-products-list-search-select - Get products list search selectkaseya-bms-cli inventory get-supplier-lookups - Get supplier lookupskaseya-bms-cli inventory get-warehouse-lookups - Get warehouse lookupskaseya-bms-cli inventory post-product-categories - Post product categorieskaseya-one - Manage kaseya one
kaseya-bms-cli kaseya-one get-k1-resource-lookup - Get k1 resource lookupkaseya-bms-cli kaseya-one get-k1-resources-lookup - Get k1 resources lookupkaseya-bms-cli kaseya-one get-k1-role-lookup - Get k1 role lookupkaseya-bms-cli kaseya-one get-k1-roles-lookup - Get k1 roles lookupkaseya-bms-cli kaseya-one get-k1-ticket-statuses-lookup - Get k1 ticket statuses lookupkaseya-bms-cli kaseya-one get-k1-ticket-statuses-lookup-kaseyaone - Get k1 ticket statuses lookup kaseyaonekaseya-bms-cli kaseya-one get-work-type-lookup - Get work type lookupkaseya-bms-cli kaseya-one get-work-types-lookup - Get work types lookupkaseya-bms-cli kaseya-one k1-get-users-list - K1 get users listkaseya-bms-cli kaseya-one post-k1-centralized-configurations - Post k1 centralized configurationskaseya-bms-cli kaseya-one post-k1-gorgon-provisioning-notifications - Post k1 gorgon provisioning notificationskaseya-bms-cli kaseya-one post-k1-ticket-action-notifications - Post k1 ticket action notificationskaseya-bms-cli kaseya-one post-k1-user-deprovisioning-notifications - Post k1 user deprovisioning notificationslisting - Manage listing
kaseya-bms-cli listing get-columns - Get columnskaseya-bms-cli listing get-search-columns - Get search columnskaseya-bms-cli listing get-search-combo-items - Get search combo itemsmy - Manage my
kaseya-bms-cli my get-expense-sheets-lookups - Get expense sheets lookupskaseya-bms-cli my post-expense-sheet - Post expense sheetproject - Manage project
kaseya-bms-cli project delete-status - Delete statuskaseya-bms-cli project get - Getkaseya-bms-cli project get-list-summary - Get list summarykaseya-bms-cli project get-lookup - Get lookupkaseya-bms-cli project get-status - Get statuskaseya-bms-cli project get-statuses-list - Get statuses listkaseya-bms-cli project get-statuses-lookup - Get statuses lookupkaseya-bms-cli project get-task-related-items - Get task related itemskaseya-bms-cli project get-tasks-list - Get tasks listkaseya-bms-cli project post-status - Post statuskaseya-bms-cli project put-status - Put statuskaseya-bms-cli project put-status-order - Put status orderkaseya-bms-cli project search-and-select-task-list - Search and select task listrmm - Manage rmm
kaseya-bms-cli rmm create - Createkaseya-bms-cli rmm get - Getkaseya-bms-cli rmm get-rmmsettings - Get rmmsettingskaseya-bms-cli rmm post-alert - Post alertkaseya-bms-cli rmm update - Updatekaseya-bms-cli rmm update-integrationtype - Update integrationtypesecurity - Manage security
kaseya-bms-cli security authenticate - Authenticatekaseya-bms-cli security refresh-token - Refresh tokenkaseya-bms-cli security sso-status - Sso statuskaseya-bms-cli security user-info - User infoservicedesk - Manage servicedesk
kaseya-bms-cli servicedesk add-related-tickets - Add related ticketskaseya-bms-cli servicedesk add-ticket-tasks - Add ticket taskskaseya-bms-cli servicedesk assign-ticket - Assign ticketkaseya-bms-cli servicedesk create - Createkaseya-bms-cli servicedesk create-tickets - Create ticketskaseya-bms-cli servicedesk create-tickets-2 - Create tickets 2kaseya-bms-cli servicedesk create-tickets-3 - Create tickets 3kaseya-bms-cli servicedesk create-tickets-4 - Create tickets 4kaseya-bms-cli servicedesk delete-hardware-asset - Delete hardware assetkaseya-bms-cli servicedesk delete-related-ticket - Delete related ticketkaseya-bms-cli servicedesk delete-service-call - Delete service callkaseya-bms-cli servicedesk delete-service-calls-and-to-dos - Delete service calls and to doskaseya-bms-cli servicedesk delete-ticket - Delete ticketkaseya-bms-cli servicedesk delete-ticket-charge - Delete ticket chargekaseya-bms-cli servicedesk delete-ticket-checklist-item - Delete ticket checklist itemkaseya-bms-cli servicedesk delete-ticket-checklist-items - Delete ticket checklist itemskaseya-bms-cli servicedesk delete-ticket-expense - Delete ticket expensekaseya-bms-cli servicedesk delete-ticket-note - Delete ticket notekaseya-bms-cli servicedesk delete-ticket-tasks - Delete ticket taskskaseya-bms-cli servicedesk delete-ticket-time-entry - Delete ticket time entrykaseya-bms-cli servicedesk delete-tickets - Delete ticketskaseya-bms-cli servicedesk delete-to-do - Delete to dokaseya-bms-cli servicedesk get - Getkaseya-bms-cli servicedesk get-agent-procedure-audits - Get agent procedure auditskaseya-bms-cli servicedesk get-batch-action-logs - Get batch action logskaseya-bms-cli servicedesk get-ccs - Get ccskaseya-bms-cli servicedesk get-device-status - Get device statuskaseya-bms-cli servicedesk get-hardware-asset - Get hardware assetkaseya-bms-cli servicedesk get-hardware-asset-tickets - Get hardware asset ticketskaseya-bms-cli servicedesk get-hardware-assets-list-search-select - Get hardware assets list search selectkaseya-bms-cli servicedesk get-my-tickets - Get my ticketskaseya-bms-cli servicedesk get-product-charge-delivery-history-by-charge-id - Get product charge delivery history by charge idkaseya-bms-cli servicedesk get-queue-tickets - Get queue ticketskaseya-bms-cli servicedesk get-related-alerts - Get related alertskaseya-bms-cli servicedesk get-related-tickets - Get related ticketskaseya-bms-cli servicedesk get-related-tickets-count - Get related tickets countkaseya-bms-cli servicedesk get-service-call - Get service callkaseya-bms-cli servicedesk get-service-calls - Get service callskaseya-bms-cli servicedesk get-software-assets-list-search-select - Get software assets list search selectkaseya-bms-cli servicedesk get-ticket - Get ticketkaseya-bms-cli servicedesk get-ticket-activities - Get ticket activitieskaseya-bms-cli servicedesk get-ticket-charge - Get ticket chargekaseya-bms-cli servicedesk get-ticket-charge-product-summary - Get ticket charge product summarykaseya-bms-cli servicedesk get-ticket-checklist-items-by-ticket-id - Get ticket checklist items by ticket idkaseya-bms-cli servicedesk get-ticket-expense - Get ticket expensekaseya-bms-cli servicedesk get-ticket-expenses-charges - Get ticket expenses chargeskaseya-bms-cli servicedesk get-ticket-logs - Get ticket logskaseya-bms-cli servicedesk get-ticket-note - Get ticket notekaseya-bms-cli servicedesk get-ticket-note-template-details-by-ticket-id - Get ticket note template details by ticket idkaseya-bms-cli servicedesk get-ticket-note-template-lookups - Get ticket note template lookupskaseya-bms-cli servicedesk get-ticket-notes - Get ticket noteskaseya-bms-cli servicedesk get-ticket-product-charge-assets-by-charge-id - Get ticket product charge assets by charge idkaseya-bms-cli servicedesk get-ticket-service-calls-to-dos - Get ticket service calls to doskaseya-bms-cli servicedesk get-ticket-slainfo - Get ticket slainfokaseya-bms-cli servicedesk get-ticket-survey-scores - Get ticket survey scoreskaseya-bms-cli servicedesk get-ticket-tabs-indicators - Get ticket tabs indicatorskaseya-bms-cli servicedesk get-ticket-tasks - Get ticket taskskaseya-bms-cli servicedesk get-ticket-tasks-count - Get ticket tasks countkaseya-bms-cli servicedesk get-ticket-template - Get ticket templatekaseya-bms-cli servicedesk get-ticket-template-lookups - Get ticket template lookupskaseya-bms-cli servicedesk get-ticket-time-entries - Get ticket time entrieskaseya-bms-cli servicedesk get-ticket-time-entry - Get ticket time entrykaseya-bms-cli servicedesk get-ticket-time-entry-template-lookups - Get ticket time entry template lookupskaseya-bms-cli servicedesk get-ticket-timelog-template-details-by-ticket-id - Get ticket timelog template details by ticket idkaseya-bms-cli servicedesk get-tickets - Get ticketskaseya-bms-cli servicedesk get-tickets-2 - Get tickets 2kaseya-bms-cli servicedesk get-tickets-count - Get tickets countkaseya-bms-cli servicedesk get-tickets-count-by-assignee-priority - Get tickets count by assignee prioritykaseya-bms-cli servicedesk get-tickets-count-by-basic-status - Get tickets count by basic statuskaseya-bms-cli servicedesk get-tickets-count-by-issue-type - Get tickets count by issue typekaseya-bms-cli servicedesk get-tickets-count-by-priority - Get tickets count by prioritykaseya-bms-cli servicedesk get-tickets-count-by-queue - Get tickets count by queuekaseya-bms-cli servicedesk get-tickets-count-by-status - Get tickets count by statuskaseya-bms-cli servicedesk get-tickets-due - Get tickets duekaseya-bms-cli servicedesk get-tickets-list-search-select - Get tickets list search selectkaseya-bms-cli servicedesk get-tickets-list-summary - Get tickets list summarykaseya-bms-cli servicedesk get-tickets-upcoming - Get tickets upcomingkaseya-bms-cli servicedesk get-time-logged-by-technician - Get time logged by techniciankaseya-bms-cli servicedesk get-to-do - Get to dokaseya-bms-cli servicedesk get-vsa-hardware-asset-tickets - Get vsa hardware asset ticketskaseya-bms-cli servicedesk get-workflow-logs - Get workflow logskaseya-bms-cli servicedesk merge-tickets - Merge ticketskaseya-bms-cli servicedesk patch-ticket - Patch ticketkaseya-bms-cli servicedesk patch-tickets - Patch ticketskaseya-bms-cli servicedesk post-checklist-tasks - Post checklist taskskaseya-bms-cli servicedesk post-checklist-with-tasks - Post checklist with taskskaseya-bms-cli servicedesk post-hardware-asset - Post hardware assetkaseya-bms-cli servicedesk post-po - Post pokaseya-bms-cli servicedesk post-product-deliver - Post product deliverkaseya-bms-cli servicedesk post-service-call - Post service callkaseya-bms-cli servicedesk post-ticket - Post ticketkaseya-bms-cli servicedesk post-ticket-charge - Post ticket chargekaseya-bms-cli servicedesk post-ticket-checklist-item - Post ticket checklist itemkaseya-bms-cli servicedesk post-ticket-expense - Post ticket expensekaseya-bms-cli servicedesk post-ticket-note - Post ticket notekaseya-bms-cli servicedesk post-ticket-time-entry - Post ticket time entrykaseya-bms-cli servicedesk post-to-do - Post to dokaseya-bms-cli servicedesk put-hardware-asset - Put hardware assetkaseya-bms-cli servicedesk put-service-call - Put service callkaseya-bms-cli servicedesk put-ticket - Put ticketkaseya-bms-cli servicedesk put-ticket-charge - Put ticket chargekaseya-bms-cli servicedesk put-ticket-checklist-item - Put ticket checklist itemkaseya-bms-cli servicedesk put-ticket-expense - Put ticket expensekaseya-bms-cli servicedesk put-ticket-note - Put ticket notekaseya-bms-cli servicedesk put-ticket-time-entry - Put ticket time entrykaseya-bms-cli servicedesk put-to-do - Put to dokaseya-bms-cli servicedesk resolve-ticket - Resolve ticketkaseya-bms-cli servicedesk search-my-tickets - Search my ticketskaseya-bms-cli servicedesk search-queue-tickets - Search queue ticketskaseya-bms-cli servicedesk search-tickets - Search ticketskaseya-bms-cli servicedesk update - Updatekaseya-bms-cli servicedesk update-tickets - Update ticketssystem - Manage system
kaseya-bms-cli system create-tenant-lookup - Create tenant lookupkaseya-bms-cli system delete-attachment - Delete attachmentkaseya-bms-cli system delete-attachments - Delete attachmentskaseya-bms-cli system delete-temp-attachments - Delete temp attachmentskaseya-bms-cli system delete-view - Delete viewkaseya-bms-cli system download-attachment - Download attachmentkaseya-bms-cli system download-profile-picture - Download profile picturekaseya-bms-cli system get-account-types-lookup - Get account types lookupkaseya-bms-cli system get-all-batch-action-logs - Get all batch action logskaseya-bms-cli system get-approval-routes-lookup - Get approval routes lookupkaseya-bms-cli system get-attachment - Get attachmentkaseya-bms-cli system get-attachments - Get attachmentskaseya-bms-cli system get-colors-lookup - Get colors lookupkaseya-bms-cli system get-custom-fields-data - Get custom fields datakaseya-bms-cli system get-custom-fields-meta-data - Get custom fields meta datakaseya-bms-cli system get-email-template-lookups - Get email template lookupskaseya-bms-cli system get-expense-type-lookups - Get expense type lookupskaseya-bms-cli system get-issue-sub-type-lookups - Get issue sub type lookupskaseya-bms-cli system get-issue-type-lookups - Get issue type lookupskaseya-bms-cli system get-locations-lookup - Get locations lookupkaseya-bms-cli system get-lookups - Get lookupskaseya-bms-cli system get-priority-lookups - Get priority lookupskaseya-bms-cli system get-queue-lookups - Get queue lookupskaseya-bms-cli system get-role-lookups - Get role lookupskaseya-bms-cli system get-scheduler-job-status - Get scheduler job statuskaseya-bms-cli system get-settings - Get settingskaseya-bms-cli system get-slalookups - Get slalookupskaseya-bms-cli system get-status-lookups - Get status lookupskaseya-bms-cli system get-tenant-lookups - Get tenant lookupskaseya-bms-cli system get-view-details-values - Get view details valueskaseya-bms-cli system get-view-search-values - Get view search valueskaseya-bms-cli system get-view-share-settings - Get view share settingskaseya-bms-cli system get-views - Get viewskaseya-bms-cli system get-work-type-lookups - Get work type lookupskaseya-bms-cli system post - Postkaseya-bms-cli system post-event-log - Post event logkaseya-bms-cli system post-temp-attachment - Post temp attachmentkaseya-bms-cli system post-view - Post viewkaseya-bms-cli system put-attachment - Put attachmentkaseya-bms-cli system put-custom-field-data - Put custom field datakaseya-bms-cli system put-view - Put viewkaseya-bms-cli system put-view-info - Put view infokaseya-bms-cli system put-view-share-settings - Put view share settingstimelogs - Manage timelogs
kaseya-bms-cli timelogs - Get all time logscontract-burn
kaseya-bms-cli contract-burn - Per-contract burn picture: hours consumed, open tickets, and how much of the contract period has elapsed - at-risk agreements surface first.pipeline
kaseya-bms-cli pipeline - Open opportunities grouped by stage with counts, total and weighted value, and slipped-close flags for the Monday sales call.queue-health
kaseya-bms-cli queue-health - See open ticket volume by queue, priority, and status in one shot, with stale counts flagged before the morning standup.stale-tickets
kaseya-bms-cli stale-tickets - List open tickets that have not been touched in N days, oldest first, with account and assignee so nothing rots in the queue.unbilled
kaseya-bms-cli unbilled - Billable, approved, not-yet-billed time grouped by account, in hours - the month-end ready-to-bill review without the Excel export.workload
kaseya-bms-cli workload - Open and in-progress ticket load per assignee, flagging who is overloaded and who has slack before you dispatch the next ticket.When you know what you want to do but not which command does it, ask the CLI directly:
kaseya-bms-cli which "<capability in your own words>"
which resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code 0 means at least one match; exit code 2 means no confident match - fall back to --help or use a narrower query. --json (and other machine formats) keep that exit-2 contract and write {"matches":[]} on stdout so agents can inspect the envelope without treating a miss as success.
kaseya-bms-cli queue-health --agent
One local query answers what the dispatcher's three browser tabs used to: open volume by queue, priority, and status with stale flags.
kaseya-bms-cli stale-tickets --days 7 --agent
Oldest-first list of untouched open tickets with account and assignee, straight from the local mirror.
kaseya-bms-cli contract-burn --agent --select items.account,items.contract,items.hours_consumed
Fleet-wide consumed hours and period-elapsed per contract, with --select trimming the payload to the three fields an agent actually needs.
kaseya-bms-cli unbilled --agent
Approved, billable, unbilled hours grouped by account - the month-end Excel ritual as one command.
kaseya-bms-cli pipeline --agent
Opportunities by stage with weighted value and slipped-close flags, computed over the synced mirror.
BMS uses short-lived JWTs. Set KASEYA_BMS_USERNAME, KASEYA_BMS_PASSWORD, and KASEYA_BMS_TENANT (your company name from My Settings in BMS), and every command exchanges them for a token on first use and again when it expires; the token is kept in the 0600 credential store (never in config.toml) and sent as a Bearer header. kaseya-bms-cli auth login checks the login up front. If you already have a JWT, set KASEYA_BMS_TOKEN directly (it wins over the login). Regional tenants set KASEYA_BMS_BASE_URL (https://api.bms.kaseya.com is the default; EMEA uses https://api.bmsemea.kaseya.com, APAC https://api.bmsapac.kaseya.com, legacy Vorex https://api.vorexlogin.kaseya.com). API users with MFA run kaseya-bms-cli auth login --mfa-code <code> (the automatic mint cannot answer MFA) and again when that token expires.
Run kaseya-bms-cli doctor to verify setup.
KASEYA_BMS_BASE_URL (default https://api.bms.kaseya.com; EMEA https://api.bmsemea.kaseya.com, APAC https://api.bmsapac.kaseya.com). The login is POST /v2/security/authenticate on that same host. A redirect to any other host is refused, so a credential never reaches another host.KASEYA_BMS_PASSWORD, KASEYA_BMS_TOKEN, KASEYA_BMS_BEARER_AUTH, a minted token or a credential-named value from a response (an IT Glue password, an integration access token, a webhook secret) prints "[text withheld: it repeated a secret value this program holds]" in its place. Responses are never cached on disk, and credential-named fields are dropped before anything reaches the local store.credentials.toml (mode 0600) holds a credential. The password from the environment is never written to disk. A minted token is cached there, bound to the host and login it was minted for: another login mints its own, and a token is never sent to another region's host.--dry-run sends nothing and never mints a token. Over MCP, a call that changes Kaseya BMS returns a preview and sends only with confirm: true, and a tool argument can never name a file to read or write.Add --agent to any command. Expands to: --json --compact --no-input --no-color.
Global format flags share one contract on promoted, novel, sync, and --deliver paths:
--json - one JSON document on stdout (sync progress events go to stderr)
--compact - keep identity/status/timestamp fields; does not change the document vs stream shape
--csv / --plain - tabular rows (collection envelopes unwrap to the row array). --csv prefixes ' on a cell or header key that starts with =, +, -, @, tab, CR, or LF (fullwidth =+-@ too) so a spreadsheet does not run it as a formula; a plain signed number such as -5 or +2.5e3 is unchanged.
--quiet - one identity value per row, no envelope
Pipeable - JSON on stdout, errors on stderr
Filterable - --select keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
kaseya-bms-cli project get mock-value --agent --select Error,Result,Success
Previewable - --dry-run shows the request without sending
Offline-friendly - sync/search commands can use the local SQLite store when available
Non-interactive - never prompts, every input is a flag
Explicit confirmation - --agent does not imply --yes; pass --yes separately only after the target, arguments, and side effects are clear
Explicit retries - use --idempotent only when an already-existing create should count as success, and use --ignore-missing only when a missing delete target should count as success
Commands that read from the local store or the API wrap output in a provenance envelope:
{
"meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
"results": <data>
}
Parse .results for data and .meta.source to know whether it's live or local. A human-readable N results (live) summary is printed to stderr only when stdout is a terminal AND no machine-format flag (--json, --csv, --compact, --quiet, --plain, --select) is set - piped/agent consumers and explicit-format runs get pure JSON on stdout.
Agents should treat the CLI's path resolver as part of the runtime contract:
Use --home <dir> for one invocation, or set KASEYA_BMS_HOME=<dir> to relocate all four path kinds under one root.
Use per-kind env vars only when a specific kind must diverge: KASEYA_BMS_CONFIG_DIR, KASEYA_BMS_DATA_DIR, KASEYA_BMS_STATE_DIR, KASEYA_BMS_CACHE_DIR.
Resolution order is per-kind env var, --home, KASEYA_BMS_HOME, XDG (XDG_CONFIG_HOME, XDG_DATA_HOME, XDG_STATE_HOME, XDG_CACHE_HOME), then platform defaults.
config contains settings like config.toml and profiles. data contains credentials.toml, data.db, cookies, and auth sidecars. state contains persisted queries, jobs, and teach.log. cache contains regenerable HTTP/cache files.
Stored secrets live in credentials.toml under the data dir. Existing legacy config.toml secrets are read for compatibility and leave config.toml on the first auth write.
Run kaseya-bms-cli doctor --fail-on warn to surface path and credential-location warnings. agent-context exposes a schema v4 paths block for agents that need the resolved dirs.
For MCP, pass relocation through the MCP host config. The MCP binary does not inherit CLI flags:
{
"mcpServers": {
"kaseya-bms": {
"command": "kaseya-bms-mcp",
"env": {
"KASEYA_BMS_HOME": "/srv/kaseya-bms"
}
}
}
}
Fleet precedence: an inherited per-kind env var overrides an explicit --home for that kind. Use KASEYA_BMS_HOME or per-kind vars as durable fleet levers, and use --home only for a single invocation. Relocation is not reversible by unsetting env vars; move files manually before clearing KASEYA_BMS_HOME, or doctor will not find credentials left under the former root.
Local data is unencrypted and relies on OS account permissions plus disk encryption. Reads in the default --data-source auto mode are written to the SQLite store; GET responses are never cached on disk. local-data purge previews what it would erase (store files, response cache, learn journal) and deletes only with --yes; it is not exposed over MCP. KASEYA_BMS_NO_LOCAL_DATA=1 disables the response cache and store writes, turns auto reads into live reads, and blocks sync and workflow archive; --data-source local still reads an existing store, and KASEYA_BMS_DATA_SOURCE sets the --data-source default.
This CLI ships a self-capturing learning loop. The CLI does its own bookkeeping: every invocation is journaled locally, a failed flag followed by a corrected retry auto-derives a flag_alias candidate, and a teach on a query family without a playbook auto-synthesizes a playbook_candidate from the session's journal. Your job is judgment only: recall first, act on surfaced candidates, teach the final answer, playbook amend when you observe a correction. You never record failures by hand.
recall before any discoveryBefore list/search/drill commands on a new user question, pass the question as an argv or MCP tool argument to recall --agent. Do not interpolate user-controlled text into a shell command line.
Quoted recall "<question>" breaks on an apostrophe, which is ordinary English. A quoted heredoc breaks when a body line equals the delimiter, and that delimiter is published in these docs. Write the question with a non-shell file-writing tool, then read it back as data:
# Write the question verbatim with your file-writing tool (no shell involved).
# Command substitution on a file only ever yields data - the shell never
# parses the file's bytes as syntax.
QUERY=$(cat /path/to/question.txt)
kaseya-bms-cli recall "$QUERY" --agent
Prefer MCP: pass the question as the tool's query argument. "$QUERY" after a file read is argv-safe; putting the question itself in the command text is not.
The response envelope:
{
"query": "...",
"normalized": "<normalized form>",
"query_entities": ["..."],
"found": true | false,
"match_score": 0.0,
"results": [
{ "resource_id": "...", "resource_type": "...", "venue": "...",
"confidence": 2, "entity_match": "exact|partial|unknown",
"source": "taught|preseed|pattern", "warnings": ["..."] }
],
"mismatches": [ /* only when --debug-mismatches */ ],
"warnings": [ /* top-level */ ],
"candidates": [
{ "id": 12, "class": "flag_alias | playbook_candidate",
"summary": "...", "sightings": 3, "last_seen": "...",
"rationale": "...",
"next_action": ["<trial command>", "kaseya-bms-cli learnings confirm 12"] }
],
"playbook": {
"query_family": "...",
"playbook": {
"steps": [ { "cmd": "<command with {slot} substitution>", "purpose": "..." } ],
"entity_slots": ["$ENTITY"],
"expected_tool_calls": 3
},
"slots_resolved": { "$ENTITY": { "token": "<live token>", "canonical": "<canonical>" } },
"notes": "<workarounds + gotchas for this query family>"
},
"notes": "<duplicate surface for non-playbook callers>"
}
Empty-store short-circuit: if the store has no learnings, playbooks, or candidates yet (recall finds nothing and learnings list and learnings candidates are both empty), skip recall for the rest of this session instead of taxing every query; resume recall-first once something has been taught.
Read candidates, playbook, notes, results[0], and warnings in that order:
if Candidates present (warnings include "candidates_present"):
-> candidates are try-then-confirm, never facts. Follow each candidate's
two-step next_action verbatim: run the trial command first, then run
`learnings confirm <id>` only after the trial verified the behavior.
Reject a wrong candidate with `learnings reject <id>`.
-> NEVER re-teach something recall surfaced as a candidate; confirm or
reject that candidate instead of teaching a duplicate.
-> candidates ride alongside playbooks and resource hits, not instead of
them; continue with the branches below after acting on them.
if Playbook present:
-> READ Playbook.notes verbatim FIRST (workarounds + gotchas the CLI surface doesn't expose)
-> replay Playbook.steps in order, substituting Playbook.slots_resolved entries
for the entity slot tokens. If a step's slot is unresolved, fall back to
discovery for that step only.
-> the Playbook's expected_tool_calls is a budget; if you find yourself running
materially more, record the divergence via `kaseya-bms-cli playbook amend`
at end-of-session.
elif Notes present (no Playbook):
-> read Notes verbatim before any discovery step; they carry known gotchas
for this query family even when no structured choreography exists yet.
elif Found AND Results[0].EntityMatch == "exact" AND Results[0].Confidence >= 2:
-> skip discovery; fetch live data for Results[*].ResourceID in parallel
elif Found AND Results[0].EntityMatch == "partial":
-> candidate hint, NOT a hit; read the resource title to validate before trusting
elif (any row in Mismatches[] when --debug-mismatches was passed):
-> treat as cold start; the stored learning is for a different entity
(different canonical resolved from query_entities)
else: // Found == false, no playbook, no notes
-> cold start; run discovery normally; teach the answer afterward (Step 4).
If the family has no playbook yet, that teach auto-synthesizes a
playbook candidate from this session's journal - you do not need to
record one by hand.
Playbook and Notes are orthogonal to the per-resource path. A recall response can carry both a Playbook AND a Results[] hit - use both: the Playbook tells you which choreography to run; the resource hits short-circuit specific steps. Default to skipping mismatches; pass --debug-mismatches only when investigating cold-start surprises.
Candidate judgment details: learnings confirm <id> prints the candidate's full payload before materializing it - check that the printed payload matches the behavior you verified. learnings reject <id> tombstones the derivation signature so the same candidate does not resurface. The envelope carries only the few candidates worth acting on now; kaseya-bms-cli learnings candidates lists the full open set.
Graceful degradation: if learnings confirm is an unknown command, you are driving an older binary - ignore the candidates guidance and follow the rest of the protocol.
warningslow_confidence: row exists at confidence<2. Treat as a hint, not a skip-discovery hit.resource_not_in_store: the local store doesn't have the resource the learning points at. The match validator couldn't classify entities - direct-fetch and re-evaluate.cross_alias_match (per-result): the row was taught under a different alias and matched the live query's canonical via entity_lookups (e.g., a "USA" teach satisfying a "United States" recall). Trust the resource_id.similar_shape_different_entity:<canonical> (top-level): a structurally matching row exists but its canonical entity differs from the live query's. Treated as cold start; the warning carries the conflicting canonical as a hint, but the row is NOT promoted into Results.ambiguous_alias (top-level): a single query entity resolved to multiple canonicals (e.g., "Cards" → Arizona Cardinals + St. Louis Cardinals). Surface the ambiguity from context before committing to a resource.candidates_present (top-level): the envelope carries a candidates section. Handle it via the candidates branch in Step 2 before anything else.lookup_refresh_available (top-level): an entity in the query has no lookup row yet, but synced data could provide one. Run kaseya-bms-cli sync to refresh entity lookups.no_learnings_for_query_family: the table had no rows above the Jaccard floor. Pure cold start.teach & after finalizing your response - alwaysTeaching is unconditional. After resolving a query the store could not answer, background-teach the final resource mapping - no call-count threshold, no judging whether it was "worth" learning. The teach is the anchor of the loop: it triggers playbook synthesis for a family without a playbook, and same-referent phrasings fold into one family so near-duplicate teaches do not fragment the store. Fire it after assembling your user-facing response but BEFORE emitting it, with a shell & so the call returns immediately. Pass the query the same way as recall - argv/MCP, or file-then-$QUERY. Do not splice the question into the command text:
QUERY=$(cat /path/to/question.txt)
kaseya-bms-cli teach --query "$QUERY" --resource-type <type> --resource <id1> --resource <id2>
# (append shell `&` to background it)
Silent on success. Errors only land in teach.log under the resolved state dir. Teach the most specific resource - if the user asked a broad question and you walked through parent records to find the specific answer, teach the leaf id, not the parent. The CLI uses seeded entity_lookups for cross-alias resolution at recall time, so a teach under one alias (e.g., "Niners") satisfies future queries under another alias (e.g., "49ers", "San Francisco") automatically.
PII rule: teach the structural question with identifiers stripped - never include names, emails, phone numbers, account ids, or other personal identifiers in taught queries or notes. The CLI scans teach queries for obvious email/phone shapes and warns, but does not block; strip before teaching rather than relying on the warning.
You do not need to decide whether a session "deserves" a playbook: a teach on a family without one auto-synthesizes a playbook_candidate from the session's journal, and the next session judges it via confirm/reject. Attach explicit playbook flags only when you already hold choreography worth recording verbatim - workarounds the CLI didn't surface (silently-dropped flags, undocumented params, pagination tricks, payload gotchas). Prefer the integrated one-call form - record the resource learning and the playbook in the same teach invocation:
# Common case: record both the resource learning AND the playbook in one call.
QUERY=$(cat /path/to/question.txt)
kaseya-bms-cli teach \
--query "$QUERY" \
--resource <id> \
--playbook-file ~/playbooks/<shape>.json \
--playbook-notes-file ~/playbooks/<shape>-notes.md
# (append shell `&` to background it)
# Alternate: playbook-only (no resource to record alongside).
QUERY=$(cat /path/to/question.txt)
kaseya-bms-cli teach-playbook \
--query "$QUERY" \
--playbook-file ~/playbooks/<shape>.json \
--notes-file ~/playbooks/<shape>-notes.md
Playbook files are JSON with steps, entity_slots, expected_tool_calls. Notes files are markdown carrying the gotchas verbatim. File-free callers (MCP-only agents) pass the same content inline: --playbook-json and --playbook-notes on the integrated teach form, --playbook-json and --notes on teach-playbook. On the integrated teach form, the playbook flags are optional - omit them entirely for a resource-only teach. On the standalone teach-playbook form, at least one of the playbook and notes flags must be set; both empty is rejected. Playbooks are keyed on the structural query family (entities stripped) so a recipe taught from one entity-shaped query applies to every other query of the same shape, with slots_resolved binding the live query's canonical at recall time.
When you DO find a playbook on a future recall, treat it as ground truth: replay the steps with slots_resolved substitutions, skip the discovery that the choreography already documents, and read notes before any step.
playbook amend & when your debug response identifies a correctionIf your debug-protocol response identifies a concrete correction the notes or playbook should know - a workaround, an undocumented endpoint shape, a stale field name, observed schema drift, an empty-payload fallback - fire playbook amend BEFORE emitting your user-facing response. Same fire-and-forget posture as teach. Pass the query and note as argv/MCP arguments, or write each with a non-shell file tool and read them back (QUERY=$(cat ...), NOTE=$(cat ...)). Do not interpolate either string into the command text:
QUERY=$(cat /path/to/question.txt)
NOTE=$(cat /path/to/note.txt)
kaseya-bms-cli playbook amend \
--query "$QUERY" \
--add-note "$NOTE"
# (append shell `&` to background it)
What counts as worth amending: a behavior you OBSERVED this session that future-you would benefit from knowing. Examples worth amending:
{meta, results}, payload nested two levels deeper than the docs claim).What does NOT belong in notes:
The amend command appends to the family's existing notes with a timestamped marker ([amend YYYY-MM-DDTHH:MMZ]: <text>). Multiple amends accumulate; the audit trail is visible. If no playbook exists yet for the family, amend creates a notes-only one (so cold-start corrections still land).
playbook amend notes are designed to potentially flow upstream as shared knowledge in future versions of the Printing Press. Keep them clean of user-identifying content so the upstream-contribution path stays open without retroactive scrubbing:
If a correction is only meaningful with user-specific context, it belongs in a personal note, not in the playbook amend.
kaseya-bms-cli learnings stats reports recall hit rate, teach-to-reuse, playbook resolution rate, and candidate confirm/reject counts from the local learn_events table. Rates are null until they have a denominator; everything stays on this machine. Use it to check whether the loop is earning its keep for this CLI.
--no-learn on a single command short-circuits both recall and the teach write path. Use for deterministic agent flows or tests that must not be affected by accumulated learnings.KASEYA_BMS_NO_LEARN=true in the environment globally disables the pipeline.When you (or the agent) notice something off about this CLI, record it:
kaseya-bms-cli feedback "the --since flag is inclusive but docs say exclusive"
kaseya-bms-cli feedback --stdin < notes.txt
kaseya-bms-cli feedback list --json --limit 10
Entries are stored locally as feedback.jsonl under the resolved data dir. They are never POSTed unless KASEYA_BMS_FEEDBACK_ENDPOINT is set AND either --send is passed or KASEYA_BMS_FEEDBACK_AUTO_SEND=true. Default behavior is local-only.
Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
Every command accepts --deliver <sink>. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:
| Sink | Effect |
|---|---|
stdout | Default; write to stdout only |
file:<path> | Atomically write output to <path> as a private 0600 file (exclusive randomly named temp in the destination directory, then rename; a planted symlink is not followed). Binary-response commands write decoded payload bytes (not the base64 JSON envelope) and print a small JSON receipt on stdout; --json/--csv do not refuse when this sink is set. |
webhook:<url> | POST the output body to the URL (application/json). Redirects are not followed; a 3xx response fails the delivery and the body is not sent to the Location. |
Unknown schemes are refused with a structured error naming the supported set. Webhook failures, including redirects, return non-zero and log the URL and HTTP status on stderr.
A profile is a saved set of flag values, reused across invocations. Use it when a scheduled or recurring agent reuses the same saved flags while providing different input each run.
kaseya-bms-cli profile save briefing --json
kaseya-bms-cli --profile briefing project get mock-value
kaseya-bms-cli profile list --json
kaseya-bms-cli profile show briefing
kaseya-bms-cli profile delete briefing --yes
Explicit flags always win over profile values; profile values win over defaults. agent-context lists all available profiles under available_profiles so introspecting agents discover them at runtime.
For endpoints that submit long-running work, the generator detects the submit-then-poll pattern (a job_id/task_id/operation_id field in the response plus a sibling status endpoint) and wires up three extra flags on the submitting command:
| Flag | Purpose |
|---|---|
--wait | Block until the job reaches a terminal status instead of returning the job ID immediately |
--wait-timeout | Maximum wait duration (default 10m, 0 means no timeout) |
--wait-interval | Initial poll interval (default 2s; grows with exponential backoff up to 30s) |
Use async submission without --wait when you want to fire-and-forget; use --wait when you want one command to return the finished artifact.
If --wait times out or polling fails after the job was accepted, the command exits 8 and prints the job ID plus a recovery command that fetches the result. The job may still be running and may already be billed, so run the recovery command instead of resubmitting.
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Usage error (wrong arguments) |
| 3 | Resource not found |
| 4 | Authentication required |
| 5 | API error (upstream issue) |
| 6 | Partial failure |
| 7 | Rate limited (wait and retry) |
| 8 | Async job submitted but not finished (run the printed recovery command; do not resubmit) |
| 10 | Config error |
Parse $ARGUMENTS:
help, or --help → show kaseya-bms-cli --help outputinstall → ends with mcp → MCP installation; otherwise → see Prerequisites above--agent)claude mcp add kaseya-bms-mcp -- kaseya-bms-mcp
claude mcp listFor a remote host, kaseya-bms-mcp --transport http requires KASEYA_BMS_MCP_HTTP_TOKEN set to at least 32 characters (callers send Authorization: Bearer <token>; openssl rand -hex 32 prints 64 hex characters and meets that minimum), serves http://127.0.0.1:7777/mcp by default, and needs --tls-cert/--tls-key for any non-loopback --addr. Requests with no Origin header are accepted. Loopback origins are accepted; any other Origin is refused unless listed in KASEYA_BMS_MCP_HTTP_ALLOWED_ORIGINS (comma-separated scheme://host[:port] values). KASEYA_BMS_MCP_READ_ONLY=1 drops mirrored write commands (local-write commands that only touch the CLI's own learn store stay) and makes the raw execute tool refuse state-changing calls.
which kaseya-bms-cli
If not found, offer to install (see Prerequisites at the top of this skill).--agent flag:
kaseya-bms-cli <command> [subcommand] [args] --agent
kaseya-bms-cli <command> --help.AGENTS.md (opens in a new tab)CHANGELOG.md (opens in a new tab)README.md (opens in a new tab)cli/LICENSE (opens in a new tab)cli/Makefile (opens in a new tab)cli/NOTICE (opens in a new tab)cli/cmd/kaseya-bms-cli/main.go (opens in a new tab)cli/cmd/kaseya-bms-mcp/http_auth_test.go (opens in a new tab)cli/cmd/kaseya-bms-mcp/main.go (opens in a new tab)cli/go.mod (opens in a new tab)cli/go.sum (opens in a new tab)cli/internal/cache/cache.go (opens in a new tab)cli/internal/cli/admin.go (opens in a new tab)cli/internal/cli/admin_agentprocedures.go (opens in a new tab)cli/internal/cli/admin_agentprocedures_get-agent-procedures.go (opens in a new tab)cli/internal/cli/admin_clone-workflow.go (opens in a new tab)cli/internal/cli/admin_delete-k1-access-control-mapping.go (opens in a new tab)cli/internal/cli/admin_delete-service.go (opens in a new tab)cli/internal/cli/admin_delete-services.go (opens in a new tab)cli/internal/cli/admin_delete-teams-channel.go (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub servosity/msp-skills --plugin kaseya-bmsOther plugins' skills for the same job