Skip to content

[DOCS] CLI: tools validate exit code, status --format json|yaml, agents --environment syntax #1038

Closed

Description

@edenreich

Summary

inference-gateway/cli#1648 (part of inference-gateway/cli#1643) changes three CLI behaviors that the docs site describes:

  1. infer tools validate <command> now exits non-zero, with the reason on stderr, when the command is not allowed or tools are disabled. It can gate a shell conditional:

    infer tools validate "$cmd" && eval "$cmd"
  2. infer status --format json|yaml prints one object with url, status (running or unreachable), version, source, models (active model count) and, when the gateway is unreachable, error. An unreachable gateway still exits 0. An unknown format exits non-zero. Before, both formats printed the text block followed by Output format: json.

    infer status --format json | jq -r .status
  3. infer agents add|update --environment accepts KEY=VALUE,KEY=VALUE. The repeated --environment KEY=VALUE form still works. An empty --environment "" is now rejected.

The in-repo copies (docs/commands-reference.md, docs/agents-configuration.md in inference-gateway/cli) are already updated in the source PR.

Affected pages:

  • cli.md - the infer tools validate sections (around lines 2524-2529 and 4887), the infer status sections (around lines 153, 291, 4861 and 4932), and the infer agents add/update examples (around line 4512)
  • a2a.md - the --environment KEY=value example (around line 137)

Acceptance Criteria

  • cli.md states that infer tools validate exits non-zero for a disallowed command or disabled tools, with the && eval example
  • cli.md documents infer status --format json|yaml, its fields and its exit codes
  • cli.md and a2a.md show the comma-separated --environment KEY=VALUE,KEY=VALUE form next to the repeated-flag form

Activity

  1. added
    documentation
    on Oct 30, 2026
  2. added theissue type on Oct 30, 2026
  3. moved this to Todo in 2026on Oct 30, 2026
  4. edenreich commented on Oct 30, 2026

    @edenreich
    ContributorAuthor

    @claude can you document this?

  5. inference-gateway-maintainer commented on Oct 30, 2026

    @inference-gateway-maintainer
    Contributor

    Claude finished @edenreich's task in 2m 27s —— View job • docs/issue-1038-20261030-1929 • Create PR ➔


    Documented - PR #1039

    • Read the affected sections of cli.md and a2a.md
    • tools validate exit code + && eval example
    • status --format json|yaml fields and exit codes
    • comma-separated --environment form in both pages
    • lint / format / build (all pass)
    • commit and open PR

    What changed

    cli.md

    • "Running Tools Directly" now states that infer tools validate exits non-zero with the reason on stderr when the command is not allowed or tools are disabled, and shows the infer tools validate "$cmd" && eval "$cmd" gate. The troubleshooting snippet carries the same one-line note.
    • New ### Gateway Status section under Core Commands: infer status --format json|yaml, a table of the url, status (running/unreachable), version, source, models and error fields, the jq -r .status example, and the exit codes - unreachable still exits 0, an unknown format exits non-zero. Both the Core Commands and Command Reference rows for infer status mention --format and link to it.
    • A2A setup examples gained the --environment API_KEY=secret,LOG_LEVEL=debug form next to the repeated-flag form, with a note that the two mix and that --environment "" is rejected.

    a2a.md - the --environment example now shows both forms, with the same note.

    No in-repo generated sections were touched.

    | Branch: docs/issue-1038-20261030-1929

  6. moved this from Todo to In progress in 2026on Oct 30, 2026
  7. moved this from In progress to QA in 2026on Oct 30, 2026
  8. moved this from QA to Done in 2026on Oct 31, 2026
  9. inference-gateway-releaser commented on Oct 31, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.23 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions