Skip to main content
StormyCMS

Stormy CLI

Run commands with npx @stormycms/cli, or use pnpm exec stormy inside the starter.

stormy init

Creates a project from the bundled Next.js starter, writes environment files, installs dependencies, and initializes Git.

Terminal window
npx @stormycms/cli init --name my-site --target ./my-site
OptionBehavior
-n, --name <name>Lowercase kebab-case name. Prompts if omitted.
-t, --target <path>Empty or nonexistent directory. Prompts with ./<name> if omitted.
--skip-envWrites .env files with example values without prompting.
--skip-installSkips pnpm install.

See Getting started for credentials and the first page.

stormy generate

Reads React .tsx files in one directory and writes CMS component registrations. It does not scan subdirectories.

Terminal window
pnpm exec stormy generate --components packages/components/src/lib --output packages/components/draft.ts --framework react
OptionDefault
-c, --components <path>packages/components/src/lib
-o, --output <path>packages/components/src/index.ts
-f, --framework <name>Detects dependencies in the current directory

Output overwrites the target file. The current React generator emits a legacy stormycms import, componentId metadata, and component-name import paths. Use @stormycms/react/cms, remove componentId, fix paths to match filenames, and merge registrations into your default export map. Review fields, defaults, and placement rules.

React is the included framework plugin. It must resolve as @stormycms/react/plugin from the current project. Detecting another framework does not install a plugin for it.

Configuration

CLI flags override stormy.config.ts values:

import type { StormyConfig } from '@stormycms/cli';
export default {
framework: 'react',
components: 'packages/components/src/lib',
output: 'packages/components/draft.ts',
} satisfies StormyConfig;

Prop mappings

TypeGenerated field
string, numberinput
booleancheckbox
DatedateTime
LongStringtextarea
Markdownmarkdown
ImageAssetimage
String literal unionradio for up to three options, otherwise select
string[], number[], boolean[]textList, numberList, checkboxList
LongString[]textareaList
ImageAsset[], Markdown[]list with the corresponding field type
RecordkeyValueList
Object array with local type definitioncomplexList

LongString, Markdown, and ImageAsset come from @stormycms/core. The parser reads syntax in each file, so imported prop definitions may need manual registration. Object props can produce object, which is not a supported CMSField variant.

Last updated: 10/20/26, 1:09 AM

StormyCMS

The headless CMS where you own the editor.