Emend
Local OSS

doctor & api

Run setup diagnostics and make raw HTTP calls to any Emend endpoint.

emend doctor / emend api

Two low-level tools for debugging and development:

  • doctor check — automated setup diagnostics (env file, API key, server reachability, Python version).
  • api call — make a raw HTTP request to any Emend endpoint, with automatic Bearer-token auth.

emend doctor check

Info
doctor is oriented toward Local OSS. Its failure hints point at emend services start, local ports, and local .env files.

Run diagnostic checks on your Emend configuration and connectivity. Useful as a first step when something isn't working.

emend doctor check

Checks performed

CheckWhat it verifies
env_fileA .env file exists at ~/.emend/.env. Warning only — the CLI can still work with env variables set in the shell.
api_keyEMEND_API_KEY is resolved from env, .env, or --api-key. Warning if missing.
server_healthGET {EMEND_URL}/health returns 200. Failure if the server is unreachable or unhealthy.
python_versionPython ≥ 3.12 (recommended). Warning if older.

Exits with code 1 if any check reports fail. Warnings (missing env file, older Python) are non-fatal.

emend doctor checkemend --json doctor check  # structured output for CI

emend api call

Raw HTTP client for Emend endpoints. Handles Bearer-token auth and JSON serialization so you can test new endpoints without writing a full script.

emend api call <METHOD> <PATH> [--data '<json>']
PropType
METHODstr (positional)
PATHstr (positional)
--datastr

Examples

# Health checkemend api call GET /health # List agent playbooks with a filteremend api call POST /api/get_agent_playbooks --data '{"limit": 5}' # Load a larger payload from diskemend api call POST /api/publish_interaction --data @payload.json # Structured output for piping to jqemend --json api call POST /api/search_profiles \  --data '{"user_id":"user_123","query":"travel"}' \| jq '.data[0]'

api call sends the same Authorization: Bearer header as every other CLI command, derived from EMEND_API_KEY or --api-key. You do not need to add auth headers manually.