@intlayer/docs 7.5.10 → 7.5.11
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.
- package/dist/cjs/generated/docs.entry.cjs +38 -0
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +38 -0
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +2 -0
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/docs/ar/cli/ci.md +137 -0
- package/docs/ar/cli/index.md +7 -1
- package/docs/ar/cli/list.md +39 -2
- package/docs/ar/cli/list_projects.md +131 -0
- package/docs/ar/intlayer_CMS.md +20 -0
- package/docs/de/cli/ci.md +137 -0
- package/docs/de/cli/index.md +7 -1
- package/docs/de/cli/list.md +39 -2
- package/docs/de/cli/list_projects.md +130 -0
- package/docs/de/intlayer_CMS.md +20 -0
- package/docs/en/cli/ci.md +137 -0
- package/docs/en/cli/index.md +14 -1
- package/docs/en/cli/list.md +39 -2
- package/docs/en/cli/list_projects.md +128 -0
- package/docs/en/interest_of_intlayer.md +1 -1
- package/docs/en/intlayer_CMS.md +20 -0
- package/docs/en-GB/cli/ci.md +137 -0
- package/docs/en-GB/cli/index.md +7 -1
- package/docs/en-GB/cli/list.md +39 -2
- package/docs/en-GB/cli/list_projects.md +130 -0
- package/docs/en-GB/intlayer_CMS.md +20 -0
- package/docs/es/cli/ci.md +137 -0
- package/docs/es/cli/index.md +7 -1
- package/docs/es/cli/list.md +39 -2
- package/docs/es/cli/list_projects.md +130 -0
- package/docs/es/intlayer_CMS.md +20 -0
- package/docs/fr/cli/ci.md +137 -0
- package/docs/fr/cli/index.md +7 -1
- package/docs/fr/cli/list.md +39 -2
- package/docs/fr/cli/list_projects.md +131 -0
- package/docs/fr/intlayer_CMS.md +20 -0
- package/docs/hi/cli/ci.md +137 -0
- package/docs/hi/cli/index.md +7 -1
- package/docs/hi/cli/list.md +38 -1
- package/docs/hi/cli/list_projects.md +130 -0
- package/docs/hi/intlayer_CMS.md +20 -0
- package/docs/id/cli/ci.md +137 -0
- package/docs/id/cli/index.md +7 -1
- package/docs/id/cli/list.md +38 -1
- package/docs/id/cli/list_projects.md +128 -0
- package/docs/id/intlayer_CMS.md +20 -0
- package/docs/it/cli/ci.md +137 -0
- package/docs/it/cli/index.md +7 -1
- package/docs/it/cli/list.md +39 -2
- package/docs/it/cli/list_projects.md +130 -0
- package/docs/it/intlayer_CMS.md +20 -0
- package/docs/ja/cli/ci.md +137 -0
- package/docs/ja/cli/index.md +7 -1
- package/docs/ja/cli/list.md +38 -1
- package/docs/ja/cli/list_projects.md +136 -0
- package/docs/ja/intlayer_CMS.md +20 -0
- package/docs/ko/cli/ci.md +137 -0
- package/docs/ko/cli/index.md +7 -1
- package/docs/ko/cli/list.md +38 -1
- package/docs/ko/cli/list_projects.md +128 -0
- package/docs/ko/intlayer_CMS.md +20 -0
- package/docs/pl/cli/ci.md +137 -0
- package/docs/pl/cli/index.md +7 -1
- package/docs/pl/cli/list.md +39 -2
- package/docs/pl/cli/list_projects.md +130 -0
- package/docs/pl/intlayer_CMS.md +20 -0
- package/docs/pt/cli/ci.md +137 -0
- package/docs/pt/cli/index.md +7 -1
- package/docs/pt/cli/list.md +39 -2
- package/docs/pt/cli/list_projects.md +134 -0
- package/docs/pt/intlayer_CMS.md +20 -0
- package/docs/ru/cli/ci.md +137 -0
- package/docs/ru/cli/index.md +7 -1
- package/docs/ru/cli/list.md +39 -2
- package/docs/ru/cli/list_projects.md +130 -0
- package/docs/ru/intlayer_CMS.md +20 -0
- package/docs/tr/cli/ci.md +137 -0
- package/docs/tr/cli/index.md +7 -1
- package/docs/tr/cli/list.md +39 -2
- package/docs/tr/cli/list_projects.md +134 -0
- package/docs/tr/intlayer_CMS.md +20 -0
- package/docs/vi/cli/ci.md +137 -0
- package/docs/vi/cli/index.md +7 -1
- package/docs/vi/cli/list.md +38 -1
- package/docs/vi/cli/list_projects.md +130 -0
- package/docs/vi/intlayer_CMS.md +20 -0
- package/docs/zh/cli/ci.md +137 -0
- package/docs/zh/cli/index.md +7 -1
- package/docs/zh/cli/list.md +38 -1
- package/docs/zh/cli/list_projects.md +130 -0
- package/docs/zh/intlayer_CMS.md +20 -0
- package/package.json +6 -6
- package/src/generated/docs.entry.ts +38 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-01-06
|
|
3
|
+
updatedAt: 2026-01-06
|
|
4
|
+
title: CI Command
|
|
5
|
+
description: Learn how to use the Intlayer CI command to run Intlayer commands with auto-injected credentials in CI/CD pipelines and monorepos.
|
|
6
|
+
keywords:
|
|
7
|
+
- CI
|
|
8
|
+
- CI/CD
|
|
9
|
+
- Automation
|
|
10
|
+
- Monorepo
|
|
11
|
+
- Credentials
|
|
12
|
+
- CLI
|
|
13
|
+
- Intlayer
|
|
14
|
+
slugs:
|
|
15
|
+
- doc
|
|
16
|
+
- concept
|
|
17
|
+
- cli
|
|
18
|
+
- ci
|
|
19
|
+
history:
|
|
20
|
+
- version: 7.5.11
|
|
21
|
+
date: 2026-01-06
|
|
22
|
+
changes: Add CI command
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# CI Command
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx intlayer ci <command...>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The CI command is designed for automation and CI/CD pipelines. It automatically injects credentials from the `INTLAYER_PROJECT_CREDENTIALS` environment variable and can run Intlayer commands across multiple projects in a monorepo.
|
|
32
|
+
|
|
33
|
+
## How it works
|
|
34
|
+
|
|
35
|
+
The CI command operates in two modes:
|
|
36
|
+
|
|
37
|
+
1. **Single Project Mode**: If the current working directory matches one of the project paths in `INTLAYER_PROJECT_CREDENTIALS`, it runs the command for that specific project only.
|
|
38
|
+
|
|
39
|
+
2. **Iteration Mode**: If no specific project context is detected, it iterates over all configured projects and runs the command for each one.
|
|
40
|
+
|
|
41
|
+
## Environment Variable
|
|
42
|
+
|
|
43
|
+
The command requires the `INTLAYER_PROJECT_CREDENTIALS` environment variable to be set. This variable should contain a JSON object mapping project paths to their credentials:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"packages/app": {
|
|
48
|
+
"clientId": "your-client-id-1",
|
|
49
|
+
"clientSecret": "your-client-secret-1"
|
|
50
|
+
},
|
|
51
|
+
"packages/admin": {
|
|
52
|
+
"clientId": "your-client-id-2",
|
|
53
|
+
"clientSecret": "your-client-secret-2"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Package Manager Detection
|
|
59
|
+
|
|
60
|
+
The CI command automatically detects which package manager is being used (npm, yarn, pnpm, or bun) based on the `npm_config_user_agent` environment variable and uses the appropriate command to execute Intlayer.
|
|
61
|
+
|
|
62
|
+
## Arguments
|
|
63
|
+
|
|
64
|
+
- **`<command...>`**: The Intlayer command to execute (e.g., `fill`, `push`, `build`). You can pass any Intlayer command and its arguments.
|
|
65
|
+
|
|
66
|
+
> Example: `npx intlayer ci fill --verbose`
|
|
67
|
+
>
|
|
68
|
+
> Example: `npx intlayer ci push`
|
|
69
|
+
>
|
|
70
|
+
> Example: `npx intlayer ci build`
|
|
71
|
+
|
|
72
|
+
## Examples
|
|
73
|
+
|
|
74
|
+
### Run a command in single project mode
|
|
75
|
+
|
|
76
|
+
If you're in a project directory that matches one of the paths in `INTLAYER_PROJECT_CREDENTIALS`:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
cd packages/app
|
|
80
|
+
npx intlayer ci fill
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
This will run the `fill` command with credentials automatically injected for the `packages/app` project.
|
|
84
|
+
|
|
85
|
+
### Run a command across all projects
|
|
86
|
+
|
|
87
|
+
If you're in a directory that doesn't match any project path, the command will iterate over all configured projects:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
cd /path/to/monorepo
|
|
91
|
+
npx intlayer ci push
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
This will run the `push` command for each project configured in `INTLAYER_PROJECT_CREDENTIALS`.
|
|
95
|
+
|
|
96
|
+
### Pass additional flags
|
|
97
|
+
|
|
98
|
+
You can pass any flags to the underlying Intlayer command:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npx intlayer ci fill --verbose --mode complete
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Use in CI/CD pipelines
|
|
105
|
+
|
|
106
|
+
In your CI/CD configuration (e.g., GitHub Actions, GitLab CI), set the `INTLAYER_PROJECT_CREDENTIALS` as a secret:
|
|
107
|
+
|
|
108
|
+
```yaml
|
|
109
|
+
# GitHub Actions example
|
|
110
|
+
env:
|
|
111
|
+
INTLAYER_PROJECT_CREDENTIALS: ${{ secrets.INTLAYER_PROJECT_CREDENTIALS }}
|
|
112
|
+
|
|
113
|
+
steps:
|
|
114
|
+
- name: Fill dictionaries
|
|
115
|
+
run: npx intlayer ci fill
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Error Handling
|
|
119
|
+
|
|
120
|
+
- If `INTLAYER_PROJECT_CREDENTIALS` is not set, the command will exit with an error.
|
|
121
|
+
- If `INTLAYER_PROJECT_CREDENTIALS` is not valid JSON, the command will exit with an error.
|
|
122
|
+
- If a project path doesn't exist, it will be skipped with a warning.
|
|
123
|
+
- If any project fails, the command will exit with a non-zero status code.
|
|
124
|
+
|
|
125
|
+
## Use Cases
|
|
126
|
+
|
|
127
|
+
- **Monorepo automation**: Run Intlayer commands across multiple projects in a monorepo
|
|
128
|
+
- **CI/CD pipelines**: Automate dictionary management in continuous integration workflows
|
|
129
|
+
- **Bulk operations**: Perform the same operation on multiple Intlayer projects at once
|
|
130
|
+
- **Secret management**: Securely manage credentials for multiple projects using environment variables
|
|
131
|
+
|
|
132
|
+
## Security Best Practices
|
|
133
|
+
|
|
134
|
+
- Store `INTLAYER_PROJECT_CREDENTIALS` as encrypted secrets in your CI/CD platform
|
|
135
|
+
- Never commit credentials to version control
|
|
136
|
+
- Use environment-specific credentials for different deployment environments
|
|
137
|
+
- Rotate credentials regularly
|
package/docs/en-GB/cli/index.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-11
|
|
3
|
-
updatedAt:
|
|
3
|
+
updatedAt: 2026-01-06
|
|
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:
|
|
@@ -17,6 +17,9 @@ slugs:
|
|
|
17
17
|
- concept
|
|
18
18
|
- cli
|
|
19
19
|
history:
|
|
20
|
+
- version: 7.5.11
|
|
21
|
+
date: 2026-01-06
|
|
22
|
+
changes: Add projects list command
|
|
20
23
|
- version: 7.5.9
|
|
21
24
|
date: 2025-12-30
|
|
22
25
|
changes: Add init command
|
|
@@ -119,6 +122,7 @@ To see how to configure available locales, or other parameters, refer to the [co
|
|
|
119
122
|
- **[Build Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/build.md)** - Build your dictionaries from content declaration files
|
|
120
123
|
- **[Watch Dictionaries](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/watch.md)** - Watch for changes and automatically build dictionaries
|
|
121
124
|
- **[Check CLI Version](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/version.md)** - Check the installed Intlayer CLI version
|
|
125
|
+
- **[List Projects](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en-GB/cli/list_projects.md)** - List all Intlayer projects in a directory or git repository
|
|
122
126
|
|
|
123
127
|
### Dictionary Management
|
|
124
128
|
|
|
@@ -166,6 +170,7 @@ To see how to configure available locales, or other parameters, refer to the [co
|
|
|
166
170
|
"intlayer:list": "npx intlayer content list",
|
|
167
171
|
"intlayer:test": "npx intlayer content test",
|
|
168
172
|
"intlayer:transform": "npx intlayer transform",
|
|
173
|
+
"intlayer:projects": "npx intlayer projects list",
|
|
169
174
|
"intlayer:doc:translate": "npx intlayer doc translate",
|
|
170
175
|
"intlayer:doc:review": "npx intlayer doc review"
|
|
171
176
|
}
|
|
@@ -175,3 +180,4 @@ To see how to configure available locales, or other parameters, refer to the [co
|
|
|
175
180
|
>
|
|
176
181
|
> - `npx intlayer list` instead of `npx intlayer content list`
|
|
177
182
|
> - `npx intlayer test` instead of `npx intlayer content test`
|
|
183
|
+
> - `npx intlayer projects-list` or `npx intlayer pl` instead of `npx intlayer projects list`
|
package/docs/en-GB/cli/list.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-11
|
|
3
|
-
updatedAt:
|
|
3
|
+
updatedAt: 2026-01-06
|
|
4
4
|
title: List Content Declaration Files
|
|
5
5
|
description: Learn how to list all content declaration files in your project.
|
|
6
6
|
keywords:
|
|
@@ -13,6 +13,13 @@ slugs:
|
|
|
13
13
|
- concept
|
|
14
14
|
- cli
|
|
15
15
|
- list
|
|
16
|
+
history:
|
|
17
|
+
- version: 7.5.12
|
|
18
|
+
date: 2026-01-06
|
|
19
|
+
changes: Add absolute output option to list command
|
|
20
|
+
- version: 7.5.11
|
|
21
|
+
date: 2026-01-06
|
|
22
|
+
changes: Add JSON output option to list command
|
|
16
23
|
---
|
|
17
24
|
|
|
18
25
|
# List content declaration files
|
|
@@ -27,14 +34,36 @@ npx intlayer content list
|
|
|
27
34
|
|
|
28
35
|
This command displays all content declaration files in your project, showing their dictionary keys and file paths. It is useful for obtaining an overview of all your content files and verifying that they are properly discovered by Intlayer.
|
|
29
36
|
|
|
30
|
-
##
|
|
37
|
+
## Arguments:
|
|
38
|
+
|
|
39
|
+
- **`--json`**: Output the results as JSON instead of formatted text. Useful for scripting and programmatic access.
|
|
40
|
+
|
|
41
|
+
> Example: `npx intlayer content list --json`
|
|
42
|
+
|
|
43
|
+
## Examples:
|
|
44
|
+
|
|
45
|
+
### List content declaration files:
|
|
31
46
|
|
|
32
47
|
```bash
|
|
33
48
|
npx intlayer content list
|
|
34
49
|
```
|
|
35
50
|
|
|
51
|
+
### Output as JSON:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx intlayer content list --json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Output as absolute paths:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npx intlayer content list --absolute
|
|
61
|
+
```
|
|
62
|
+
|
|
36
63
|
## Example output:
|
|
37
64
|
|
|
65
|
+
### Formatted output:
|
|
66
|
+
|
|
38
67
|
```bash
|
|
39
68
|
npx intlayer content list
|
|
40
69
|
Content declaration files:
|
|
@@ -45,6 +74,14 @@ Content declaration files:
|
|
|
45
74
|
Total content declaration files: 3
|
|
46
75
|
```
|
|
47
76
|
|
|
77
|
+
### JSON output:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
$ npx intlayer content list --json
|
|
81
|
+
|
|
82
|
+
[{"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"}]
|
|
83
|
+
```
|
|
84
|
+
|
|
48
85
|
This command will output:
|
|
49
86
|
|
|
50
87
|
- A formatted list of all content declaration files with their keys and relative file paths
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-12-30
|
|
3
|
+
updatedAt: 2026-01-06
|
|
4
|
+
title: List Intlayer Projects
|
|
5
|
+
description: Learn how to list all Intlayer projects in a directory or git repository.
|
|
6
|
+
keywords:
|
|
7
|
+
- List
|
|
8
|
+
- Projects
|
|
9
|
+
- CLI
|
|
10
|
+
- Intlayer
|
|
11
|
+
- Git
|
|
12
|
+
slugs:
|
|
13
|
+
- doc
|
|
14
|
+
- concept
|
|
15
|
+
- cli
|
|
16
|
+
- list-projects
|
|
17
|
+
history:
|
|
18
|
+
- version: 7.5.12
|
|
19
|
+
date: 2026-01-06
|
|
20
|
+
changes: Add absolute output option to list projects command
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# List Intlayer Projects
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx intlayer projects list
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
This command searches for and lists all Intlayer projects by finding directories that contain Intlayer configuration files. It is useful for discovering all Intlayer projects in a monorepo, workspace or git repository.
|
|
30
|
+
|
|
31
|
+
## Aliases:
|
|
32
|
+
|
|
33
|
+
- `npx intlayer projects-list`
|
|
34
|
+
- `npx intlayer pl`
|
|
35
|
+
|
|
36
|
+
## Arguments:
|
|
37
|
+
|
|
38
|
+
- **`--base-dir [path]`**: Specify the base directory to search from. Defaults to the current working directory.
|
|
39
|
+
|
|
40
|
+
> Example: `npx intlayer projects list --base-dir /path/to/workspace`
|
|
41
|
+
|
|
42
|
+
> Example: `npx intlayer projects list --base-dir /path/to/workspace`
|
|
43
|
+
|
|
44
|
+
- **`--git-root`**: Search from the git root directory rather than the base directory. This is useful for finding all Intlayer projects in a monorepo or git repository.
|
|
45
|
+
|
|
46
|
+
> Example: `npx intlayer projects list --git-root`
|
|
47
|
+
|
|
48
|
+
- **`--json`**: Output the results as JSON instead of formatted text. Useful for scripting and programmatic access.
|
|
49
|
+
|
|
50
|
+
> Example: `npx intlayer projects list --json`
|
|
51
|
+
|
|
52
|
+
- **`--absolute`**: Output the results as absolute paths instead of relative paths.
|
|
53
|
+
|
|
54
|
+
> Example: `npx intlayer projects list --absolute`
|
|
55
|
+
|
|
56
|
+
## How it works:
|
|
57
|
+
|
|
58
|
+
The command searches for Intlayer configuration files in the specified directory (or the git root if `--git-root` is used). It looks for the following configuration file patterns:
|
|
59
|
+
|
|
60
|
+
- `intlayer.config.ts`
|
|
61
|
+
- `intlayer.config.js`
|
|
62
|
+
- `intlayer.config.json`
|
|
63
|
+
- `intlayer.config.cjs`
|
|
64
|
+
- `intlayer.config.mjs`
|
|
65
|
+
- `.intlayerrc`
|
|
66
|
+
|
|
67
|
+
Each directory containing one of these files is considered an Intlayer project and will be listed in the output.
|
|
68
|
+
|
|
69
|
+
## Examples:
|
|
70
|
+
|
|
71
|
+
### List projects in current directory:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npx intlayer projects list
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### List projects in a specific directory:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npx intlayer projects list --base-dir ./packages
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### List all projects in the git repository:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npx intlayer projects list --git-root
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Using the shortcut alias:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npx intlayer pl --git-root
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Output as JSON:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
npx intlayer projects list --json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Example output:
|
|
102
|
+
|
|
103
|
+
### Formatted output:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
$ npx intlayer projects list --git-root
|
|
107
|
+
|
|
108
|
+
Found 3 Intlayer project(s):
|
|
109
|
+
|
|
110
|
+
- /Users/user/workspace/packages/app
|
|
111
|
+
- /Users/user/workspace/packages/admin
|
|
112
|
+
- /Users/user/workspace/packages/shared
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### JSON output:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
$ npx intlayer projects list --json
|
|
119
|
+
|
|
120
|
+
["/Users/user/workspace/packages/app","/Users/user/workspace/packages/admin","/Users/user/workspace/packages/shared"]
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Use cases:
|
|
124
|
+
|
|
125
|
+
- **Monorepo management**: Discover all Intlayer projects in a monorepo structure
|
|
126
|
+
- **Project discovery**: Find all Intlayer-enabled projects in a workspace
|
|
127
|
+
- **CI/CD**: Verify Intlayer projects in automated workflows
|
|
128
|
+
- **Documentation**: Generate documentation that lists all projects using Intlayer
|
|
129
|
+
|
|
130
|
+
The output provides absolute paths to each project directory, making it easy to navigate to them or to script operations across multiple Intlayer projects.
|
|
@@ -71,6 +71,26 @@ For integration with Vite + React, refer to the [setup guide](https://github.com
|
|
|
71
71
|
|
|
72
72
|
## Configuration
|
|
73
73
|
|
|
74
|
+
Run the following command to login to the Intlayer CMS:
|
|
75
|
+
|
|
76
|
+
```bash packageManager="npm"
|
|
77
|
+
npx intlayer login
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
```bash packageManager="yarn"
|
|
81
|
+
yarn intlayer login
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
```bash packageManager="pnpm"
|
|
85
|
+
pnpm intlayer login
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
```bash packageManager="bun"
|
|
89
|
+
bunx intlayer login
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
This will open your default browser to complete the authentication process and receive the necessary credentials (Client ID and Client Secret) to use Intlayer services.
|
|
93
|
+
|
|
74
94
|
In your Intlayer configuration file, you can customise the CMS settings:
|
|
75
95
|
|
|
76
96
|
```typescript fileName="intlayer.config.ts" codeFormat="typescript"
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-01-06
|
|
3
|
+
updatedAt: 2026-01-06
|
|
4
|
+
title: Comando CI
|
|
5
|
+
description: Aprende a usar el comando Intlayer CI para ejecutar comandos Intlayer con credenciales auto-inyectadas en pipelines CI/CD y monorepos.
|
|
6
|
+
keywords:
|
|
7
|
+
- CI
|
|
8
|
+
- CI/CD
|
|
9
|
+
- Automatización
|
|
10
|
+
- Monorepo
|
|
11
|
+
- Credenciales
|
|
12
|
+
- CLI
|
|
13
|
+
- Intlayer
|
|
14
|
+
slugs:
|
|
15
|
+
- doc
|
|
16
|
+
- concept
|
|
17
|
+
- cli
|
|
18
|
+
- ci
|
|
19
|
+
history:
|
|
20
|
+
- version: 7.5.11
|
|
21
|
+
date: 2026-01-06
|
|
22
|
+
changes: Agregar comando CI
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# Comando CI
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx intlayer ci <command...>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
El comando CI está diseñado para automatización y pipelines CI/CD. Inyecta automáticamente credenciales desde la variable de entorno `INTLAYER_PROJECT_CREDENTIALS` y puede ejecutar comandos Intlayer en múltiples proyectos en un monorepo.
|
|
32
|
+
|
|
33
|
+
## Cómo funciona
|
|
34
|
+
|
|
35
|
+
El comando CI opera en dos modos:
|
|
36
|
+
|
|
37
|
+
1. **Modo de proyecto único**: Si el directorio de trabajo actual coincide con una de las rutas de proyecto en `INTLAYER_PROJECT_CREDENTIALS`, ejecuta el comando solo para ese proyecto específico.
|
|
38
|
+
|
|
39
|
+
2. **Modo de iteración**: Si no se detecta un contexto de proyecto específico, itera sobre todos los proyectos configurados y ejecuta el comando para cada uno.
|
|
40
|
+
|
|
41
|
+
## Variable de entorno
|
|
42
|
+
|
|
43
|
+
El comando requiere que se establezca la variable de entorno `INTLAYER_PROJECT_CREDENTIALS`. Esta variable debe contener un objeto JSON que mapee las rutas de proyecto a sus credenciales:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"packages/app": {
|
|
48
|
+
"clientId": "your-client-id-1",
|
|
49
|
+
"clientSecret": "your-client-secret-1"
|
|
50
|
+
},
|
|
51
|
+
"packages/admin": {
|
|
52
|
+
"clientId": "your-client-id-2",
|
|
53
|
+
"clientSecret": "your-client-secret-2"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Detección del gestor de paquetes
|
|
59
|
+
|
|
60
|
+
El comando CI detecta automáticamente qué gestor de paquetes se está usando (npm, yarn, pnpm o bun) basándose en la variable de entorno `npm_config_user_agent` y usa el comando apropiado para ejecutar Intlayer.
|
|
61
|
+
|
|
62
|
+
## Argumentos
|
|
63
|
+
|
|
64
|
+
- **`<command...>`**: El comando Intlayer a ejecutar (por ejemplo, `fill`, `push`, `build`). Puedes pasar cualquier comando Intlayer y sus argumentos.
|
|
65
|
+
|
|
66
|
+
> Ejemplo: `npx intlayer ci fill --verbose`
|
|
67
|
+
>
|
|
68
|
+
> Ejemplo: `npx intlayer ci push`
|
|
69
|
+
>
|
|
70
|
+
> Ejemplo: `npx intlayer ci build`
|
|
71
|
+
|
|
72
|
+
## Ejemplos
|
|
73
|
+
|
|
74
|
+
### Ejecutar un comando en modo de proyecto único
|
|
75
|
+
|
|
76
|
+
Si estás en un directorio de proyecto que coincide con una de las rutas en `INTLAYER_PROJECT_CREDENTIALS`:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
cd packages/app
|
|
80
|
+
npx intlayer ci fill
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Esto ejecutará el comando `fill` con las credenciales inyectadas automáticamente para el proyecto `packages/app`.
|
|
84
|
+
|
|
85
|
+
### Ejecutar un comando en todos los proyectos
|
|
86
|
+
|
|
87
|
+
Si estás en un directorio que no coincide con ninguna ruta de proyecto, el comando iterará sobre todos los proyectos configurados:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
cd /path/to/monorepo
|
|
91
|
+
npx intlayer ci push
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Esto ejecutará el comando `push` para cada proyecto configurado en `INTLAYER_PROJECT_CREDENTIALS`.
|
|
95
|
+
|
|
96
|
+
### Pasar banderas adicionales
|
|
97
|
+
|
|
98
|
+
Puedes pasar cualquier bandera al comando Intlayer subyacente:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npx intlayer ci fill --verbose --mode complete
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Usar en pipelines CI/CD
|
|
105
|
+
|
|
106
|
+
En tu configuración CI/CD (por ejemplo, GitHub Actions, GitLab CI), establece `INTLAYER_PROJECT_CREDENTIALS` como secreto:
|
|
107
|
+
|
|
108
|
+
```yaml
|
|
109
|
+
# Ejemplo de GitHub Actions
|
|
110
|
+
env:
|
|
111
|
+
INTLAYER_PROJECT_CREDENTIALS: ${{ secrets.INTLAYER_PROJECT_CREDENTIALS }}
|
|
112
|
+
|
|
113
|
+
steps:
|
|
114
|
+
- name: Llenar diccionarios
|
|
115
|
+
run: npx intlayer ci fill
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Manejo de errores
|
|
119
|
+
|
|
120
|
+
- Si `INTLAYER_PROJECT_CREDENTIALS` no está establecida, el comando saldrá con un error.
|
|
121
|
+
- Si `INTLAYER_PROJECT_CREDENTIALS` no es un JSON válido, el comando saldrá con un error.
|
|
122
|
+
- Si una ruta de proyecto no existe, se omitirá con una advertencia.
|
|
123
|
+
- Si algún proyecto falla, el comando saldrá con un código de estado distinto de cero.
|
|
124
|
+
|
|
125
|
+
## Casos de uso
|
|
126
|
+
|
|
127
|
+
- **Automatización de monorepo**: Ejecutar comandos Intlayer en múltiples proyectos en un monorepo
|
|
128
|
+
- **Pipelines CI/CD**: Automatizar la gestión de diccionarios en flujos de trabajo de integración continua
|
|
129
|
+
- **Operaciones masivas**: Realizar la misma operación en múltiples proyectos Intlayer a la vez
|
|
130
|
+
- **Gestión de secretos**: Gestionar de forma segura las credenciales para múltiples proyectos usando variables de entorno
|
|
131
|
+
|
|
132
|
+
## Mejores prácticas de seguridad
|
|
133
|
+
|
|
134
|
+
- Almacena `INTLAYER_PROJECT_CREDENTIALS` como secretos cifrados en tu plataforma CI/CD
|
|
135
|
+
- Nunca comprometas las credenciales en el control de versiones
|
|
136
|
+
- Usa credenciales específicas del entorno para diferentes entornos de despliegue
|
|
137
|
+
- Rota las credenciales regularmente
|
package/docs/es/cli/index.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-11
|
|
3
|
-
updatedAt:
|
|
3
|
+
updatedAt: 2026-01-06
|
|
4
4
|
title: CLI
|
|
5
5
|
description: Descubre cómo usar el CLI de Intlayer para gestionar tu sitio web multilingüe. Sigue los pasos en esta documentación en línea para configurar tu proyecto en pocos minutos.
|
|
6
6
|
keywords:
|
|
@@ -17,6 +17,9 @@ slugs:
|
|
|
17
17
|
- concept
|
|
18
18
|
- cli
|
|
19
19
|
history:
|
|
20
|
+
- version: 7.5.11
|
|
21
|
+
date: 2026-01-06
|
|
22
|
+
changes: Añadir comando projects list
|
|
20
23
|
- version: 7.5.9
|
|
21
24
|
date: 2025-12-30
|
|
22
25
|
changes: Añadir comando init
|
|
@@ -119,6 +122,7 @@ Para ver cómo configurar los locales disponibles u otros parámetros, consulta
|
|
|
119
122
|
- **[Construir Diccionarios](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/build.md)** - Construye tus diccionarios a partir de archivos de declaración de contenido
|
|
120
123
|
- **[Observar Diccionarios](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/watch.md)** - Observa cambios y construye diccionarios automáticamente
|
|
121
124
|
- **[Verificar Versión CLI](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/version.md)** - Verifica la versión instalada del CLI de Intlayer
|
|
125
|
+
- **[Listar Proyectos](https://github.com/aymericzip/intlayer/blob/main/docs/docs/es/cli/list_projects.md)** - Lista todos los proyectos Intlayer en un directorio o repositorio git
|
|
122
126
|
|
|
123
127
|
### Gestión de Diccionarios
|
|
124
128
|
|
|
@@ -166,6 +170,7 @@ Para ver cómo configurar los locales disponibles u otros parámetros, consulta
|
|
|
166
170
|
"intlayer:list": "npx intlayer content list",
|
|
167
171
|
"intlayer:test": "npx intlayer content test",
|
|
168
172
|
"intlayer:transform": "npx intlayer transform",
|
|
173
|
+
"intlayer:projects": "npx intlayer projects list",
|
|
169
174
|
"intlayer:doc:translate": "npx intlayer doc translate",
|
|
170
175
|
"intlayer:doc:review": "npx intlayer doc review"
|
|
171
176
|
}
|
|
@@ -175,3 +180,4 @@ Para ver cómo configurar los locales disponibles u otros parámetros, consulta
|
|
|
175
180
|
>
|
|
176
181
|
> - `npx intlayer list` en lugar de `npx intlayer content list`
|
|
177
182
|
> - `npx intlayer test` en lugar de `npx intlayer content test`
|
|
183
|
+
> - `npx intlayer projects-list` o `npx intlayer pl` en lugar de `npx intlayer projects list`
|
package/docs/es/cli/list.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
createdAt: 2024-08-11
|
|
3
|
-
updatedAt:
|
|
3
|
+
updatedAt: 2026-01-06
|
|
4
4
|
title: Listar archivos de declaración de contenido
|
|
5
5
|
description: Aprende cómo listar todos los archivos de declaración de contenido en tu proyecto.
|
|
6
6
|
keywords:
|
|
@@ -13,6 +13,13 @@ slugs:
|
|
|
13
13
|
- concept
|
|
14
14
|
- cli
|
|
15
15
|
- list
|
|
16
|
+
history:
|
|
17
|
+
- version: 7.5.12
|
|
18
|
+
date: 2026-01-06
|
|
19
|
+
changes: Agregar opción de salida absoluta al comando list
|
|
20
|
+
- version: 7.5.11
|
|
21
|
+
date: 2026-01-06
|
|
22
|
+
changes: Agregar opción de salida JSON al comando list
|
|
16
23
|
---
|
|
17
24
|
|
|
18
25
|
# Listar archivos de declaración de contenido
|
|
@@ -27,14 +34,36 @@ npx intlayer content list
|
|
|
27
34
|
|
|
28
35
|
Este comando muestra todos los archivos de declaración de contenido en tu proyecto, mostrando sus claves de diccionario y rutas de archivo. Es útil para obtener una visión general de todos tus archivos de contenido y verificar que sean correctamente detectados por Intlayer.
|
|
29
36
|
|
|
30
|
-
##
|
|
37
|
+
## Argumentos:
|
|
38
|
+
|
|
39
|
+
- **`--json`**: Muestra los resultados como JSON en lugar de texto formateado. Útil para scripting y acceso programático.
|
|
40
|
+
|
|
41
|
+
> Ejemplo: `npx intlayer content list --json`
|
|
42
|
+
|
|
43
|
+
## Ejemplos:
|
|
44
|
+
|
|
45
|
+
### Listar archivos de declaración de contenido:
|
|
31
46
|
|
|
32
47
|
```bash
|
|
33
48
|
npx intlayer content list
|
|
34
49
|
```
|
|
35
50
|
|
|
51
|
+
### Salida como JSON:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx intlayer content list --json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Salida como rutas absolutas:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npx intlayer content list --absolute
|
|
61
|
+
```
|
|
62
|
+
|
|
36
63
|
## Salida de ejemplo:
|
|
37
64
|
|
|
65
|
+
### Salida formateada:
|
|
66
|
+
|
|
38
67
|
```bash
|
|
39
68
|
npx intlayer content list
|
|
40
69
|
Archivos de declaración de contenido:
|
|
@@ -45,6 +74,14 @@ Archivos de declaración de contenido:
|
|
|
45
74
|
Total de archivos de declaración de contenido: 3
|
|
46
75
|
```
|
|
47
76
|
|
|
77
|
+
### Salida JSON:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
$ npx intlayer content list --json
|
|
81
|
+
|
|
82
|
+
[{"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"}]
|
|
83
|
+
```
|
|
84
|
+
|
|
48
85
|
Este comando mostrará:
|
|
49
86
|
|
|
50
87
|
- Una lista formateada de todos los archivos de declaración de contenido con sus claves y rutas de archivo relativas
|