docsrs-cli 1.2.0

One-shot stdin/stdout CLI that fetches crates.io and docs.rs docs for LLM agents without a daemon
Documentation
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "docsrs-cli JSON error envelope",
  "type": "object",
  "description": "Top-level JSON written on failure when JSON output is selected. Not nested under data. Camada Y: top-level command + duration_ms match success envelopes for agent correlation.",
  "required": ["schema_version", "ok", "command", "duration_ms", "error"],
  "additionalProperties": false,
  "properties": {
    "schema_version": {
      "type": "integer",
      "const": 1
    },
    "ok": {
      "type": "boolean",
      "const": false
    },
    "command": {
      "type": "string",
      "description": "Wire command name (get-item, search-crates, usage, cache-path, …). usage when clap fails before dispatch."
    },
    "duration_ms": {
      "type": "integer",
      "minimum": 0,
      "description": "Wall-clock duration of the attempt in milliseconds (0 for early parse/config failures)"
    },
    "error": {
      "type": "object",
      "required": ["code", "kind", "message", "retryable"],
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "integer",
          "minimum": 0,
          "maximum": 255,
          "description": "Process exit code"
        },
        "kind": {
          "type": "string",
          "description": "Stable snake_case ErrorKind discriminant on the wire (usage|invalid_input|not_found|rate_limited|unavailable|timeout|network|budget|parse|config|internal|broken_pipe|canceled). budget = local body/output budget exceeded (exit 74, retryable=false). canceled covers SIGINT/SIGTERM (exit 130/143); internal Interrupted/Terminated map to canceled on the wire."
        },
        "message": {
          "type": "string",
          "description": "Technical English message (never secrets)"
        },
        "retryable": {
          "type": "boolean",
          "description": "True only for transient failures (rate_limited, unavailable, timeout, network). budget is permanent for the same config."
        },
        "retry_after_secs": {
          "type": "integer",
          "minimum": 0,
          "description": "Omitted when absent; never JSON null"
        }
      }
    }
  }
}