This repository was archived by the owner on Jan 19, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
chore: internal docs for beta #187
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
598e071
docs: v4 beta internal docs
alvarosabu c0323cd
docs(logout): add README for logout command
alvarosabu 437bd59
docs(languages): add README for languages command
alvarosabu 283169d
docs(user): add README for user command
alvarosabu 8f01508
docs(README): update command reference and add global options section
alvarosabu 24df207
docs: clean up README files by removing trailing whitespace
alvarosabu 8e37554
docs(components): add README files for components commands and update…
alvarosabu d5e1d06
docs(components): remove trailing whitespace from README files
alvarosabu 72600e4
docs(migrations): add README files for migrations commands
alvarosabu f0b64ea
docs: apply suggestions from code review
alvarosabu 3479d26
docs: update README files for improved clarity and structure
alvarosabu 198108b
docs: remove unnecessary blank line in README
alvarosabu cafdb9d
docs: remove redundant login requirement note from multiple README files
alvarosabu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
|  | ||
|
|
||
| # Storyblok CLI | ||
|
|
||
| ## Installation | ||
|
|
||
| For the latest beta version, install the package using the following command: | ||
|
|
||
| ```bash | ||
| npm install storyblok@beta | ||
| ``` | ||
|
|
||
| Or for an specific beta version: | ||
|
|
||
| ```bash | ||
| npm install storyblok@4.0.0-beta.<version> | ||
| ``` | ||
|
|
||
| ## API | ||
|
|
||
| | Command | Status | Notes | | ||
| |---------|--------|-------| | ||
| | [`login`](./commands/login/README.md) | ✅ | Improved DX and credentials storage in ~/.storyblok/credentials.json | | ||
| | [`logout`](./commands/logout/README.md) | ✅ | | | ||
| | [`user`](./commands/user/README.md) | ✅ | | | ||
| | [`languages pull`](./commands/languages/README.md) | ✅ | Replaces previous pull-languages | | ||
| | [`components pull`](./commands/components/pull/README.md) | ✅ | Replaces previous pull-components | | ||
| | [`components push`](./commands/components/push/README.md) | ✅ | Replaces previous push-components. Also handles dependencies such as groups, tags, presets and whitelists. (Datasources is pending) | | ||
| | `components delete` | 📝 | Will replace delete-component and delete-components | | ||
| | [`migrations generate`](./commands/migrations/generate/README.md) | ✅ | Replaces previous generate-migrations | | ||
| | [`migrations run`](./commands/migrations/run/README.md) | ✅ | Replaces previous run-migrations | | ||
| | [`migrations rollback`](./commands/migrations/rollback/README.md) | ✅ | Replaces previous rollback-migrations | | ||
| | [`types generate`](./commands/types/generate/README.md) | ✅ | Replaces previous generate-typescript-typedefs | | ||
| | `sync` | ⚠️ | | | ||
| | `datasources pull` | 📝 | | | ||
| | `datasources push` | 📝 | | | ||
| | `datasources delete` | 📝 | Will replace delete-datasources | | ||
| | `select` | 💬 | To be discussed | | ||
| | `quickstart` | 💬 | To be discussed | | ||
| | `spaces` | 💬 | To be discussed | | ||
| | `import` | 💬 | To be discussed | | ||
|
|
||
| ### Status Legend | ||
| - ✅ Ready: Feature is implemented and ready to use | ||
| - 📝 Planned: Feature is planned for future implementation | ||
| - ⚠️ v3: Feature is available only in v3 | ||
| - 💬 TBD: Feature is under discussion | ||
|
|
||
| ## Global Options | ||
|
|
||
| These options are available for all commands: | ||
|
|
||
| | Option | Description | Default | | ||
| |--------|-------------|---------| | ||
| | `-v, --verbose` | Enable verbose output for debugging | `false` | | ||
| | `--ci` | Enable CI mode (coming soon) | `false` | | ||
|
|
||
| > [!TIP] | ||
| > When reporting a bug or opening a support ticket, please run the command with the `--verbose` flag and add the output to it. This will help us better understand and resolve the issue. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Components Command | ||
|
|
||
| The `components` module provides tools to manage Storyblok components and their dependencies. | ||
|
|
||
| ## Subcommands | ||
|
|
||
| - [`pull`](./pull/README.md): Download components from your Storyblok space. | ||
| - [`push`](./push/README.md): Upload components and their dependencies (groups, tags, presets, whitelists) to your Storyblok space. | ||
| - `delete` (coming soon): Remove components from your Storyblok space. | ||
|
|
||
| > See each subcommand for detailed usage, options, and examples. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,190 @@ | ||
| # Components Pull Command | ||
|
|
||
| The `components pull` command allows you to download components and their dependencies from your Storyblok space. | ||
|
|
||
| ## Basic Usage | ||
|
|
||
| ```bash | ||
| storyblok components pull --space YOUR_SPACE_ID | ||
| ``` | ||
|
|
||
| This will download all components and their dependencies to consolidated files: | ||
| ``` | ||
| .storyblok/ | ||
| └── components/ | ||
| └── YOUR_SPACE_ID/ | ||
| ├── components.json # All components | ||
| ├── groups.json # Component groups | ||
| ├── presets.json # Component presets | ||
| └── tags.json # Component tags | ||
| ``` | ||
|
|
||
| > [!WARNING] | ||
| > The `--filename` option is ignored when using `--separate-files`. Each component will be saved with its own name. | ||
|
|
||
| ## Pull a Single Component | ||
|
|
||
| ```bash | ||
| storyblok components pull COMPONENT_NAME --space YOUR_SPACE_ID | ||
| ``` | ||
|
|
||
| This will download a single component and its dependencies to: | ||
| ``` | ||
| .storyblok/ | ||
| └── components/ | ||
| └── YOUR_SPACE_ID/ | ||
| ├── COMPONENT_NAME.json # Single component | ||
| ├── groups.json # Component groups | ||
| ├── COMPONENT_NAME.presets.json # Component presets | ||
| └── tags.json # Component tags | ||
| ``` | ||
|
|
||
| ## Options | ||
|
|
||
| | Option | Description | Default | | ||
| |--------|-------------|---------| | ||
| | `-s, --space <space>` | (Required) The ID of the space to pull components from | - | | ||
| | `-f, --filename <filename>` | Custom name for the components file | `components` | | ||
| | `--sf, --separate-files` | Create a separate file for each component | `false` | | ||
| | `--su, --suffix <suffix>` | Suffix to add to the files names | | | ||
| | `-p, --path <path>` | Custom path to store the files | `.storyblok/components` | | ||
|
|
||
| ## Examples | ||
|
|
||
| 1. Pull all components with default settings: | ||
| ```bash | ||
| storyblok components pull --space 12345 | ||
| ``` | ||
| Generates: | ||
| ``` | ||
| .storyblok/ | ||
| └── components/ | ||
| └── 12345/ | ||
| ├── components.json # All components | ||
| ├── groups.json # Component groups | ||
| ├── presets.json # Component presets | ||
| └── tags.json # Component tags | ||
| ``` | ||
|
|
||
| 2. Pull a single component: | ||
| ```bash | ||
| storyblok components pull hero --space 12345 | ||
| ``` | ||
| Generates: | ||
| ``` | ||
| .storyblok/ | ||
| └── components/ | ||
| └── 12345/ | ||
| ├── hero.json # Single component | ||
| ├── groups.json # Component groups | ||
| ├── hero.presets.json # Component presets | ||
| └── tags.json # Component tags | ||
| ``` | ||
|
|
||
| 3. Pull components with a custom file name: | ||
| ```bash | ||
| storyblok components pull --space 12345 --filename my-components | ||
| ``` | ||
| Generates: | ||
| ``` | ||
| .storyblok/ | ||
| └── components/ | ||
| └── 12345/ | ||
| ├── my-components.json # All components | ||
| ├── groups.json # Component groups | ||
| ├── presets.json # Component presets | ||
| └── tags.json # Component tags | ||
| ``` | ||
|
|
||
| 4. Pull components with custom suffix: | ||
| ```bash | ||
| storyblok components pull --space 12345 --suffix dev | ||
| ``` | ||
| Generates: | ||
| ``` | ||
| .storyblok/ | ||
| └── components/ | ||
| └── 12345/ | ||
| ├── components.dev.json # All components | ||
| ├── groups.json # Component groups | ||
| ├── presets.json # Component presets | ||
| └── tags.json # Component tags | ||
| ``` | ||
|
|
||
| 5. Pull components to separate files: | ||
| ```bash | ||
| storyblok components pull --space 12345 --separate-files | ||
| ``` | ||
| Generates: | ||
| ``` | ||
| .storyblok/ | ||
| └── components/ | ||
| └── 12345/ | ||
| ├── hero.json # Individual components | ||
| ├── hero.presets.json # Component presets | ||
| ├── feature.json | ||
| ├── feature.presets.json | ||
| ├── ... | ||
| ├── groups.json # Component groups | ||
| └── tags.json # Component tags | ||
| ``` | ||
|
|
||
| 6. Pull components to a custom path: | ||
| ```bash | ||
| storyblok components pull --space 12345 --path ./backup | ||
| ``` | ||
| Generates: | ||
| ``` | ||
| backup/ | ||
| └── components/ | ||
| └── 12345/ | ||
| ├── components.json # All components | ||
| ├── groups.json # Component groups | ||
| ├── presets.json # Component presets | ||
| └── tags.json # Component tags | ||
| ``` | ||
|
|
||
| ## File Structure | ||
|
|
||
| The command follows this pattern for file generation: | ||
| ``` | ||
| {path}/ | ||
| └── components/ | ||
| └── {spaceId}/ | ||
| ├── {filename}.{suffix}.json # Components file | ||
| ├── groups.json # Component groups | ||
| ├── presets.json # Component presets | ||
| └── tags.json # Component tags | ||
| ``` | ||
|
|
||
| When using `--separate-files`: | ||
| ``` | ||
| {path}/ | ||
| └── components/ | ||
| └── {spaceId}/ | ||
| ├── {componentName1}.json # Individual components | ||
| ├── {componentName1}.presets.json # Component presets | ||
| ├── {componentName2}.json | ||
| ├── {componentName2}.presets.json | ||
| ├── ... | ||
| ├── groups.json # Component groups | ||
| └── tags.json # Component tags | ||
| ``` | ||
|
|
||
| Where: | ||
| - `{path}` is the base path (default: `.storyblok`) | ||
| - `{spaceId}` is your Storyblok Space ID | ||
| - `{filename}` is the name you specified (default: `components`) | ||
| - `{suffix}` is the suffix you specified (default: space ID) | ||
| - `{componentName}` is the name of the component | ||
|
|
||
| ## Notes | ||
|
|
||
| - The space ID is required | ||
| - The command will create the necessary directories if they don't exist | ||
| - When using `--separate-files` or single component, presets are saved in separate files named `{componentName}.presets.json` | ||
| - The command downloads: | ||
| - Components | ||
| - Component groups | ||
| - Component presets | ||
| - Component tags |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My suggestion is to keep the non-beta installation command in here. It makes sense for people to want the stable version for a new project.
You can also install the beta version, currently in development:
It's also possible to target a specific beta version:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @alvarosabu, is this readme going to be in
main, or in a beta branch? If it's supposed to be inmain, I agree with @jeremenichelli.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's going to live on the
nextbranch @manuelschroederdev @jeremenichelli these documentations are strictly for the beta since they will be replaced by official documentation later onThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I thought. 😄 Then feel free to disregard the suggestion from Jeremias here.