# CLI Reference

stac_check.cli.is_item_collection(file: str, headers: dict = None) → bool

  Detect if a file is an item collection (FeatureCollection with features).

  Parameters:

    - file – Path or URL to the file

    - headers – Optional HTTP headers for URL requests

  Returns:

    True if the file is an item collection, False otherwise

## stac-check

Main entry point for the stac-check CLI.

Args:

  file: The STAC file or URL to validate collections: Validate a collections endpoint item_collection: Validate an item collection pages: Number of pages to validate (for API endpoints) recursive: Recursively validate linked STAC objects max_depth: Maximum depth for recursive validation assets: Validate assets links: Validate links no_assets_urls: Disable URL validation for assets header: Additional HTTP headers pydantic: Use stac-pydantic for validation verbose: Show verbose output output: Save output to file (only with –collections, –item-collection, or –recursive) fast: Fast validation mode (skips geometry checks and linting for maximum performance) fast_linting: Fast validation mode with linting (skips geometry checks for maximum performance)

    stac-check [OPTIONS] FILE

Options

--version

  Show the version and exit.

--fast-linting

  Use FastJSONSchema for high-speed validation with linting. Skips geometry checks for maximum performance.

--fast

  Use FastJSONSchema for high-speed validation. Skips geometry checks and linting for maximum performance.

-v, --verbose

  Enable verbose output.

--pydantic

  Use pydantic validation (requires stac-pydantic to be installed).

--header <header>

  HTTP header to include in the requests. Can be used multiple times.

--no-assets-urls

  Disables the opening of href links when validating assets (enabled by default).

-o, --output <output>

  Save output to the specified file. Only works with –collections, –item-collection, or –recursive.

-l, --links

  Validate links for format and response.

-a, --assets

  Validate assets for format and response.

-m, --max-depth <max_depth>

  Maximum depth to traverse when recursing. Omit this argument to get full recursion. Ignored if recursive == False.

-r, --recursive

  Recursively validate all related stac objects.

-p, --pages <pages>

  Maximum number of pages to validate via –item-collection or –collections. Defaults to one page.

--item-collection

  Validate item collection response. Can be combined with –pages. Defaults to one page.

--collections

  Validate collections endpoint response. Can be combined with –pages. Defaults to one page.

Arguments

FILE

  Required argument