CLI commands
hypequery CLI commands for working with hypequery cloud.
hypequery cloud is not live yet
| Command | Purpose |
|---|---|
hypequery login | Authorize this machine with hypequery cloud and save a default project and environment |
hypequery login --device | Sign in without a browser on this machine: approve a code from any browser |
hypequery logout | Revoke 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:status | Show the live release and hosted REST and MCP URLs |
hypequery deployment:validate <artifact> | Verify a bundle or contract and report its identity |
hypequery pull | Download 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:publishThe 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.
| Option | Description |
|---|---|
--device | Sign 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:
HYPEQUERY_API_TOKEN: a management token (hqmt_…) or a project deploy key (hqdp_…). The CLI reads the prefix and sends either toHYPEQUERY_CLOUD_URL(defaulthttps://cloud.hypequery.com), unless--endpointorHYPEQUERY_DEPLOYMENT_ENDPOINTnames another endpoint. Any other token needs that explicit endpoint. WhenHYPEQUERY_API_TOKENis set in your shell, the CLI refuses aHYPEQUERY_CLOUD_URLorHYPEQUERY_DEPLOYMENT_ENDPOINTthat came from a project.envfile, 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--endpointorHYPEQUERY_DEPLOYMENT_ENDPOINTon another host is refused. Only a deploy key may go to a custom endpoint.- The management token stored by
hypequery loginorhypequery login --device, forHYPEQUERY_CLOUD_URLwhen it is set, otherwise for your latest sign-in. - The deploy credential stored by browser sign-in. With
HYPEQUERY_CLOUD_URLset, 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-inputhypequery 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/mcpCloud 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.
| Option | Description |
|---|---|
--mcp-config | Also print MCP client configuration for the hosted endpoint. It reads the key from ${HYPEQUERY_API_KEY} and never contains a credential |
--project, --environment | Override the target from hypequery login |
--replace-restored | Replace a live release that was restored from history |
--take-ownership | Replace 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-source | Leave 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-configThe 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.
| Option | Description |
|---|---|
--project, --environment | Override the target from hypequery login; pass both together |
--endpoint | Use an explicit cloud submission endpoint with HYPEQUERY_API_TOKEN |
--mcp-config | Also print MCP client configuration for the hosted endpoint |