Command line (CLI)
Resolve and send saved requests from your terminal with mitey run and mitey ls.
The same mitey binary that runs the desktop app is also a command-line tool. With
no arguments it launches the app; given a subcommand it runs headless — no window, no
webview — resolving a saved request exactly the way the app does (variable scope chain
- folder inheritance) and sending it with the same HTTP engine.
This makes Mitey scriptable: run a request in CI, pipe a response into jq, or
smoke-test an endpoint from a shell.
mitey run
Resolve a saved request and send it, printing the response.
mitey run <request> [--workspace <dir>] [--env <name>] [--var k=v]… [--json] [--no-secrets] <request> may be:
- a path — absolute, or relative to the workspace (
"HTTP Basics/get.request.yaml"); - a name — the request’s display name, case-insensitive (
"GET / echo"); - a slug — the request file’s stem (
get).
A name/slug must match exactly one request in the workspace, or the command reports the ambiguity.
# Against the workspace open in the app:
mitey run "GET / echo"
# Explicit workspace, an environment, and a one-off variable override:
mitey run login --workspace ~/work/api --env staging --var user=alice The response prints as a status line, the response headers, then the body:
200 OK · 84 ms · https://api.example.com/login
content-type: application/json
…
{"token":"…"} Exit code: 0 for a 2xx response, 1 for any other status, 2 for an error
(couldn’t resolve or send). So mitey run … && deploy works as a gate.
--json
Emit the whole response as one JSON object (status, timing, headers, body, and, when
secrets were withheld, redactedVars, redactedAuth and redactedTls), ready to pipe:
mitey run health --json | jq -r .status Binary response bodies are base64 in bodyBase64 (with body empty).
Running a workflow
mitey run also runs a workflow, by its name or its .flow.yaml file:
mitey run "Submission lifecycle" --env Local
mitey run .flows/submission-lifecycle.flow.yaml --var title="Q3 report" It prints a line as each step passes, fails, retries or polls, then the variables the
run produced (secret ones masked). --var overrides any variable for every step, the
workflow’s own variables included. --json prints the run summary instead.
The exit code is 0 only when the whole workflow passed. A name that matches both a
request and a workflow runs the request; use the file path for the workflow.
mitey ls
List the workspace’s requests as a tree (or, with --json, a flat array of { name, method, protocol, path } with workspace-relative paths).
mitey ls
mitey ls --workspace ~/work/api --json Auth/
GET Bearer (Auth/bearer.request.yaml)
HTTP Basics/
GET GET / echo (HTTP Basics/get.request.yaml)
POST POST JSON (HTTP Basics/post-json.request.yaml) Choosing the workspace
Every command resolves its workspace in this order:
- an explicit
--workspace <dir>; - otherwise, the workspace currently open in the app — Mitey writes a small
pointer file while it’s running, so
mitey run login“just works” against whatever you have open; - otherwise, a clear error (“no workspace — open one in Mitey, or pass —workspace”).
The pointer is cleared when you quit the app, so the no---workspace form only resolves
while Mitey is open. Pass --workspace explicitly for use in CI or scripts.
Variables, secrets, and scripts
--var k=voverrides a variable for this run and takes precedence over every other scope (globals, folder, environment, and request-local). Repeat it for several.Secrets are off for the command line until you turn them on. In Mitey, open the Agents tab, then Connect, and tick Let the command line use your secrets. Until then,
mitey runnever opens the vault and sends requests without their secrets: secret-backed variables resolve empty and are named (as a note, or inredactedVarsunder--json), a vault-stored auth credential isn’t sent (a note, orredactedAuth: true), and a client certificate’s vault-stored key or passphrase isn’t used (redactedTls: true). A request that uses no secret never touches the keychain, so a secret-free run in CI or over SSH won’t prompt or stall. Once it’s on, a vault unlock may prompt your OS keychain, which an interactive terminal can answer. If a request uses a secret and the keychain can’t be read (locked, or no keyring on the machine),mitey runstops with an error and sends nothing, rather than sending the request without its credentials; pass--no-secretsto send it without them.--no-secretsalways sends nothing from the vault, whatever the setting.It’s off because any program that can run
miteyas you could otherwise use every secret in your vault, and send it wherever a request, or a--var, points. That includes an AI agent with a shell, which is how Claude Code, Cursor and Copilot agents usually work. Command-line runs don’t go through the approvals, the Agent access switch or the Activity log that govern agents connected over MCP. Leave it off on a machine where an agent has a shell, unless the agent runs sandboxed away from your account.Scripts don’t run headless: pre/post-request scripts are skipped and
ƒxvalue scripts resolve empty, because the terminal has no way to review-and-enable an untrusted script the way the app does. (Everything else — auth, inheritance, variable substitution, TLS — is fully applied.)