@localess/cli 0.0.1-dev.20260216094809 → 0.0.1-dev.20260216101417
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 +51 -52
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,55 +8,54 @@
|
|
|
8
8
|
|
|
9
9
|
# Localess Command Line
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
````
|
|
11
|
+
A powerful CLI tool to interact with your Localess spaces.
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- 🔐 **Authentication** - Secure login system and CI environments.
|
|
16
|
+
- 🛡️ **Type Safety** - Generate TypeScript type definitions for your Localess content schemas, ensuring type safety in your frontend applications.
|
|
17
|
+
- 🌐 **Translations** - Sync and manage translations for your Localess space.
|
|
18
|
+
|
|
19
|
+
## Setup
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install @localess/cli -D
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Login
|
|
26
|
+
The CLI provides a `login` command to authenticate with your Localess account. This command prompts you for your email and password, and securely stores an authentication token for future API requests.
|
|
27
|
+
### Usage
|
|
28
|
+
|
|
29
|
+
#### Login with your Localess from CLI:
|
|
30
|
+
```bash
|
|
31
|
+
localess login --origin <localess_api_origin> --space <space_id> --token <space_access_token>
|
|
32
|
+
```
|
|
33
|
+
#### Login with your Localess with environment variables:
|
|
34
|
+
```bash
|
|
35
|
+
export LOCALESS_ORIGIN=<localess_api_origin>
|
|
36
|
+
export LOCALESS_SPACE=<space_id>
|
|
37
|
+
export LOCALESS_TOKEN=<space_access_token>
|
|
38
|
+
localess login
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Logout
|
|
42
|
+
The CLI provides a `logout` command to clear your authentication token and log you out of your Localess account.
|
|
43
|
+
### Usage
|
|
44
|
+
```bash
|
|
45
|
+
localess logout
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Generate TypeScript Types
|
|
49
|
+
|
|
50
|
+
The CLI provides a `types` command to generate TypeScript definitions for your Localess content schemas. This command fetches your space's OpenAPI schema and writes a `localess.d.ts` file to your project, allowing for strong typing in your codebase.
|
|
51
|
+
|
|
52
|
+
### Usage
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
localess types
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- You must be logged in (`localess login`) before running this command.
|
|
59
|
+
- The generated types file will be saved as `./.localess/localess.d.ts` in your current working directory.
|
|
60
|
+
|
|
61
|
+
You can then import these types in your TypeScript project for improved type safety when working with Localess content.
|