Skip to content
This repository was archived by the owner on Jan 19, 2026. It is now read-only.

Commit 437bd59

Browse files
committed
docs(languages): add README for languages command
- Created a new README file for the `languages` command, detailing its usage, options, and examples for pulling language configurations from a Storyblok space. - Included information on file structure and notes for user requirements, enhancing clarity and usability for developers interacting with the command.
1 parent c0323cd commit 437bd59

2 files changed

Lines changed: 102 additions & 2 deletions

File tree

src/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ npm install storyblok@4.0.0-beta.<version>
2121
| Command | Status | Notes |
2222
|---------|--------|-------|
2323
| [`login`](./commands/login/README.md) | ✅ Ready | Improved DX and credentials storage in ~/.storyblok/credentials.json |
24-
| `logout` | ✅ Ready | |
24+
| [`logout`](./commands/logout/README.md) | ✅ Ready | |
2525
| `user` | ✅ Ready | |
26-
| `languages pull` | ✅ Ready | Replaces previous pull-languages |
26+
| [`languages pull`](./commands/languages/README.md) | ✅ Ready | Replaces previous pull-languages |
2727
| `components pull` | ✅ Ready | Replaces previous pull-components |
2828
| `components push` | ✅ Ready | Replaces previous push-components. Also handles dependencies such as groups, tags, presets and whitelists. (Datasources is pending) |
2929
| `components delete` | 📝 Planned | Will replace delete-component and delete-components |

src/commands/languages/README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Languages Command
2+
3+
The `languages` command allows you to manage languages in your Storyblok space. Currently, it supports pulling language configurations from your space.
4+
5+
## Basic Usage
6+
7+
```bash
8+
storyblok languages pull --space YOUR_SPACE_ID
9+
```
10+
11+
This will download your space's languages configuration and save it to:
12+
```
13+
.storyblok/
14+
└── languages/
15+
└── YOUR_SPACE_ID/
16+
└── languages.json
17+
```
18+
19+
## Options
20+
21+
| Option | Description | Default |
22+
|--------|-------------|---------|
23+
| `-s, --space <space>` | (Required) The ID of the space to pull languages from | - |
24+
| `-f, --filename <filename>` | Custom name for the languages file | `languages` |
25+
| `--su, --suffix <suffix>` | Suffix to add to the file name | Space ID |
26+
| `-p, --path <path>` | Custom path to store the file | `.storyblok/languages` |
27+
28+
## Examples
29+
30+
1. Pull languages with default settings:
31+
```bash
32+
storyblok languages pull --space 12345
33+
```
34+
Generates:
35+
```
36+
.storyblok/
37+
└── languages/
38+
└── 12345/
39+
└── languages.json
40+
```
41+
42+
2. Pull languages with custom filename:
43+
```bash
44+
storyblok languages pull --space 12345 --filename my-languages
45+
```
46+
Generates:
47+
```
48+
.storyblok/
49+
└── languages/
50+
└── 12345/
51+
└── my-languages.json
52+
```
53+
54+
3. Pull languages with custom suffix:
55+
```bash
56+
storyblok languages pull --space 12345 --suffix dev
57+
```
58+
Generates:
59+
```
60+
.storyblok/
61+
└── languages/
62+
└── 12345/
63+
└── languages.dev.json
64+
```
65+
66+
4. Pull languages to a custom path:
67+
```bash
68+
storyblok languages pull --space 12345 --path ./backup
69+
```
70+
Generates:
71+
```
72+
backup/
73+
└── languages/
74+
└── 12345/
75+
└── languages.json
76+
```
77+
78+
## File Structure
79+
80+
The command follows this pattern for file generation:
81+
```
82+
{path}/
83+
└── languages/
84+
└── {spaceId}/
85+
└── {filename}.{suffix}.json
86+
```
87+
88+
Where:
89+
- `{path}` is the base path (default: `.storyblok`)
90+
- `{spaceId}` is your Storyblok space ID
91+
- `{filename}` is the name you specified (default: `languages`)
92+
- `{suffix}` is the suffix you specified (default: space ID)
93+
94+
## Notes
95+
96+
- You must be logged in to use this command
97+
- The space ID is required
98+
- The command will create the necessary directories if they don't exist
99+
- The generated file follows the Storyblok languages schema
100+
- The file can be used for version control or backup purposes

0 commit comments

Comments
 (0)