Creation:2024-08-11Last update:2026-01-06

    List content declaration files

    bash
    npx intlayer content list

    Aliases:

    • npx intlayer list

    This command displays all content declaration files in your project, showing their dictionary keys and file paths. It's useful for getting an overview of all your content files and verifying that they are properly discovered by Intlayer.

    Arguments:

    • --json: Output the results as JSON instead of formatted text. Useful for scripting and programmatic access.

      Example: npx intlayer content list --json

    Examples:

    List content declaration files:

    bash
    npx intlayer content list

    Output as JSON:

    bash
    npx intlayer content list --json

    Output as absolute paths:

    bash
    npx intlayer content list --absolute

    Example output:

    Formatted output:

    bash
    npx intlayer content listContent declaration files: - home-page        - src/components/HomePage/homePage.content.ts - server-component - src/components/ServerComponent/serverComponent.content.ts - client-component - src/components/ClientComponent/clientComponent.content.tsTotal content declaration files: 3

    JSON output:

    bash
    $ npx intlayer content list --json[{"key":"home-page","path":"src/components/HomePage/homePage.content.ts"},{"key":"server-component","path":"src/components/ServerComponent/serverComponent.content.ts"},{"key":"client-component","path":"src/components/ClientComponent/clientComponent.content.ts"}]

    This command will output:

    • A formatted list of all content declaration files with their keys and relative file paths
    • The total count of content declaration files found

    The output helps you verify that all your content files are properly configured and discoverable by the Intlayer system.