@localess/cli 3.0.6-dev.20260506093132 → 3.0.6-dev.20260512074100
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/README.md +31 -31
- package/SKILL.md +16 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,11 +48,11 @@ If any option is omitted, the CLI will interactively prompt for the missing valu
|
|
|
48
48
|
|
|
49
49
|
**Options:**
|
|
50
50
|
|
|
51
|
-
| Flag
|
|
52
|
-
|
|
51
|
+
| Flag | Description |
|
|
52
|
+
|-------------------------|-------------------------------------------------------------|
|
|
53
53
|
| `-o, --origin <origin>` | Localess instance URL (e.g., `https://my-localess.web.app`) |
|
|
54
|
-
| `-s, --space <space>`
|
|
55
|
-
| `-t, --token <token>`
|
|
54
|
+
| `-s, --space <space>` | Space ID (found in Localess Space settings) |
|
|
55
|
+
| `-t, --token <token>` | API token (input is masked for security) |
|
|
56
56
|
|
|
57
57
|
**Examples:**
|
|
58
58
|
|
|
@@ -76,11 +76,11 @@ export LOCALESS_TOKEN=MY_API_TOKEN
|
|
|
76
76
|
localess translations pull en --path ./public/locales/en.json
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
| Variable
|
|
80
|
-
|
|
79
|
+
| Variable | Description |
|
|
80
|
+
|-------------------|-----------------------|
|
|
81
81
|
| `LOCALESS_ORIGIN` | Localess instance URL |
|
|
82
|
-
| `LOCALESS_SPACE`
|
|
83
|
-
| `LOCALESS_TOKEN`
|
|
82
|
+
| `LOCALESS_SPACE` | Space ID |
|
|
83
|
+
| `LOCALESS_TOKEN` | API token |
|
|
84
84
|
|
|
85
85
|
---
|
|
86
86
|
|
|
@@ -108,24 +108,24 @@ localess translations push <locale> --path <file> [options]
|
|
|
108
108
|
|
|
109
109
|
**Arguments:**
|
|
110
110
|
|
|
111
|
-
| Argument
|
|
112
|
-
|
|
111
|
+
| Argument | Description |
|
|
112
|
+
|------------|------------------------------------------------|
|
|
113
113
|
| `<locale>` | ISO 639-1 locale code (e.g., `en`, `de`, `fr`) |
|
|
114
114
|
|
|
115
115
|
**Options:**
|
|
116
116
|
|
|
117
|
-
| Flag
|
|
118
|
-
|
|
119
|
-
| `-p, --path <path>`
|
|
120
|
-
| `-f, --format <format>` | `flat`
|
|
121
|
-
| `-t, --type <type>`
|
|
122
|
-
| `--dry-run`
|
|
117
|
+
| Flag | Default | Description |
|
|
118
|
+
|-------------------------|---------------|-----------------------------------------------------|
|
|
119
|
+
| `-p, --path <path>` | *(required)* | Path to the JSON translations file |
|
|
120
|
+
| `-f, --format <format>` | `flat` | File format: `flat` or `nested` |
|
|
121
|
+
| `-t, --type <type>` | `add-missing` | Update strategy: `add-missing` or `update-existing` |
|
|
122
|
+
| `--dry-run` | `false` | Preview changes without applying them |
|
|
123
123
|
|
|
124
124
|
**Update Strategies:**
|
|
125
125
|
|
|
126
|
-
| Type
|
|
127
|
-
|
|
128
|
-
| `add-missing`
|
|
126
|
+
| Type | Description |
|
|
127
|
+
|-------------------|--------------------------------------------------------------|
|
|
128
|
+
| `add-missing` | Adds translations for keys that do not yet exist in Localess |
|
|
129
129
|
| `update-existing` | Updates translations for keys that already exist in Localess |
|
|
130
130
|
|
|
131
131
|
**File Formats:**
|
|
@@ -174,16 +174,16 @@ localess translations pull <locale> --path <file> [options]
|
|
|
174
174
|
|
|
175
175
|
**Arguments:**
|
|
176
176
|
|
|
177
|
-
| Argument
|
|
178
|
-
|
|
177
|
+
| Argument | Description |
|
|
178
|
+
|------------|------------------------------------------------|
|
|
179
179
|
| `<locale>` | ISO 639-1 locale code (e.g., `en`, `de`, `fr`) |
|
|
180
180
|
|
|
181
181
|
**Options:**
|
|
182
182
|
|
|
183
|
-
| Flag
|
|
184
|
-
|
|
185
|
-
| `-p, --path <path>`
|
|
186
|
-
| `-f, --format <format>` | `flat`
|
|
183
|
+
| Flag | Default | Description |
|
|
184
|
+
|-------------------------|--------------|---------------------------------|
|
|
185
|
+
| `-p, --path <path>` | *(required)* | Output file path |
|
|
186
|
+
| `-f, --format <format>` | `flat` | File format: `flat` or `nested` |
|
|
187
187
|
|
|
188
188
|
**Examples:**
|
|
189
189
|
|
|
@@ -209,8 +209,8 @@ localess types generate [--path <output_path>]
|
|
|
209
209
|
|
|
210
210
|
**Options:**
|
|
211
211
|
|
|
212
|
-
| Flag
|
|
213
|
-
|
|
212
|
+
| Flag | Default | Description |
|
|
213
|
+
|---------------------|---------------------------|---------------------------------------------------------|
|
|
214
214
|
| `-p, --path <path>` | `.localess/localess.d.ts` | Path to write the generated TypeScript definitions file |
|
|
215
215
|
|
|
216
216
|
> **Note:** Your API token must have **Development Tools** permission enabled in Localess Space settings.
|
|
@@ -240,10 +240,10 @@ const content = await client.getContentBySlug<Page>('home', { locale: 'en' });
|
|
|
240
240
|
|
|
241
241
|
## Stored Files
|
|
242
242
|
|
|
243
|
-
| File
|
|
244
|
-
|
|
245
|
-
| `.localess/credentials.json` | Stored login credentials (created by `localess login`)
|
|
246
|
-
| `.localess/localess.d.ts`
|
|
243
|
+
| File | Description |
|
|
244
|
+
|------------------------------|-------------------------------------------------------------------------|
|
|
245
|
+
| `.localess/credentials.json` | Stored login credentials (created by `localess login`) |
|
|
246
|
+
| `.localess/localess.d.ts` | Generated TypeScript definitions (created by `localess types generate`) |
|
|
247
247
|
|
|
248
248
|
> It is recommended to add `.localess/credentials.json` to your `.gitignore` to avoid committing sensitive credentials.
|
|
249
249
|
|
package/SKILL.md
CHANGED
|
@@ -105,18 +105,18 @@ localess translations push <locale> --path <file> [options]
|
|
|
105
105
|
|
|
106
106
|
**Arguments:**
|
|
107
107
|
|
|
108
|
-
| Argument | Description
|
|
109
|
-
|
|
108
|
+
| Argument | Description |
|
|
109
|
+
|------------|------------------------------------|
|
|
110
110
|
| `<locale>` | ISO 639-1 locale code: `en`, `de`… |
|
|
111
111
|
|
|
112
112
|
**Options:**
|
|
113
113
|
|
|
114
|
-
| Flag | Default | Description
|
|
115
|
-
|
|
116
|
-
| `-p, --path <path>` | required | Path to the translations JSON file
|
|
114
|
+
| Flag | Default | Description |
|
|
115
|
+
|-------------------------|-----------------|-----------------------------------------------------------|
|
|
116
|
+
| `-p, --path <path>` | required | Path to the translations JSON file |
|
|
117
117
|
| `-f, --format <format>` | `flat` | File format: `flat` only (**nested not yet implemented**) |
|
|
118
|
-
| `-t, --type <type>` | `add-missing` | Update strategy: `add-missing` or `update-existing`
|
|
119
|
-
| `--dry-run` | `false` | Preview changes without applying them
|
|
118
|
+
| `-t, --type <type>` | `add-missing` | Update strategy: `add-missing` or `update-existing` |
|
|
119
|
+
| `--dry-run` | `false` | Preview changes without applying them |
|
|
120
120
|
|
|
121
121
|
**Update Strategies:**
|
|
122
122
|
|
|
@@ -163,8 +163,8 @@ localess translations pull <locale> --path <file> [options]
|
|
|
163
163
|
|
|
164
164
|
**Arguments:**
|
|
165
165
|
|
|
166
|
-
| Argument | Description
|
|
167
|
-
|
|
166
|
+
| Argument | Description |
|
|
167
|
+
|------------|------------------------------------|
|
|
168
168
|
| `<locale>` | ISO 639-1 locale code: `en`, `de`… |
|
|
169
169
|
|
|
170
170
|
**Options:**
|
|
@@ -196,9 +196,9 @@ localess types generate [--path <output>]
|
|
|
196
196
|
|
|
197
197
|
**Options:**
|
|
198
198
|
|
|
199
|
-
| Flag | Default
|
|
200
|
-
|
|
201
|
-
| `-p, --path <path>` | `.localess/localess.d.ts`
|
|
199
|
+
| Flag | Default | Description |
|
|
200
|
+
|---------------------|---------------------------|------------------|
|
|
201
|
+
| `-p, --path <path>` | `.localess/localess.d.ts` | Output file path |
|
|
202
202
|
|
|
203
203
|
> **Prerequisite:** The API token must have the **Development Tools** permission in Localess Space settings.
|
|
204
204
|
|
|
@@ -344,10 +344,10 @@ If you want to commit generated types while still ignoring credentials, you can
|
|
|
344
344
|
|
|
345
345
|
## Files Written by the CLI
|
|
346
346
|
|
|
347
|
-
| File
|
|
348
|
-
|
|
349
|
-
| `.localess/credentials.json`
|
|
350
|
-
| `.localess/localess.d.ts`
|
|
347
|
+
| File | Created by | Permissions | Purpose |
|
|
348
|
+
|------------------------------|---------------------------|----------------------|----------------------------|
|
|
349
|
+
| `.localess/credentials.json` | `localess login` | `0o600` (owner only) | Persisted auth credentials |
|
|
350
|
+
| `.localess/localess.d.ts` | `localess types generate` | Standard | Generated TypeScript types |
|
|
351
351
|
|
|
352
352
|
---
|
|
353
353
|
|