github cosscom/coss coss-cli@0.2.0
coss-cli 0.2.0

3 hours ago

Minor Changes

  • e13f0e4: coss.email.templates.render(template, { version, locale, variables }) renders a template's draft (or a published version) as a send would, without sending (POST /v1/email_templates/{id}/render). The CLI gets coss domains list|add|get|verify (DNS records as a table or zone-file lines with --format bind; verify --wait follows the domain until it's verified) and templates as code: coss templates list|pull|push|preview (a folder per template, push --watch and --publish, preview --var … --open).
  • 2857473: coss/diagnose explains an email's delivery: diagnose(coss, id) reads the email, its events and its account context, and diagnoseEmail is the pure part (moved from coss-mcp, which now uses it and still re-exports it). The CLI gets coss emails list, coss emails get, coss emails events and coss emails diagnose, and coss inbox (the inbound domain, then received emails as they arrive) with coss inbox get.
  • e2ddd7a: coss hooks …: create Hooks applications, event types and endpoints (endpoints add prints the signing secret), send messages (--data, -F fields, or the event type's example), follow deliveries and their attempts, retry one, and open an application's portal. coss risk …: assess an event and see the decision, score and reasons (sandbox fixtures produce each decision), list assessments and the review queue, send feedback, and manage the allow and block lists. Help and errors for groups inside groups (coss hooks apps) now name their own commands.
  • 3a02992: coss init sets a project up: it installs coss with the project's package manager and writes a new development key, approved in the dashboard and named after the project, to .env.local (Next.js) or .env. coss profiles list and coss use <profile> show and switch the saved profiles, and coss open [page] opens the environment's dashboard page. A daily update notice says when a newer coss-cli exists (COSS_NO_UPDATE_CHECK=1 turns it off), and completion offers saved profile names.
  • 78b99d3: Test webhook events: coss.webhookEvents.test({ type, data }) (POST /v1/webhook_events/test) sends a sample event of a type to the environment's subscribed endpoints and open listeners, exactly like a real one (sandbox keys; every type but the live-only domain.*, account.* and billing.*). The SDK also exports WEBHOOK_EVENT_TYPES, TEST_WEBHOOK_EVENT_TYPES and isLiveOnlyEventType. The CLI gets coss trigger <event-type> (with --data and -F, so coss listen + coss trigger exercises a local handler), and coss webhooks list, coss webhooks deliveries <endpoint> and coss webhooks retry <endpoint> <delivery>.
  • 8fea903: coss.request(method, path, options) calls any endpoint by its path (for one the SDK has no method for yet), with the client's key, version, timeout and retries; POST, PUT and PATCH are retried only with retry: true. The CLI's new coss api <path> uses it: -f/-F fields, --input bodies (or stdin), --paginate and --raw. Also coss completion bash|zsh|fish, and every command's --help is now generated from its flags.

Patch Changes

Don't miss a new coss release

NewReleases is sending notifications on new releases.