@intlayer/docs 5.5.12 → 5.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/dist/cjs/common.cjs.map +1 -1
  2. package/dist/esm/common.mjs.map +1 -1
  3. package/dist/types/common.d.ts +2 -0
  4. package/dist/types/common.d.ts.map +1 -1
  5. package/docs/ar/intlayer_CMS.md +1 -0
  6. package/docs/ar/intlayer_cli.md +292 -177
  7. package/docs/ar/intlayer_visual_editor.md +1 -0
  8. package/docs/ar/intlayer_with_angular.md +1 -0
  9. package/docs/ar/intlayer_with_create_react_app.md +1 -0
  10. package/docs/ar/intlayer_with_lynx+react.md +1 -0
  11. package/docs/ar/intlayer_with_nextjs_14.md +1 -0
  12. package/docs/ar/intlayer_with_nextjs_15.md +3 -1
  13. package/docs/ar/intlayer_with_nuxt.md +1 -0
  14. package/docs/ar/intlayer_with_react_native+expo.md +1 -0
  15. package/docs/ar/intlayer_with_vite+preact.md +4 -3
  16. package/docs/ar/intlayer_with_vite+react.md +8 -4
  17. package/docs/ar/intlayer_with_vite+solid.md +4 -3
  18. package/docs/ar/intlayer_with_vite+svelte.md +4 -3
  19. package/docs/ar/intlayer_with_vite+vue.md +5 -4
  20. package/docs/ar/mcp_server.md +126 -92
  21. package/docs/de/intlayer_CMS.md +1 -0
  22. package/docs/de/intlayer_cli.md +291 -171
  23. package/docs/de/intlayer_visual_editor.md +1 -0
  24. package/docs/de/intlayer_with_angular.md +1 -0
  25. package/docs/de/intlayer_with_create_react_app.md +1 -0
  26. package/docs/de/intlayer_with_lynx+react.md +1 -0
  27. package/docs/de/intlayer_with_nextjs_14.md +1 -0
  28. package/docs/de/intlayer_with_nextjs_15.md +3 -1
  29. package/docs/de/intlayer_with_nuxt.md +1 -0
  30. package/docs/de/intlayer_with_react_native+expo.md +1 -0
  31. package/docs/de/intlayer_with_vite+preact.md +4 -3
  32. package/docs/de/intlayer_with_vite+react.md +7 -4
  33. package/docs/de/intlayer_with_vite+solid.md +4 -3
  34. package/docs/de/intlayer_with_vite+svelte.md +4 -3
  35. package/docs/de/intlayer_with_vite+vue.md +5 -4
  36. package/docs/de/mcp_server.md +116 -112
  37. package/docs/en/configuration.md +7 -6
  38. package/docs/en/intlayer_CMS.md +1 -0
  39. package/docs/en/intlayer_cli.md +246 -138
  40. package/docs/en/intlayer_visual_editor.md +1 -0
  41. package/docs/en/intlayer_with_angular.md +1 -0
  42. package/docs/en/intlayer_with_create_react_app.md +1 -0
  43. package/docs/en/intlayer_with_lynx+react.md +1 -0
  44. package/docs/en/intlayer_with_nextjs_14.md +1 -0
  45. package/docs/en/intlayer_with_nextjs_15.md +3 -1
  46. package/docs/en/intlayer_with_nuxt.md +1 -0
  47. package/docs/en/intlayer_with_react_native+expo.md +1 -0
  48. package/docs/en/intlayer_with_vite+preact.md +6 -3
  49. package/docs/en/intlayer_with_vite+react.md +9 -3
  50. package/docs/en/intlayer_with_vite+solid.md +4 -3
  51. package/docs/en/intlayer_with_vite+svelte.md +4 -3
  52. package/docs/en/intlayer_with_vite+vue.md +7 -4
  53. package/docs/en/mcp_server.md +100 -107
  54. package/docs/en-GB/intlayer_CMS.md +1 -0
  55. package/docs/en-GB/intlayer_cli.md +257 -138
  56. package/docs/en-GB/intlayer_visual_editor.md +1 -0
  57. package/docs/en-GB/intlayer_with_angular.md +1 -0
  58. package/docs/en-GB/intlayer_with_create_react_app.md +1 -0
  59. package/docs/en-GB/intlayer_with_lynx+react.md +1 -0
  60. package/docs/en-GB/intlayer_with_nextjs_14.md +1 -0
  61. package/docs/en-GB/intlayer_with_nextjs_15.md +3 -1
  62. package/docs/en-GB/intlayer_with_nuxt.md +1 -0
  63. package/docs/en-GB/intlayer_with_react_native+expo.md +1 -0
  64. package/docs/en-GB/intlayer_with_vite+preact.md +4 -3
  65. package/docs/en-GB/intlayer_with_vite+react.md +7 -4
  66. package/docs/en-GB/intlayer_with_vite+solid.md +4 -3
  67. package/docs/en-GB/intlayer_with_vite+svelte.md +4 -3
  68. package/docs/en-GB/intlayer_with_vite+vue.md +5 -4
  69. package/docs/en-GB/mcp_server.md +116 -82
  70. package/docs/es/intlayer_CMS.md +1 -0
  71. package/docs/es/intlayer_cli.md +283 -164
  72. package/docs/es/intlayer_visual_editor.md +1 -0
  73. package/docs/es/intlayer_with_angular.md +1 -0
  74. package/docs/es/intlayer_with_create_react_app.md +1 -0
  75. package/docs/es/intlayer_with_lynx+react.md +1 -0
  76. package/docs/es/intlayer_with_nextjs_14.md +1 -0
  77. package/docs/es/intlayer_with_nextjs_15.md +3 -1
  78. package/docs/es/intlayer_with_nuxt.md +1 -0
  79. package/docs/es/intlayer_with_react_native+expo.md +1 -0
  80. package/docs/es/intlayer_with_vite+preact.md +4 -3
  81. package/docs/es/intlayer_with_vite+react.md +7 -4
  82. package/docs/es/intlayer_with_vite+solid.md +4 -3
  83. package/docs/es/intlayer_with_vite+svelte.md +4 -3
  84. package/docs/es/intlayer_with_vite+vue.md +5 -4
  85. package/docs/es/mcp_server.md +120 -86
  86. package/docs/es/vs_code_extension.md +1 -0
  87. package/docs/fr/intlayer_CMS.md +1 -0
  88. package/docs/fr/intlayer_cli.md +280 -184
  89. package/docs/fr/intlayer_visual_editor.md +1 -0
  90. package/docs/fr/intlayer_with_angular.md +1 -0
  91. package/docs/fr/intlayer_with_create_react_app.md +1 -0
  92. package/docs/fr/intlayer_with_lynx+react.md +1 -0
  93. package/docs/fr/intlayer_with_nextjs_14.md +1 -0
  94. package/docs/fr/intlayer_with_nextjs_15.md +3 -1
  95. package/docs/fr/intlayer_with_nuxt.md +1 -0
  96. package/docs/fr/intlayer_with_react_native+expo.md +1 -0
  97. package/docs/fr/intlayer_with_vite+preact.md +5 -4
  98. package/docs/fr/intlayer_with_vite+react.md +7 -4
  99. package/docs/fr/intlayer_with_vite+solid.md +4 -3
  100. package/docs/fr/intlayer_with_vite+svelte.md +4 -3
  101. package/docs/fr/intlayer_with_vite+vue.md +5 -4
  102. package/docs/fr/mcp_server.md +121 -87
  103. package/docs/hi/intlayer_CMS.md +1 -0
  104. package/docs/hi/intlayer_cli.md +295 -174
  105. package/docs/hi/intlayer_visual_editor.md +1 -0
  106. package/docs/hi/intlayer_with_angular.md +1 -0
  107. package/docs/hi/intlayer_with_create_react_app.md +1 -0
  108. package/docs/hi/intlayer_with_lynx+react.md +1 -0
  109. package/docs/hi/intlayer_with_nextjs_14.md +1 -0
  110. package/docs/hi/intlayer_with_nextjs_15.md +3 -1
  111. package/docs/hi/intlayer_with_nuxt.md +1 -0
  112. package/docs/hi/intlayer_with_react_native+expo.md +1 -0
  113. package/docs/hi/intlayer_with_vite+preact.md +4 -3
  114. package/docs/hi/intlayer_with_vite+react.md +7 -4
  115. package/docs/hi/intlayer_with_vite+solid.md +4 -3
  116. package/docs/hi/intlayer_with_vite+svelte.md +4 -3
  117. package/docs/hi/intlayer_with_vite+vue.md +5 -4
  118. package/docs/hi/mcp_server.md +118 -84
  119. package/docs/it/intlayer_CMS.md +1 -0
  120. package/docs/it/intlayer_cli.md +282 -167
  121. package/docs/it/intlayer_visual_editor.md +1 -0
  122. package/docs/it/intlayer_with_angular.md +1 -0
  123. package/docs/it/intlayer_with_create_react_app.md +1 -0
  124. package/docs/it/intlayer_with_lynx+react.md +1 -0
  125. package/docs/it/intlayer_with_nextjs_14.md +1 -0
  126. package/docs/it/intlayer_with_nextjs_15.md +3 -1
  127. package/docs/it/intlayer_with_nuxt.md +1 -0
  128. package/docs/it/intlayer_with_react_native+expo.md +1 -0
  129. package/docs/it/intlayer_with_vite+preact.md +4 -3
  130. package/docs/it/intlayer_with_vite+react.md +7 -4
  131. package/docs/it/intlayer_with_vite+solid.md +4 -3
  132. package/docs/it/intlayer_with_vite+svelte.md +4 -3
  133. package/docs/it/intlayer_with_vite+vue.md +4 -4
  134. package/docs/it/mcp_server.md +120 -86
  135. package/docs/ja/intlayer_CMS.md +1 -0
  136. package/docs/ja/intlayer_cli.md +285 -168
  137. package/docs/ja/intlayer_visual_editor.md +1 -0
  138. package/docs/ja/intlayer_with_angular.md +1 -0
  139. package/docs/ja/intlayer_with_create_react_app.md +1 -0
  140. package/docs/ja/intlayer_with_lynx+react.md +1 -0
  141. package/docs/ja/intlayer_with_nextjs_14.md +1 -0
  142. package/docs/ja/intlayer_with_nextjs_15.md +3 -1
  143. package/docs/ja/intlayer_with_nuxt.md +1 -0
  144. package/docs/ja/intlayer_with_react_native+expo.md +1 -0
  145. package/docs/ja/intlayer_with_vite+preact.md +4 -3
  146. package/docs/ja/intlayer_with_vite+react.md +7 -4
  147. package/docs/ja/intlayer_with_vite+solid.md +4 -3
  148. package/docs/ja/intlayer_with_vite+svelte.md +4 -3
  149. package/docs/ja/intlayer_with_vite+vue.md +5 -4
  150. package/docs/ja/mcp_server.md +121 -85
  151. package/docs/ko/intlayer_CMS.md +1 -0
  152. package/docs/ko/intlayer_cli.md +291 -175
  153. package/docs/ko/intlayer_visual_editor.md +1 -0
  154. package/docs/ko/intlayer_with_angular.md +1 -0
  155. package/docs/ko/intlayer_with_create_react_app.md +1 -0
  156. package/docs/ko/intlayer_with_lynx+react.md +1 -0
  157. package/docs/ko/intlayer_with_nextjs_14.md +1 -0
  158. package/docs/ko/intlayer_with_nextjs_15.md +3 -1
  159. package/docs/ko/intlayer_with_nuxt.md +1 -0
  160. package/docs/ko/intlayer_with_react_native+expo.md +1 -0
  161. package/docs/ko/intlayer_with_vite+preact.md +4 -3
  162. package/docs/ko/intlayer_with_vite+react.md +7 -4
  163. package/docs/ko/intlayer_with_vite+solid.md +4 -3
  164. package/docs/ko/intlayer_with_vite+svelte.md +4 -3
  165. package/docs/ko/intlayer_with_vite+vue.md +5 -4
  166. package/docs/ko/mcp_server.md +117 -83
  167. package/docs/pt/intlayer_CMS.md +1 -0
  168. package/docs/pt/intlayer_cli.md +274 -154
  169. package/docs/pt/intlayer_visual_editor.md +1 -0
  170. package/docs/pt/intlayer_with_angular.md +1 -0
  171. package/docs/pt/intlayer_with_create_react_app.md +1 -0
  172. package/docs/pt/intlayer_with_lynx+react.md +1 -0
  173. package/docs/pt/intlayer_with_nextjs_14.md +1 -0
  174. package/docs/pt/intlayer_with_nextjs_15.md +3 -1
  175. package/docs/pt/intlayer_with_nuxt.md +1 -0
  176. package/docs/pt/intlayer_with_react_native+expo.md +1 -0
  177. package/docs/pt/intlayer_with_vite+preact.md +4 -3
  178. package/docs/pt/intlayer_with_vite+react.md +7 -4
  179. package/docs/pt/intlayer_with_vite+solid.md +4 -3
  180. package/docs/pt/intlayer_with_vite+svelte.md +4 -3
  181. package/docs/pt/intlayer_with_vite+vue.md +4 -4
  182. package/docs/pt/mcp_server.md +121 -87
  183. package/docs/ru/intlayer_CMS.md +1 -0
  184. package/docs/ru/intlayer_cli.md +287 -170
  185. package/docs/ru/intlayer_visual_editor.md +1 -0
  186. package/docs/ru/intlayer_with_angular.md +1 -0
  187. package/docs/ru/intlayer_with_create_react_app.md +1 -0
  188. package/docs/ru/intlayer_with_lynx+react.md +1 -0
  189. package/docs/ru/intlayer_with_nextjs_14.md +1 -0
  190. package/docs/ru/intlayer_with_nextjs_15.md +3 -1
  191. package/docs/ru/intlayer_with_nuxt.md +1 -0
  192. package/docs/ru/intlayer_with_react_native+expo.md +1 -0
  193. package/docs/ru/intlayer_with_vite+preact.md +4 -3
  194. package/docs/ru/intlayer_with_vite+react.md +7 -4
  195. package/docs/ru/intlayer_with_vite+solid.md +4 -3
  196. package/docs/ru/intlayer_with_vite+svelte.md +4 -3
  197. package/docs/ru/intlayer_with_vite+vue.md +5 -4
  198. package/docs/ru/mcp_server.md +119 -85
  199. package/docs/zh/intlayer_CMS.md +1 -0
  200. package/docs/zh/intlayer_cli.md +275 -155
  201. package/docs/zh/intlayer_visual_editor.md +1 -0
  202. package/docs/zh/intlayer_with_angular.md +1 -0
  203. package/docs/zh/intlayer_with_create_react_app.md +1 -0
  204. package/docs/zh/intlayer_with_lynx+react.md +1 -0
  205. package/docs/zh/intlayer_with_nextjs_14.md +1 -0
  206. package/docs/zh/intlayer_with_nextjs_15.md +3 -1
  207. package/docs/zh/intlayer_with_nuxt.md +1 -0
  208. package/docs/zh/intlayer_with_react_native+expo.md +1 -0
  209. package/docs/zh/intlayer_with_vite+preact.md +4 -3
  210. package/docs/zh/intlayer_with_vite+react.md +7 -4
  211. package/docs/zh/intlayer_with_vite+solid.md +4 -3
  212. package/docs/zh/intlayer_with_vite+svelte.md +4 -3
  213. package/docs/zh/intlayer_with_vite+vue.md +5 -4
  214. package/docs/zh/mcp_server.md +119 -86
  215. package/package.json +10 -10
  216. package/src/common.ts +2 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  createdAt: 2024-08-11
