hostedsuite-cli
v0.2.0
Published
Command-line interface for HostedSuite — for support staff and AI agents. Installs the `hsuite` binary. Host-agnostic: tenants are added at runtime.
Maintainers
Readme
hostedsuite-cli
Command-line interface for HostedSuite — built for support staff and AI agents (Claude Code).
Installs the hsuite binary and a paired Claude Code skill.
hsuite is a thin, fully self-documenting CLI over the HostedSuite REST API. It is host-agnostic:
there are no default hosts baked in. You add each tenant deployment at runtime with hsuite tenant add,
and every command targets whichever tenant is active (or the one named by --tenant).
What it does
- Look up and correct client, contact, center, reservation and related records.
- Run reports and download files.
- Perform guarded bulk updates across tenant deployments.
- Present one read contract regardless of the tenant's API generation — responses come back as
camelCase JSON wrapped in an
{ items: [...] }envelope, so you can pipe straight tojq. - Ship with a companion Claude Code skill that teaches agents how to drive it safely.
Every command is documented via --help, and every write prints a Safety: help section describing
its gate behavior.
Install
Published to npm under the Evo team:
npm install -g hostedsuite-cliThis puts the hsuite binary on your PATH.
Renamed in 0.2.0: the binary was
hsup to v0.1.x and is nowhsuite(hscollided with the HubSpot CLI). Upgrading withnpm install -g hostedsuite-cli@latestremoves the oldhslink. Tenants, settings and the undo journal are unchanged (~/.config/hostedsuite,~/.cache/hostedsuite), as are theHS_*environment variables. Re-run the skill install below to pick up the new name.
Install the companion Claude Code skill:
npx skills add -g Evo-Technologies/HostedSuite-CLIQuick start
All examples below use placeholder values — substitute your own tenant details.
# 1. Add a tenant (the CLI probes whether it speaks the v2 or v3 API for you).
hsuite tenant add acme \
--base-url https://acme.example.com/api \
--customer acme \
--user [email protected]
# 2. Make it the active tenant.
hsuite tenant use acme
# 3. Confirm who you are talking to.
hsuite whoami
# 4. Read freely.
hsuite client list --query acme
hsuite client get <id> --json
hsuite contact list --client-id <id> | jq '.items[]'
# 5. Single writes require --force and print a tenant banner first.
hsuite client patch <id> -f patch.json --dry-run # preview the field diff
hsuite client patch <id> -f patch.json --forceThe active tenant, --tenant <alias>, and stored credentials are read from your local config at
runtime. Credentials are never printed — they are redacted to *** in every banner, dry-run,
error, log, and stored plan file.
Using with Claude Code
hsuite is built to be driven by Claude Code. Run it locally with the
Claude Code CLI or the desktop app (both run sessions on the machine where hsuite is
installed), or in a cloud shell at claude.ai/code — there, install the
CLI and skill inside the cloud environment.
Setup
npm install -g @anthropic-ai/claude-code # 1. Claude Code CLI (skip if installed)
npm install -g hostedsuite-cli # 2. the hsuite binary
npx skills add -g Evo-Technologies/HostedSuite-CLI # 3. the companion skillThen add your tenant(s) as shown in the Quick start above, open a terminal, and run claude.
The skill (step 3) is not optional in practice — it is what teaches the agent the safety protocol,
the v2/v3 boundaries, and the full command surface. Without it Claude will still find hsuite --help,
but it won't know the house rules.
What it looks like
Talk to Claude in plain language:
Look up the client "Acme" on the westside tenant and fix their billing contact's email — it should be [email protected].
With the skill installed, Claude will:
- Run
hsuite whoamibefore any write and tell you which tenant a change targets before making it. - Dry-run every patch first and review the field diff for surprises (like an unintended reference clear) before applying.
- Treat bulk operations as strictly two-phase: phase 1 prints a summary and a confirmation token,
Claude quotes the summary verbatim and asks you for an explicit yes, and only then runs
hsuite confirm <token>. Nothing is written until you confirm. - Use
hsuite undo/hsuite historyto reverse a mistaken entity write.
Credentials are never exposed to the agent or the transcript — they are redacted to ***
everywhere.
A word of caution
Every HostedSuite tenant is production. There is no staging environment, and the AI does what you tell it — the guardrails assume the person confirming prompts is actually reading them. Be deliberate about who you set up with this tool; mistakes can be costly. Treat access like direct database access.
Safety model
Every HostedSuite tenant is production, so hsuite layers three guardrails:
Tenant banner. Before any write,
hsuiteprints the target tenant to stderr —[acme] customer=acme · acme.example.com · v3 · [email protected]— so you always see which deployment you are about to change. A recent-switch note additionally fires if you are writing to a tenant you just switched to or have not written to recently.Bulk operations are two-phase, always.
bulk-patch,bulk-archive, andbulk-restorenever execute on first invocation. They resolve the target set, build a credential-free plan under a fresh token, print a phase-1 summary (agent-parseable JSON on stdout, human summary on stderr), and exit11. This holds even for a single target.--forcedoes not bypass this gate. Zero matches exit3and create no token.hsuite confirm <token>. Phase 2 executes the plan against the tenant that was pinned at phase 1 — it ignores--tenantand the current active tenant, so you cannot accidentally redirect a confirmed batch to the wrong deployment. Tokens are single-use and time-limited; a consumed or expired token is rejected before any write.
hsuite client bulk-archive --query "old account"
# → prints a summary and a token, exits 11
hsuite confirm <token>
# → executes against the pinned tenant, writes progress + failures artifactsExit codes
hsuite exit-codes prints the full machine-readable map. In brief: 0 success, 2 usage, 3 empty
result, 4 auth, 5 not found, 6 forbidden, 7 rate limited, 8 retryable, 9 not implemented
on this API version, 10 config, 11 bulk confirmation required.
Coverage & phase note
hsuite covers the full v3 operational and CRM surface — clients, contacts, centers, reservations,
appointments, charges, services, leads, forms, webhooks, call records, AI sessions, and more (run hsuite
schema --json for the exhaustive tree) — plus reports and file upload/download. On v2, client and
contact have full read/write; center, industry, reservation, and reception-call (call
records) have partial write support; every other v3 noun is read-only or absent there. A handful of
legacy v2-only data/config endpoints round out the surface: call-allowance, dialing-rule,
time-zones, remote-phones, availability, meeting-room-resources, my-contacts. list commands
across both API versions support date-range filtering (--created-after/--created-before and
per-entity variants) and repeatable array filters. Nouns/verbs that exist on only one API generation
exit 9 with an explanatory message on the other — --help stays identical everywhere so the boundary
is taught rather than hidden. Every entity write is journaled and reversible with hsuite undo/hsuite history, and
tenant selection can be pinned per session (HS_TENANT) or made strict (require-tenant) so a stale
tab can't act on the wrong account. See skills/hostedsuite/references/COMMANDS.md for the full
breakdown.
