Skip to Content
Cloud

CLI commands

hypequery CLI commands for working with hypequery cloud.

hypequery cloud is not live yet

You can't sign up for or deploy to cloud today. These pages describe the planned service, and details will change before launch. What runs today is the open-source TypeScript and Python SDKs, in your own backend.
CommandPurpose
hypequery loginAuthorize this machine with hypequery cloud and save a default project and environment
hypequery login --deviceSign in without a browser on this machine: approve a code from any browser
hypequery logoutRevoke and remove the local cloud credentials
hypequery deploy <source>Build, release, and submit a TypeScript publication in one step
hypequery deployment:build <cloud>Build a verified deployment bundle without releasing it
hypequery deployment:release <bundle>Bind a bundle to a project and environment as a release
hypequery deployment:submit <bundle> --release <path>Submit a prebuilt bundle and release
hypequery deployment:statusShow the live release and hosted REST and MCP URLs
hypequery deployment:validate <artifact>Verify a bundle or contract and report its identity
hypequery pullDownload the source snapshot from the live deployment
hypequery diff [source]Compare local source with the live deployment
hypequery mcp --self-test --url <url>Check a hosted MCP endpoint
hypequery <group> <action>Run any hypequery Cloud operation: projects, releases, drafts, connections, logs, members, api-keys and more. See Cloud operation commands

Most commands accept --project and --environment to override the target saved by hypequery login.

Signing in

hypequery login opens a browser on this machine. Where no browser can open (SSH, a container, a coding agent's sandbox), use device sign-in: the CLI prints a short code and a URL, and you approve the code from any browser.

npx hypequery login --device
# To sign in to hypequery Cloud, open https://cloud.hypequery.com/cli/device and enter the code: BCDF-GHJK
npx hypequery login --device --project shop --capabilities workspace:view,deployment:publish

The browser opens by itself only when a person is at the terminal and --no-input is not set. The CLI polls until the code is approved, denied or expires (10 minutes). The code and URL always go to stderr, so --json output stays one document and redirecting stdout never hides them.

OptionDescription
--deviceSign in by approving a code in any browser
--project <slug>With --device: limit the token to one Cloud project
--capabilities <list>With --device: cap the token below your role, comma-separated
--cloud-url <url>Cloud origin (or HYPEQUERY_CLOUD_URL)
--environment <environment>Browser sign-in only: the deployment target to save

Both sign-ins store a management token (hqmt_): user-bound, re-checked against your role on every call, valid for 30 days, and listed under Settings › CLI sign-ins where you can revoke it. Browser sign-in also stores the 12-hour deploy credential it always has. Tokens go to the operating-system credential vault. Where there is none (common on headless Linux), the management token is kept in an owner-only file (0600) in the CLI's config directory, and the CLI says so; the deploy credential is never written to a file, so browser sign-in then keeps only the management token. One management token is kept per Cloud origin. hypequery logout revokes and removes all of them.

Device sign-in doesn't save a deployment target yet, so pass --project and --environment to deploy, status, pull and diff after it.

hypequery login signs in to --cloud-url, else HYPEQUERY_CLOUD_URL, else https://cloud.hypequery.com. It refuses a HYPEQUERY_CLOUD_URL that came from a project .env file, because that server would receive your sign-in and the 30-day token; pass --cloud-url or set the variable in your shell. When the shell names a Cloud other than the default, the CLI prints it on stderr before it opens the browser or shows the code.

The config directory (HYPEQUERY_CONFIG_DIR, XDG_CONFIG_HOME, APPDATA) is also read only from the shell, never from a .env file, and must be an absolute path.

Credentials in CI and scripts

Every command that talks to Cloud picks its credential in this order:

  1. HYPEQUERY_API_TOKEN: a management token (hqmt_…) or a project deploy key (hqdp_…). The CLI reads the prefix and sends either to HYPEQUERY_CLOUD_URL (default https://cloud.hypequery.com), unless --endpoint or HYPEQUERY_DEPLOYMENT_ENDPOINT names another endpoint. Any other token needs that explicit endpoint. When HYPEQUERY_API_TOKEN is set in your shell, the CLI refuses a HYPEQUERY_CLOUD_URL or HYPEQUERY_DEPLOYMENT_ENDPOINT that came from a project .env file, so a cloned repository can't redirect your token. Set them in your shell instead. A management token acts on your whole organisation, so it goes only to its own Cloud origin: an --endpoint or HYPEQUERY_DEPLOYMENT_ENDPOINT on another host is refused. Only a deploy key may go to a custom endpoint.
  2. The management token stored by hypequery login or hypequery login --device, for HYPEQUERY_CLOUD_URL when it is set, otherwise for your latest sign-in.
  3. The deploy credential stored by browser sign-in. With HYPEQUERY_CLOUD_URL set, it is used only when it was issued by that Cloud.
HYPEQUERY_API_TOKEN=hqdp_… npx hypequery deploy analytics/cloud.ts \
  --project acme:analytics --environment production --json --no-input

hypequery deploy <cloud>

Builds the publication module, prepares a release for the logged-in target, and submits it. Once cloud accepts the release, the CLI prints where it's served:

Hosted endpoints
  REST  https://<environment-slug>.hypequery.app
    orders  POST https://<environment-slug>.hypequery.app/api/analytics/datasets/orders/query
  MCP   https://<environment-slug>.hypequery.app/mcp

Cloud provides these URLs, so the CLI follows cloud's current routing. A live release is required before dataset calls work. A cloud release that doesn't provide endpoint details leaves deploy output unchanged.

OptionDescription
--mcp-configAlso print MCP client configuration for the hosted endpoint. It reads the key from ${HYPEQUERY_API_KEY} and never contains a credential
--project, --environmentOverride the target from hypequery login
--replace-restoredReplace a live release that was restored from history
--take-ownershipReplace a live model built in hypequery Cloud. The project is then managed in code. Without it, the CLI asks in a terminal and refuses in CI
--no-sourceLeave project source files out of the bundle

hypequery deployment:status

Shows the current release and cloud-provided REST and MCP URLs without building or deploying again. It uses the target and deployment credential saved by hypequery login. With an explicit deployment credential, pass both --project and --environment.

npx hypequery deployment:status
npx hypequery deployment:status --mcp-config

The command says when no release is live. Its optional MCP configuration uses ${HYPEQUERY_API_KEY} as a placeholder and never includes the stored deployment credential.

OptionDescription
--project, --environmentOverride the target from hypequery login; pass both together
--endpointUse an explicit cloud submission endpoint with HYPEQUERY_API_TOKEN
--mcp-configAlso print MCP client configuration for the hosted endpoint

On this page

Get early access to hypequery cloud.

Cloud hosts the same model you run in your backend, with a managed API and MCP server, versions, and rollback. We're letting teams in a few at a time. Join the waitlist and we'll reach out when your project can go live.

How do you want to build your analytics layer? (Optional)
What features do you most need? (Optional)

Pick as many as you like.

Only your email is required. All other questions are optional.