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

Commit 598e071

Browse files
committed
docs: v4 beta internal docs
- Updated the main README to indicate that official documentation for package v4 is not yet available, directing users to the internal documentation for the v4 beta. - Created a new README file in the src directory to provide detailed installation instructions and command references for the Storyblok CLI package. - Added a comprehensive guide for the `login` command, including usage examples and options.
1 parent d19189a commit 598e071

3 files changed

Lines changed: 102 additions & 1 deletion

File tree

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@
4848

4949
## Documentation
5050

51-
For complete documentation, please visit [https://storyblok.com/docs](https://storyblok.com/docs/packages/my-joyful-package)
51+
> [!WARNING]
52+
> Official documentation about this package v4 is not yet available. Please refer to the internal documentation for the [v4 beta](src/README.md).
53+
54+
~~For complete documentation, please visit [https://storyblok.com/docs](https://storyblok.com/docs/packages/my-joyful-package)~~
5255

5356
## Setup
5457

src/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
![Storyblok ImagoType](https://raw.githubusercontent.com/storyblok/.github/refs/heads/main/profile/public/github-banner.png)
2+
3+
# Storyblok CLI Package Reference
4+
5+
## Installation
6+
7+
For the latest beta version, install the package using the following command:
8+
9+
```bash
10+
npm install storyblok@beta
11+
```
12+
13+
Or for an specific beta version:
14+
15+
```bash
16+
npm install storyblok@4.0.0-beta.<version>
17+
```
18+
19+
## Command Reference
20+
21+
| Command | Status | Notes |
22+
|---------|--------|-------|
23+
| [`login`](./commands/login/README.md) | ✅ Ready | Improved DX and credentials storage in ~/.storyblok/credentials.json |
24+
| `logout` | ✅ Ready | |
25+
| `user` | ✅ Ready | |
26+
| `languages pull` | ✅ Ready | Replaces previous pull-languages |
27+
| `components pull` | ✅ Ready | Replaces previous pull-components |
28+
| `components push` | ✅ Ready | Replaces previous push-components. Also handles dependencies such as groups, tags, presets and whitelists. (Datasources is pending) |
29+
| `components delete` | 📝 Planned | Will replace delete-component and delete-components |
30+
| `migrations generate` | ✅ Ready | Replaces previous generate-migrations |
31+
| `migrations run` | ✅ Ready | Replaces previous run-migrations |
32+
| `migrations rollback` | ✅ Ready | Replaces previous rollback-migrations |
33+
| `types generate` | ✅ Ready | Replaces previous generate-typescript-typedefs |
34+
| `sync` | ⚠️ v3 | |
35+
| `datasources pull` | 📝 Planned | |
36+
| `datasources push` | 📝 Planned | |
37+
| `datasources delete` | 📝 Planned | Will replace delete-datasources |
38+
| `select` | 💬 TBD | To be discussed |
39+
| `quickstart` | 💬 TBD | To be discussed |
40+
| `spaces` | 💬 TBD | To be discussed |
41+
| `import` | 💬 TBD | To be discussed |

src/commands/login/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Login Command
2+
3+
The `login` command allows you to authenticate with your Storyblok account. It supports multiple login methods and regions.
4+
5+
## Basic Usage
6+
7+
```bash
8+
storyblok login
9+
```
10+
11+
This will start an interactive login process where you can choose between:
12+
- Email and password login
13+
- Token-based login (SSO)
14+
15+
### Get your personal access token
16+
17+
Go to https://app.storyblok.com/#/me/account?tab=token and click on **Generate new token**.
18+
19+
## Options
20+
21+
| Option | Description | Default |
22+
|--------|-------------|---------|
23+
| `-t, --token <token>` | Login directly with a token (useful for CI environments) | - |
24+
| `-r, --region <region>` | Set the region to work with (must match your space's region) | `eu` |
25+
26+
## Examples
27+
28+
1. Login with email and password:
29+
```bash
30+
storyblok login
31+
```
32+
33+
2. Login with a token:
34+
```bash
35+
storyblok login --token PERSONAL_ACCESS_TOKEN
36+
```
37+
38+
3. Login with a token in a specific region:
39+
```bash
40+
storyblok login --token PERSONAL_ACCESS_TOKEN --region us
41+
```
42+
43+
## Notes
44+
45+
- Credentials are stored securely in `~/.storyblok/credentials.json`
46+
- The region setting will be used for all subsequent CLI commands
47+
- If you're already logged in, you'll need to logout first to switch accounts
48+
- For CI environments, it's recommended to use the `--token` option
49+
- The CLI supports two-factor authentication (2FA) when using email login
50+
51+
## Available Regions
52+
53+
- `eu` - Europe
54+
- `us` - United States
55+
- `cn` - China
56+
- `au` - Australia
57+

0 commit comments

Comments
 (0)