首页演练场案例展示应用文档博客
    • English英语
      EN
    • русский俄语
      RU
    • 日本語日语
      JA
    • français法语
      FR
    • 한국어韩语
      KO
    • 中文中文
      ZH
    • español西班牙语
      ES
    • Deutsch德语
      DE
    • العربية阿拉伯语
      AR
    • italiano意大利语
      IT
    • British English英国英语
      EN-GB
    • português葡萄牙语
      PT
    • हिन्दी印地语
      HI
    • Türkçe土耳其语
      TR
    • polski波兰语
      PL
    • Indonesia印度尼西亚语
      ID
    • Tiếng Việt越南语
      VI
    • українська乌克兰语
      UK
    /
    按框架筛选文档
    Alt+←
    为什么Intlayer?
    开始
    概念
    • Intlayer如何工作
    • 配置
    • TestFillBuildWatchExtractLoginPushPullConfigurationListVersionEditorLiveDebugDoc ReviewDoc TranslateSDK
    • 可视化编辑器
    • CMS
    • CI/CD集成
    • 翻译复数枚举条件性别插入文件嵌套MarkdownHTML函数获取
    • 每个语言环境的文件
    • 编译器
    • 自动填充
    • 测试
    • 打包优化
    环境
    • Next.js 14和应用路由器
      Next.js 15
      Next.js 无 locale URL
      Next.js和页面路由器
      编译器
    • Tanstack Start Solid
    • Astro和React
      Astro和Svelte
      Astro和Vue
      Astro和Solid
      Astro和Preact
      Astro和Lit
      Astro和Vanilla JS
    • React Router v7
      React Router v7 (fs-routes)
      Compiler
    • Nuxt和Vue
    • Vite和Solid
    • SvelteKit
    • Vite和Preact
    • Vite和Vanilla JS
    • Vite和Lit
    • Angular 19 (Webpack)
      Analog
    • React CRA
    • React Native和Expo
    • Express.js
      NestJS
      Fastify
      Hono
      Adonis
    • Lynx和React
    Plugins
    • JSON
    • gettext (.po)
    VS Code扩展
    代理
    • MCP服务器
    • 代理技能
    发布
    • v8
    • v7
    • v6
    基准测试
    • Next.js
    • TanStack
    • Vue
    • Solid
    • Svelte
    博客
    问问题
    1. Documentation
    2. 概念
    3. CLI
    4. List
    Creation:2024-08-11Last update:2026-01-06
    将此文档参考到您的 AI 助手
    ChatGPT
    Claude
    DeepSeek
    Google AI mode
    Gemini
    Perplexity
    Mistral
    Grok

    使用您最喜欢的AI助手总结文档,并引用此页面和AI提供商

    版本历史

    1. "为 list 命令添加绝对路径输出选项"
      v7.5.122026/1/6
    2. "为 list 命令添加 JSON 输出选项"
      v7.5.112026/1/6

    此页面的内容已使用 AI 翻译。

    查看英文原文的最新版本
    编辑此文档

    如果您有改善此文档的想法,请随时通过在GitHub上提交拉取请求来贡献。

    文档的 GitHub 链接
    Copy

    复制文档 Markdown 到剪贴板

    列出内容声明文件

    bash
    复制代码

    复制代码到剪贴板

    npx intlayer content list

    别名:

    • npx intlayer list

    此命令显示项目中所有内容声明文件,展示它们的字典键和文件路径。它有助于概览所有内容文件,并验证它们是否被 Intlayer 正确发现。

    参数:

    • --json: 以 JSON 格式输出结果,而不是格式化文本。对脚本编写和程序化访问很有用。

      示例: npx intlayer content list --json

    示例:

    列出内容声明文件:

    bash
    复制代码

    复制代码到剪贴板

    npx intlayer content list

    以 JSON 格式输出:

    bash
    复制代码

    复制代码到剪贴板

    npx intlayer content list --json

    以绝对路径输出:

    bash
    复制代码

    复制代码到剪贴板

    npx intlayer content list --absolute

    示例输出:

    格式化输出:

    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.ts内容声明文件总数:3

    JSON 输出:

    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"}]

    此命令将输出:

    • 所有内容声明文件的格式化列表,包含它们的键和相对文件路径
    • 发现的内容声明文件总数

    该输出帮助您验证所有内容文件是否已正确配置并能被 Intlayer 系统发现。

    Configuration
    Version
    Alt+→

    在此页面

      讨论是匿名的,并会定期审查以解决常见问题。欢迎分享功能想法、对文档的反馈或任何与 Intlayer 相关的内容, 我们会利用这些意见来制定路线图并改进产品。

      npx intlayer content list
      npx intlayer content list
      npx intlayer content list --json
      npx intlayer content list --absolute
      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.ts内容声明文件总数:3
      $ 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"}]