3
- updatedAt: 2025-06-29
3
+ updatedAt: 2025-07-11
4
4
  title: CLI
5
5
  description: Discover how to use the Intlayer CLI to manage your multilingual website. Follow the steps in this online documentation to set up your project in a few minutes.
6
6
  keywords:
@@ -59,48 +59,6 @@ Intlayer accepts multiple configuration file formats:
59
59
 
60
60
  To see how to configure available locales, or other parameters, refer to the [configuration documentation here](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/configuration.md).
61
61
 
62
- ## CLI SDK
63
-
64
- The CLI SDK is a library that allows you to use the Intlayer CLI in your own code.
65
-
66
- ```bash packageManager="npm"
67
- npm install @intlayer/cli -D
68
- ```
69
-
70
- ```bash packageManager="yarn"
71
- yarn add @intlayer/cli -D
72
- ```
73
-
74
- ```bash packageManager="pnpm"
75
- pnpm add @intlayer/cli -D
76
- ```
77
-
78
- Example of usage:
79
-
80
- ```ts
81
- import {
82
- push,
83
- pull,
84
- fill,
85
- build,
86
- docTranslate,
87
- docReview,
88
- } from "@intlayer/cli";
89
-
90
- push();
91
- // ...
92
- pull();
93
- // ...
94
- fill();
95
- // ...
96
- build();
97
- // ...
98
- docTranslate();
99
- // ...
100
- docReview();
101
- // ...
102
- ```
103
-
104
62
  ## Run intlayer commands
