deeprelay launch
Run a coding tool on deeprelay for one session, with a cost receipt on exit
Run a coding tool on deeprelay for one session, with a cost receipt on exit
Synopsis
Runs a coding tool on deeprelay for one session, then prints a cost receipt when it exits. Nothing is written to the tool's config files: the configuration rides in the child process (environment variables or command-line overrides) and disappears with it. For a persistent configuration, use deeprelay setup instead; the two pick the same models by default and read the key from the same place.
Your API key is never shown or persisted. It is resolved the same way deeprelay auth token resolves it (the DEEPRELAY_API_KEY environment variable, else the credentials file written by deeprelay login) and handed only to the launched tool.
Tools
deeprelay launch claude-code: Claude Code, through the Anthropic-compatible/v1/messagesendpoint.deeprelay launch codex: Codex CLI, through the OpenAI-compatible/v1/responsesendpoint.deeprelay launch opencode: OpenCode, through the OpenAI-compatible/v1/chat/completionsendpoint.
Cursor and VS Code (GitHub Copilot) store their model configuration inside the app, so there is nothing a per-session launch can inject; see the coding-agents guide for their one-time setup.
The receipt
Every launch mints a session id and injects it as a request header, so each of the session's requests lands in your request log tagged with that id. On exit, the CLI reads those rows back and prints what the session actually cost: per-model requests, input/cached/output tokens, and the exact billed total. The same rows stay queryable afterwards:
deeprelay requests list --client-request-id <session id>
Requests made by other tools or sessions on the same key are never counted, because they carry a different id. Use --no-receipt to skip the lookup, and -o json to get the receipt as JSON on stdout for scripts.
Passing arguments through
Everything after the tool name (or after --) is passed to the tool unchanged, so headless runs work:
deeprelay launch claude-code -- -p "fix the failing test" < /dev/null
deeprelay launch codex exec "add a healthcheck endpoint"
deeprelay launch opencode run "explain this repo"
The tool's exit code is passed through unchanged.
Options
-h, --help help for launch
Options inherited from parent commands
--api-base string API base URL (override with DEEPRELAY_API_BASE env) (default "https://api.deeprelay.ai/v1")
--debug Enable debug logging to stderr
--no-preflight Skip the plan/credit check before inference requests (override with DEEPRELAY_NO_PREFLIGHT env)
-o, --output string Output format: table|json (default table on TTY, json otherwise) (default "table")
SEE ALSO
- deeprelay - deeprelay command-line interface
- deeprelay launch claude-code - Run one Claude Code session on deeprelay (nothing persisted, receipt on exit)
- deeprelay launch codex - Run one Codex CLI session on deeprelay (nothing persisted, receipt on exit)
- deeprelay launch opencode - Run one OpenCode session on deeprelay (nothing persisted, receipt on exit)