Docs/Developers

CLI

The Hermes CLI puts the entire platform in your terminal — connections, triggers, drafts, signals, templates, and analytics — scriptable and agent-friendly.

Install
npm install -g @tryhermes/cli

Handing the CLI to an AI agent? The agent-facing reference — every command, workflow, and convention, written for agents to read directly — lives at docs.tryhermes.dev.

Sign in

Terminal
hermes auth login

This opens a browser sign-in (device flow) and connects your whole account — every organization you belong to. For CI or single-org use, sign in with an API key from Settings → API keys instead:

Terminal
hermes auth login --key hk_...

Check who you are and which org you're operating on at any time with hermes auth whoami.

Pick an organization

If you belong to several organizations, either pass --org <slug> per command or link a directory to an org once:

Terminal
hermes link          # writes ./.hermes/project.json

From then on, every hermes command in that directory targets the linked org — handy when a repo maps to one workspace.

Commands

GroupWhat it covers
hermes connectionsList, add, and remove data sources; view and refresh schemas; run ad-hoc read-only queries.
hermes triggersCreate, update, preview, activate, pause, run, and delete campaigns.
hermes signalsList, inspect, review, dismiss, and restore signals; discover kicks a discovery pass.
hermes draftsThe review queue: list, show, approve (single or batch), reject.
hermes emailsSent history and per-email delivery timelines.
hermes templatesList, create, AI-design, update, publish, archive, set the org default, and switch the org's rendering mode.
hermes domainsRegister sending domains, view DNS records, verify.
hermes sendersManage sender identities.
hermes analyticsOrg-wide overview and per-trigger campaign funnels.
hermes orgs / hermes auth / hermes linkAccount and workspace plumbing.

A working session

Terminal
# What did discovery find?
hermes signals list --status new

# Turn an idea into a campaign and see who it matches
hermes triggers create
hermes triggers preview trg_123

# Run it now instead of waiting for the schedule
hermes triggers run trg_123

# Review what it drafted, then approve the good ones
hermes drafts list --trigger trg_123
hermes drafts approve

Flags for scripts and agents

FlagEffect
--jsonStructured JSON output on any command — pipe into jq or feed to an agent.
--org <slug>Target a specific organization, overriding any directory link.
--no-waitDon't poll async operations (trigger runs, discovery) — return the job ID immediately.

The CLI is a thin client over the same REST API the dashboard uses, so anything you script against it behaves identically to clicking the button.