Skip to main content

Overview

Geni registers a suite of Artisan console commands for exporting specifications, verifying drift, diagnosing unresolved types, running MCP servers, and managing cache.
Every command accepts --api, which must be default (the default value) or a key of config('geni.apis'). Any other name prints Unknown API "..." and the command fails with a non-zero exit code instead of silently using the default document.Since 3.0, geni:cache, geni:check, geni:export and geni:analyze build the document of the requested API. In 2.x they ignored --api and always built the default document.

geni:export

Export the OpenAPI specification to a file on disk:

Options

  • --path: Relative or absolute path where the JSON specification file will be written (default: openapi.json).
  • --api: Name of a specific API version configured in config('geni.apis') to export. If omitted, exports the default root API.
When caching is enabled, geni:export writes the cached document if one exists; run geni:clear first after code changes.

geni:check

Compare the current codebase against a committed specification file and exit with a non-zero status code if drift is detected:

Options

  • --path: Path to the committed OpenAPI JSON specification file to compare against (default: openapi.json).
  • --api: Name of a specific API version to check.

Return Codes

  • 0: Specifications match exactly (accounting for canonicalized key ordering).
  • 1: Specifications differ; diff is printed to console.

geni:analyze

Inspect all unresolved inference diagnostics across your application:

Options

  • --json: Output diagnostics formatted as JSON instead of a formatted terminal table.
  • --api: Analyze a specific named API version.

Diagnostic Output Example


geni:mcp

Generate a Model Context Protocol (MCP) tool manifest or client configuration snippet:

Options

  • --path: Destination file path (default: mcp-manifest.json). Use - to print to standard output.
  • --format: Output format. Supported options:
    • manifest: Standard MCP tool manifest (default).
    • client-config: Ready-to-use mcpServers JSON block for claude_desktop_config.json.
  • --base-url: Base URL written into the client configuration. Defaults to url('/').
  • --api: Target a specific named API version.

geni:mcp:serve

Start a live Model Context Protocol (MCP) stdio server responding to JSON-RPC protocol requests from AI desktop clients:

Options

  • --api: Target a specific named API version.
  • --base-url: Base URL for dispatched HTTP tool execution requests.
  • --timeout: HTTP execution request timeout in seconds (default: 15).

geni:cache

Pre-compute and cache the generated OpenAPI specification in your configured Laravel cache store:
Use --api to cache a named API; each API is stored under its own cache key. When caching is enabled in config('geni.cache.enabled'), subsequent visits to /docs/api.json serve directly from cache with zero inference overhead.

geni:clear

Clear the cached OpenAPI specification from your Laravel cache store: