Doctor and Schema Introspection
Check the machine before you ship, and ask the CLI to describe any command's request and response shapes.
postsale doctor answers "is this machine ready?" postsale schema answers "what does this operation expect?" Together they save a lot of guesswork before batch work or automation.
In this article, we will run doctor and pre-flight, list and inspect operation schemas, and call out what schema does not cover.
Before We Begin
This article assumes that:
- The CLI is installed and authenticated when you want live checks
postsale schema --listworks from the local catalog without network auth
Run doctor
Here's how:
postsale doctor
postsale doctor --human
postsale doctor --examplesDoctor typically reports:
- Build identity:
checks.build.versionandchecks.build.commit(the short source commit id the release was built from;devfor a non-release build).--versionstays a bare semver, so this is where you pin the exact build. - Token validity. On an API key (
psk_…inPOSTSALE_TOKEN) the record reportscredential_kind: "api_key", the key's display prefix and no expiry; a login session that shadows a key is noted asignored_env_credential - LLM provider detection (for
postsale run) - API reachability and auth. A login session is probed through the user profile; an API key is probed through a scoped carriers read, and a key that lacks
read:carrierswarns instead of failing - Carriers and origin addresses
- Environment posture, including
checks.environment.test_label_mode(informational; see Test-label mode)
Pre-flight mode
postsale doctor --pre-flightAny warning becomes exit 75. We recommend this before batch label purchase in unattended runs.
Dual LLM keys
If both an Anthropic credential (ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN) and an OpenAI key exist without an override, doctor may warn and name the override knobs. Runtime still defaults to Anthropic when unset.
Inspect schemas
postsale schema --list
postsale schema --all
postsale schema orders.search
postsale schema shipments.create
postsale schema --human orders.get--list returns OpenAPI-backed slugs (verify live with postsale schema --list; see schema-slugs). --all is the bulk bootstrap document for hosts.
Agent equivalent for one tool: get_tool_schema.
Schema list is not the full CLI
Missing examples include shipments list, labels reprint, run, doctor, auth, continue, traces, and saved queries. See CLI-only commands. For those surfaces, trust --help and the feature articles.
Good to Know
| Symptom | Likely cause | What to do |
|---|---|---|
| Slug not found | CLI-only command | Use feature docs / --help |
| Pre-flight exit 75 | Warnings present | Fix warnings before money batches |
Additional Reading
On this page
Related