105
63
 
106
64
  ### Build dictionaries
@@ -141,22 +99,57 @@ If [intlayer editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/
141
99
 
142
100
  ##### Arguments:
143
101
 
144
- - `-d`, `--dictionaries`: ids of the dictionaries to pull. If not specified, all dictionaries will be pushed.
102
+ **Dictionary options:**
103
+
104
+ - **`-d`, `--dictionaries`**: ids of the dictionaries to pull. If not specified, all dictionaries will be pushed.
105
+
145
106
  > Example: `npx intlayer dictionary push -d my-dictionary-id my-other-dictionary-id`
146
- - `-r`, `--deleteLocaleDictionary`: Skip the question that asking to delete the locales directories once the dictionaries are pushed, and remove them. By default, is the dictionary is defined locally, it will overwrite distant dictionaries content.
107
+
108
+ **Configuration options:**
109
+
110
+ - **`--base-dir`**: Specify the base directory for the project. To retrieve the intlayer configuration, the command will look for the `intlayer.config.{ts,js,json,cjs,mjs}` file in the base directory.
111
+
112
+ > Example: `npx intlayer dictionary push --env-file .env.production.local`
113
+
114
+ **Environment variables options:**
115
+
116
+ - **`--env`**: Specify the environment (e.g., `development`, `production`). Useful in the case you use environment variables in your intlayer configuration file.
117
+ - **`--env-file`**: Provide a custom environment file to load variables from. Useful in the case you use environment variables in your intlayer configuration file.
118
+
119
+ > Example: `npx intlayer dictionary push --env-file .env.production.local`
120
+
121
+ > Example: `npx intlayer dictionary push --env production`
122
+
123
+ **Output options:**
124
+
125
+ - **`-r`, `--delete-locale-dictionary`**: Skip the question that asking to delete the locales directories once the dictionaries are pushed, and remove them. By default, if the dictionary is defined locally, it will overwrite distant dictionaries content.
126
+
147
127
  > Example: `npx intlayer dictionary push -r`
148
- - `-k`, `--keepLocaleDictionary`: Skip the question that asking to delete the locales directories once the dictionaries are pushed, and keep them. By default, is the dictionary is defined locally, it will overwrite distant dictionaries content.
128
+
129
+ > Example: `npx intlayer dictionary push --delete-locale-dictionary`
130
+
131
+ - **`-k`, `--keep-locale-dictionary`**: Skip the question that asking to delete the locales directories once the dictionaries are pushed, and keep them. By default, is the dictionary is defined locally, it will overwrite distant dictionaries content.
132
+
149
133
  > Example: `npx intlayer dictionary push -k`
150
- - `--env`: Specify the environment (e.g., `development`, `production`).
151
- - `--env-file`: Provide a custom environment file to load variables from.
152
- - `--base-dir`: Specify the base directory for the project.
153
- - `--verbose`: Enable verbose logging for debugging.
154
- - `--git-diff`: Only run on dictionaries that includes changes from base (default `origin/main`) to current branch (default: `HEAD`).
155
- - `--git-diff-base`: Specify the base reference for git diff (default `origin/main`).
156
- - `--git-diff-current`: Specify the current reference for git diff (default: `HEAD`).
157
- - `--uncommitted`: Include uncommitted changes.
158
- - `--unpushed`: Include unpushed changes.
159
- - `--untracked`: Include untracked files.
134
+
135
+ > Example: `npx intlayer dictionary push --keep-locale-dictionary`
136
+
137
+ **Log options:**
138
+
139
+ - **`--verbose`**: Enable verbose logging for debugging.
140
+
141
+ **Git options:**
142
+
143
+ - **`--git-diff`**: Only run on dictionaries that includes changes from base (default `origin/main`) to current branch (default: `HEAD`).
144
+ - **`--git-diff-base`**: Specify the base reference for git diff (default `origin/main`).
145
+ - **`--git-diff-current`**: Specify the current reference for git diff (default: `HEAD`).
146
+ - **`--uncommitted`**: Include uncommitted changes.
147
+ - **`--unpushed`**: Include unpushed changes.
148
+ - **`--untracked`**: Include untracked files.
149
+
150
+ > Example: `npx intlayer dictionary push --git-diff --git-diff-base origin/main --git-diff-current HEAD`
151
+
152
+ > Example: `npx intlayer dictionary push --uncommitted --unpushed --untracked`
160
153
 
161
154
  ### Pull distant dictionaries
162
155
 
@@ -174,13 +167,35 @@ If [intlayer editor](https://github.com/aymericzip/intlayer/blob/main/docs/docs/
174
167
 
175
168
  ##### Arguments:
176
169
 
177
- - `-d, --dictionaries`: Ids of the dictionaries to pull. If not specified, all dictionaries will be pulled.
170
+ **Dictionary options:**
171
+
172
+ - **`-d, --dictionaries`**: Ids of the dictionaries to pull. If not specified, all dictionaries will be pulled.
173
+
178
174
  > Example: `npx intlayer dictionary pull -d my-dictionary-id my-other-dictionary-id`
179
- - `--newDictionariesPath` : Path to the directory where the new dictionaries will be saved. If not specified, the news dictionaries will be saved in the `./intlayer-dictionaries` directory of the project. If a `filePath` fields is specified in your dictionary content, the dictionaries will not consider this argument and will be saved in the specified `filePath` directory.
180
- - `--env`: Specify the environment (e.g., `development`, `production`).
181
- - `--env-file`: Provide a custom environment file to load variables from.
182
- - `--base-dir`: Specify the base directory for the project.
183
- - `--verbose`: Enable verbose logging for debugging.
175
+
176
+ **Configuration options:**
177
+
178
+ - **`--base-dir`**: Specify the base directory for the project. To retrieve the intlayer configuration, the command will look for the `intlayer.config.{ts,js,json,cjs,mjs}` file in the base directory.
179
+
180
+ > Example: `npx intlayer dictionary push --env-file .env.production.local`
181
+
182
+ **Environment variables options:**
183
+
184
+ - **`--env`**: Specify the environment (e.g., `development`, `production`).
185
+ - **`--env-file`**: Provide a custom environment file to load variables from.
186
+ - **`--base-dir`**: Specify the base directory for the project. To retrieve the intlayer configuration, the command will look for the `intlayer.config.{ts,js,json,cjs,mjs}` file in the base directory.
187
+
188
+ > Example: `npx intlayer dictionary push --env-file .env.production.local`
189
+
190
+ > Example: `npx intlayer dictionary push --env production`
191
+
192
+ **Output options:**
193
+
194
+ - \*\*`--new-dictionaries-path` : Path to the directory where the new dictionaries will be saved. If not specified, the news dictionaries will be saved in the `./intlayer-dictionaries` directory of the project. If a `filePath` fields is specified in your dictionary content, the dictionaries will not consider this argument and will be saved in the specified `filePath` directory.
195
+
196
+ **Log options:**
197
+
198
+ - **`--verbose`**: Enable verbose logging for debugging.
184
199
 
185
200
  ##### Example:
186
201
 
@@ -204,77 +219,74 @@ This command analyzes your content declaration files for potential issues such a
204
219
 
205
220
  ##### Arguments:
206
221
 
207
- - `-f, --file [files...]`
208
- A list of specific content declaration files to audit. If not provided, all discovered `*.content.{ts,js,mjs,cjs,tsx,jsx,json}` files will be audited.
222
+ **Files list options:**
223
+
224
+ - **`-f, --file [files...]`**: A list of specific content declaration files to audit. If not provided, all discovered `*.content.{ts,js,mjs,cjs,tsx,jsx,json}` based on your configuration file setup will be audited.
209
225
 
210
- - `--exclude [excludedGlobs...]`
211
- Globs pattern to exclude from the audit (e.g. `--exclude "src/test/**"`).
226
+ > Example: `npx intlayer dictionary fill -f src/home/app.content.ts`
212
227
 
213
- - `--source-locale [sourceLocale]`
214
- The source locale to translate from. If not specified, the default locale from your configuration will be used.
228
+ - **`-k, --keys [keys...]`**: Filter dictionaries based on keys. If not provided, all dictionaries will be audited.
215
229
 
216
- - `--output-locales [outputLocales...]`
217
- Target locales to translate to. If not specified, all locales from your configuration will be used except the source locale.
230
+ > Example: `npx intlayer dictionary fill -k key1 key2`
218
231
 
219
- - `--mode [mode]`
220
- Translation mode: 'complete', 'review', or 'missing-only'. Default is 'missing-only'.
232
+ - **`--excluded-keys [excludedKeys...]`**: Filter out dictionaries based on keys. If not provided, all dictionaries will be audited.
221
233
 
222
- - `--git-diff`
223
- Filters dictionaries that includes changes from base (default `origin/main`) to current branch (default: `HEAD`).
234
+ > Example: `npx intlayer dictionary fill --excluded-keys key1 key2`
224
235
 
225
- - `--git-diff-base`
226
- Specify the base reference for git diff (default `origin/main`).
236
+ - **`--path-filter [pathFilters...]`**: Filter dictionaries based on glob pattern for file paths.
227
237
 
228
- - `--git-diff-current`
229
- Specify the current reference for git diff (default: `HEAD`).
238
+ > Example: `npx intlayer dictionary fill --path-filter "src/home/**"`
230
239
 
231
- - `--uncommitted`
232
- Filters dictionaries that includes uncommitted changes.
240
+ **Entry output options:**
233
241
 
234
- - `--unpushed`
235
- Filters dictionaries that includes unpushed changes.
242
+ - **`--source-locale [sourceLocale]`**: The source locale to translate from. If not specified, the default locale from your configuration will be used.
236
243
 
237
- - `--untracked`
238
- Filters dictionaries that includes untracked files.
244
+ - **`--output-locales [outputLocales...]`**: Target locales to translate to. If not specified, all locales from your configuration will be used except the source locale.
239
245
 
240
- - `--keys [keys...]`
241
- Filter dictionaries based on specified keys.
246
+ - **`--mode [mode]`**: Translation mode: 'complete', 'review', or 'missing-only'. Default is 'missing-only'.
242
247
 
243
- - `--excluded-keys [excludedKeys...]`
244
- Filter out dictionaries based on specified keys.
248
+ **Git options:**
245
249
 
246
- - `--path-filter [pathFilters...]`
247
- Filter dictionaries based on glob pattern for file paths.
250
+ - **`--git-diff`**: Only run on dictionaries that includes changes from base (default `origin/main`) to current branch (default: `HEAD`).
251
+ - **`--git-diff-base`**: Specify the base reference for git diff (default `origin/main`).
252
+ - **`--git-diff-current`**: Specify the current reference for git diff (default: `HEAD`).
253
+ - **`--uncommitted`**: Include uncommitted changes.
254
+ - **`--unpushed`**: Include unpushed changes.
255
+ - **`--untracked`**: Include untracked files.
256
+
257
+ > Example: `npx intlayer doc translate --git-diff --git-diff-base origin/main --git-diff-current HEAD`
258
+
259
+ > Example: `npx intlayer doc translate --uncommitted --unpushed --untracked`
260
+
261
+ **AI options:**
262
+
263
+ - **`--model [model]`**: The AI model to use for the translation (e.g., `gpt-3.5-turbo`).
264
+ - **`--provider [provider]`**: The AI provider to use for the translation.
265
+ - **`--temperature [temperature]`**: Temperature setting for the AI model.
266
+ - **`--api-key [apiKey]`**: Provide your own API key for the AI service.
267
+ - **`--custom-prompt [prompt]`**: Provide a custom prompt for your translation instructions.
268
+ - **`--application-context [applicationContext]`**: Provide additional context for the AI translation.
248
269
 
249
- - `--model [model]`
250
- The AI model to use for the translation (e.g., `gpt-3.5-turbo`).
270
+ > Example: `npx intlayer fill --model gpt-3.5-turbo --provider openai --temperature 0.5 --api-key sk-1234567890 --application-context "My application is a cat store"`
251
271
 
252
- - `--provider [provider]`
253
- The AI provider to use for the translation.
272
+ **Environment variables options:**
254
273
 
255
- - `--temperature [temperature]`
256
- Temperature setting for the AI model.
274
+ - **`--env`**: Specify the environment (e.g., `development`, `production`).
275
+ - **`--env-file [envFile]`**: Provide a custom environment file to load variables from.
257
276
 
258
- - `--api-key [apiKey]`
259
- Provide your own API key for the AI service.
277
+ > Example: `npx intlayer fill --env-file .env.production.local`
260
278
 
261
- - `--custom-prompt [prompt]`
262
- Provide a custom prompt for your translation instructions.
279
+ > Example: `npx intlayer fill --env production`
263
280
 
264
- - `--application-context [applicationContext]`
265
- Provide additional context for the AI translation.
281
+ **Configuration options:**
266
282
 
267
- - `--env`
268
- Specify the environment (e.g., `development`, `production`).
283
+ - **`--base-dir`**: Specify the base directory for the project.
269
284
 
270
- - `--env-file [envFile]`
271
- Provide a custom environment file to load variables from.
285
+ > Example: `npx intlayer fill --base-dir ./src`
272
286
 
273
- - `--base-dir`
274
- Specify the base directory for the project.
287
+ **Log options:**
275
288
 
276
- - `--verbose`
277
- Enable verbose logging for debugging.
289
+ - **`--verbose`**: Enable verbose logging for debugging.
278
290
 
279
291
  ##### Example:
280
292
 
@@ -342,45 +354,97 @@ npx intlayer doc translate
342
354
 
343
355
  ##### Arguments:
344
356
 
357
+ **File list options:**
358
+
345
359
  - **`--doc-pattern [docPattern...]`**: Glob patterns to match documentation files to translate.
360
+
346
361
  > Example: `npx intlayer doc translate --doc-pattern "docs/**/*.md" "src/**/*.mdx"`
362
+
347
363
  - **`--excluded-glob-pattern [excludedGlobPattern...]`**: Glob patterns to exclude from translation.
364
+
348
365
  > Example: `npx intlayer doc translate --excluded-glob-pattern "docs/internal/**"`
349
- - **`--nb-simultaneous-file-processed [nbSimultaneousFileProcessed]`**: Number of files to process simultaneously for translation.
350
- > Example: `npx intlayer doc translate --nb-simultaneous-file-processed 5`
366
+
367
+ - **`--skip-if-modified-before [skipIfModifiedBefore]`**: Skip the file if it has been modified before the given time.
368
+
369
+ - Can be an absolute time as "2025-12-05" (string or Date)
370
+ - Can be a relative time in ms `1 * 60 * 60 * 1000` (1 hour)
371
+ - This option check update time of the file using the `fs.stat` method. So it could be impacted by Git or other tools that modify the file.
372
+
373
+ > Example: `npx intlayer doc translate --skip-if-modified-before "2025-12-05"`
374
+
375
+ - **`--skip-if-modified-after [skipIfModifiedAfter]`**: Skip the file if it has been modified within the given time.
376
+
377
+ - Can be an absolute time as "2025-12-05" (string or Date)
378
+ - Can be a relative time in ms `1 * 60 * 60 * 1000` (1 hour)
379
+ - This option check update time of the file using the `fs.stat` method. So it could be impacted by Git or other tools that modify the file.
380
+
381
+ > Example: `npx intlayer doc translate --skip-if-modified-after "2025-12-05"`
382
+
383
+ **Entry output options:**
384
+
351
385
  - **`--locales [locales...]`**: Target locales to translate documentation to.
386
+
352
387
  > Example: `npx intlayer doc translate --locales fr es de`
388
+
353
389
  - **`--base-locale [baseLocale]`**: Source locale to translate from.
390
+
354
391
  > Example: `npx intlayer doc translate --base-locale en`
392
+
393
+ **File processing options:**
394
+
395
+ - **`--nb-simultaneous-file-processed [nbSimultaneousFileProcessed]`**: Number of files to process simultaneously for translation.
396
+
397
+ > Example: `npx intlayer doc translate --nb-simultaneous-file-processed 5`
398
+
399
+ **AI options:**
400
+
355
401
  - **`--model [model]`**: The AI model to use for translation (e.g., `gpt-3.5-turbo`).
356
402
  - **`--provider [provider]`**: The AI provider to use for translation.
357
403
  - **`--temperature [temperature]`**: Temperature setting for the AI model.
358
404
  - **`--api-key [apiKey]`**: Provide your own API key for the AI service.
359
- - **`--custom-prompt [prompt]`**: Provide a custom prompt for translation instructions.
360
405
  - **`--application-context [applicationContext]`**: Provide additional context for the AI translation.
406
+ - **`--custom-prompt [prompt]`**: Customize the base prompt used for translation. (Note: For most use cases, the `--custom-instructions` option is recommended instead as it provides better control over translation behavior.)
407
+
408
+ > Example: `npx intlayer doc translate --model deepseek-chat --provider deepseek --temperature 0.5 --api-key sk-1234567890 --application-context "My application is a cat store"`
409
+
410
+ **Environment variables options:**
411
+
361
412
  - **`--env`**: Specify the environment (e.g., `development`, `production`).
362
413
  - **`--env-file [envFile]`**: Provide a custom environment file to load variables from.
363
414
  - **`--base-dir`**: Specify the base directory for the project.
415
+
416
+ > Example: `npx intlayer doc translate --base-dir ./docs --env-file .env.production.local`
417
+
418
+ **Log options:**
419
+
364
420
  - **`--verbose`**: Enable verbose logging for debugging.
421
+
422
+ > Example: `npx intlayer doc translate --verbose`
423
+
424
+ **Custom instructions options:**
425
+
365
426
  - **`--custom-instructions [customInstructions]`**: Custom instructions added to the prompt. Usefull to apply specific rules regarding formatting, urls translation, etc.
366
- - **`--skip-if-modified-before [skipIfModifiedBefore]`**: Skip the file if it has been modified before the given time.
367
- - Can be an absolute time as "2025-12-05" (string or Date)
368
- - Can be a relative time in ms `1 * 60 * 60 * 1000` (1 hour)
369
- - This option check update time of the file using the `fs.stat` method. So it could be impacted by Git or other tools that modify the file.
370
- - **`--skip-if-modified-after [skipIfModifiedAfter]`**: Skip the file if it has been modified within the given time.
427
+
371
428
  - Can be an absolute time as "2025-12-05" (string or Date)
372
429
  - Can be a relative time in ms `1 * 60 * 60 * 1000` (1 hour)
373
430
  - This option check update time of the file using the `fs.stat` method. So it could be impacted by Git or other tools that modify the file.
374
431
 
375
- ##### Example:
432
+ > Example: `npx intlayer doc translate --custom-instructions "Avoid translating urls, and keep the markdown format"`
376
433
 
377
- ```bash
378
- npx intlayer doc translate
379
- --doc-pattern "docs/en/**/*.md"
380
- --base-locale en --locales fr es
381
- --model chatgpt-4o-latest
382
- --custom-instructions "$(cat ./instructions.md)"
383
- ```
434
+ > Example: `npx intlayer doc translate --custom-instructions "$(cat ./instructions.md)"`
435
+
436
+ **Git options:**
437
+
438
+ - **`--git-diff`**: Only run on dictionaries that includes changes from base (default `origin/main`) to current branch (default: `HEAD`).
439
+ - **`--git-diff-base`**: Specify the base reference for git diff (default `origin/main`).
440
+ - **`--git-diff-current`**: Specify the current reference for git diff (default: `HEAD`).
441
+ - **`--uncommitted`**: Include uncommitted changes.
442
+ - **`--unpushed`**: Include unpushed changes.
443
+ - **`--untracked`**: Include untracked files.
444
+
445
+ > Example: `npx intlayer doc translate --git-diff --git-diff-base origin/main --git-diff-current HEAD`
446
+
447
+ > Example: `npx intlayer doc translate --uncommitted --unpushed --untracked`
384
448
 
385
449
  > Note that the output file path will be determined by replacing the following patterns
386
450
  >
@@ -400,19 +464,20 @@ The `doc review` command analyzes documentation files for quality, consistency,
400
464
  npx intlayer doc review
401
465
  ```
402
466
 
467
+ It can be used to review files that are already translated, and to check if the translation is correct.
468
+
469
+ For most use cases,
470
+
471
+ - prefer using the `doc translate` when the translated version of this file is not available.
472
+ - prefer using the `doc review` when the translated version of this file already exists.
473
+
474
+ > Note that the review process consumes more entry tokens than the translate process to review the same file entirely. However, the review process will optimize the chunks to review, and will skip the parts that are not changed.
475
+
403
476
  ##### Arguments:
404
477
 
405
478
  The `doc review` command accepts the same arguments as `doc translate`, allowing you to review specific documentation files and apply quality checks.
406
479
 
407
- ##### Example:
408
-
409
- ```bash
410
- npx intlayer doc review
411
- --doc-pattern "docs/en/**/*.md"
412
- --locales fr es de
413
- --model chatgpt-4o-latest
414
- --custom-instructions "$(cat ./instructions.md)"
415
- ```
480
+ If you activated one of the git options, the command will only review the part of the files that getting changed. The script will process by chunking the file and review each chunk. If there is no changes in the chunk, the script will skip it to speed up the review process and limit the AI Provider API cost.
416
481
 
417
482
  ## Use intlayer commands in your `package.json`
418
483
 
@@ -428,6 +493,48 @@ npx intlayer doc review
428
493
  }
429
494
  ```
430
495
 
496
+ ## CLI SDK
497
+
498
+ The CLI SDK is a library that allows you to use the Intlayer CLI in your own code.
499
+
500
+ ```bash packageManager="npm"
501
+ npm install @intlayer/cli --save-dev
502
+ ```
503
+
504
+ ```bash packageManager="yarn"
505
+ yarn add @intlayer/cli --save-dev
506
+ ```
507
+
508
+ ```bash packageManager="pnpm"
509
+ pnpm add @intlayer/cli --save-dev
510
+ ```
511
+
512
+ Example of usage:
513
+
514
+ ```ts
515
+ import {
516
+ push,
517
+ pull,
518
+ fill,
519
+ build,
520
+ docTranslate,
521
+ docReview,
522
+ } from "@intlayer/cli";
523
+
524
+ push();
525
+ // ...
526
+ pull();
527
+ // ...
528
+ fill();
529
+ // ...
530
+ build();
531
+ // ...
532
+ docTranslate();
533
+ // ...
534
+ docReview();
535
+ // ...
536
+ ```
537
+
431
538
  ## Debug intlayer command
432
539
 
433
540
  ### 1. **Ensure you're using the latest version**
@@ -460,6 +567,7 @@ npx clear-npx-cache
460
567
 
461
568
  ## Doc History
462
569
 
463
- | Version | Date | Changes |
464
- | ------- | ---------- | ------------ |
465
- | 5.5.10 | 2025-06-29 | Init history |
570
+ | Version | Date | Changes |
571
+ | ------- | ---------- | ------------------------------------------- |
572
+ | 5.5.11 | 2025-07-11 | Update CLI command parameters documentation |
573
+ | 5.5.10 | 2025-06-29 | Init history |
@@ -15,6 +15,7 @@ slugs:
15
15
  - doc
16
16
  - concept
17
17
  - editor
18
+ youtubeVideo: https://www.youtube.com/watch?v=UDDTnirwi_4
18
19
  ---
19
20
 
20
21
  # Intlayer Visual Editor Documentation
@@ -13,6 +13,7 @@ slugs:
13
13
  - doc
14
14
  - environment
15
15
  - angular
16
+ # applicationTemplate: https://github.com/aymericzip/intlayer-angular-template
16
17
  ---
17
18
 
18
19
  # Getting Started with Internationalization (i18n) in Angular using Intlayer
@@ -15,6 +15,7 @@ slugs:
15
15
  - doc
16
16
  - environment
17
17
  - create-react-app
18
+ applicationTemplate: https://github.com/aymericzip/intlayer-react-cra-template
18
19
  ---
19
20
 
20
21
  # Getting Started Internationalizing (i18n) with Intlayer and React Create App
@@ -15,6 +15,7 @@ slugs:
15
15
  - doc
16
16
  - environment
17
17
  - lynx-and-react
18
+ applicationTemplate: https://github.com/aymericzip/intlayer-lynx-template
18
19
  ---
19
20
 
20
21
  # Getting Started Internationalizing (i18n) with Intlayer and Lynx and React
@@ -15,6 +15,7 @@ slugs:
15
15
  - environment
16
16
  - nextjs
17
17
  - 14
18
+ applicationTemplate: https://github.com/aymericzip/intlayer-next-14-template
18
19
  ---
19
20
 
20
21
  # Getting Started internationalizing (i18n) with Intlayer and Next.js 14 with App Router
@@ -14,6 +14,8 @@ slugs:
14
14
  - doc
15
15
  - environment
16
16
  - nextjs
17
+ applicationTemplate: https://github.com/aymericzip/intlayer-next-15-template
18
+ youtubeVideo: https://www.youtube.com/watch?v=e_PPG7PTqGU
17
19
  ---
18
20
 
19
21
  # Getting Started internationalizing (i18n) with Intlayer and Next.js 15 App Router
@@ -130,7 +132,7 @@ module.exports = config;
130
132
 
131
133
  Configure your Next.js setup to use Intlayer:
132
134
 
133
- ```typescript filename="next.config.ts" codeFormat="typescript"
135
+ ```typescript fileName="next.config.ts" codeFormat="typescript"
134
136
  import type { NextConfig } from "next";
135
137
  import { withIntlayer } from "next-intlayer/server";
136
138
 
@@ -14,6 +14,7 @@ slugs:
14
14
  - doc
15
15
  - environment
16
16
  - nuxt-and-vue
17
+ applicationTemplate: https://github.com/aymericzip/intlayer-nuxt-template
17
18
  ---
18
19
 
19
20
  # Getting Started Internationalizing (i18n) with Intlayer and Nuxt
@@ -14,6 +14,7 @@ slugs:
14
14
  - doc
15
15
  - environment
16
16
  - react-native-and-expo
17
+ applicationTemplate: https://github.com/aymericzip/intlayer-react-native-template
17
18
  ---
18
19
 
19
20
  # Getting Started Internationalizing (i18n) with Intlayer and React Native
@@ -14,6 +14,7 @@ slugs:
14
14
  - doc
15
15
  - environment
16
16
  - vite-and-preact
17
+ applicationTemplate: https://github.com/aymericzip/intlayer-vite-preact-template
17
18
  ---
18
19
 
19
20
  # Getting Started Internationalizing (i18n) with Intlayer and Vite and Preact
@@ -43,17 +44,17 @@ Install the necessary packages using npm:
43
44
 
44
45
  ```bash packageManager="npm"
45
46
  npm install intlayer preact-intlayer
46
- npm install --save-dev vite-intlayer
47
+ npm install vite-intlayer --save-dev
47
48
  ```
48
49
 
49
50
  ```bash packageManager="pnpm"
50
51
  pnpm add intlayer preact-intlayer
51
- pnpm add --save-dev vite-intlayer
52
+ pnpm add vite-intlayer --save-dev
52
53
  ```
53
54
 
54
55
  ```bash packageManager="yarn"
55
56
  yarn add intlayer preact-intlayer
56
- yarn add --save-dev vite-intlayer
57
+ yarn add vite-intlayer --save-dev
57
58
  ```
58
59
 
59
60
  - **intlayer**
@@ -1037,6 +1038,8 @@ module.exports = App;
1037
1038
 
1038
1039
  In parallel, you can also use the `intLayerMiddlewarePlugin` to add server-side routing to your application. This plugin will automatically detect the current locale based on the URL and set the appropriate locale cookie. If no locale is specified, the plugin will determine the most appropriate locale based on the user's browser language preferences. If no locale is detected, it will redirect to the default locale.
1039
1040
 
1041
+ > Note that to use the `intLayerMiddlewarePlugin` in production, you need to switch the `vite-intlayer` package from `devDependencies` to `dependencies`.
1042
+
1040
1043
  ```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
1041
1044
  import { defineConfig } from "vite";
1042
1045
  import preact from "@preact/preset-vite";
@@ -15,10 +15,14 @@ slugs:
15
15
  - doc
16
16
  - environment
17
17
  - vite-and-react
18
+ applicationTemplate: https://github.com/aymericzip/intlayer-vite-react-template
19
+ youtubeVideo: https://www.youtube.com/watch?v=dS9L7uJeak4
18
20
  ---
19
21
 
20
22
  # Getting Started Internationalizing (i18n) with Intlayer and Vite and React
21
23
 
24
+ <iframe title="The best i18n solution for Vite and React? Discover Intlayer" class="m-auto aspect-[16/9] w-full overflow-hidden rounded-lg border-0" allow="autoplay; gyroscope;" loading="lazy" width="1080" height="auto" src="https://www.youtube.com/embed/dS9L7uJeak4?si=VaKmrYMmXjo3xpk2"/>
25
+
22
26
  See [Application Template](https://github.com/aymericzip/intlayer-vite-react-template) on GitHub.
23
27
 
24
28
  ## What is Intlayer?
@@ -42,17 +46,17 @@ Install the necessary packages using npm:
42
46
 
43
47
  ```bash packageManager="npm"
44
48
  npm install intlayer react-intlayer
45
- npm install --save-dev vite-intlayer
49
+ npm install vite-intlayer --save-dev
46
50
  ```
47
51
 
48
52
  ```bash packageManager="pnpm"
49
53
  pnpm add intlayer react-intlayer
50
- pnpm add --save-dev vite-intlayer
54
+ pnpm add vite-intlayer --save-dev
51
55
  ```
52
56
 
53
57
  ```bash packageManager="yarn"
54
58
  yarn add intlayer react-intlayer
55
- yarn add --save-dev vite-intlayer
59
+ yarn add vite-intlayer --save-dev
56
60
  ```
57
61
 
58
62
  - **intlayer**
@@ -1002,6 +1006,8 @@ const App = () => (
1002
1006
 
1003
1007
  In parallel, you can also use the `intLayerMiddlewarePlugin` to add server-side routing to your application. This plugin will automatically detect the current locale based on the URL and set the appropriate locale cookie. If no locale is specified, the plugin will determine the most appropriate locale based on the user's browser language preferences. If no locale is detected, it will redirect to the default locale.
1004
1008
 
1009
+ > Note that to use the `intLayerMiddlewarePlugin` in production, you need to switch the `vite-intlayer` package from `devDependencies` to `dependencies`.
1010
+
1005
1011
  ```typescript {3,7} fileName="vite.config.ts" codeFormat="typescript"
1006
1012
  import { defineConfig } from "vite";
1007
1013
  import react from "@vitejs/plugin-react-swc";