@vtex/cli-plugin-content
v1.1.2
Published
vtex plugin content
Maintainers
Keywords
Readme
Content VTEX CLI Plugin
This is a CLI plugin for VTEX CLI that enables you to manage a store's content, via Content Platform.
Usage
$ npm install -g @vtex/cli-plugin-content
$ vtex COMMAND
running command...
$ vtex (-v|--version|version)
@vtex/cli-plugin-content/1.1.2 darwin-arm64 node-v24.1.0
$ vtex --help [COMMAND]
USAGE
$ vtex COMMAND
...Commands
vtex content:generate-schema [COMPONENT_SCHEMAS_PATH] [CONTENT_TYPES_PATH]vtex content:initvtex content:split-componentsvtex content:split-content-typesvtex content:upload-schema [SCHEMA_PATH]
vtex content:generate-schema [COMPONENT_SCHEMAS_PATH] [CONTENT_TYPES_PATH]
Generate a single schema file for CMS
USAGE
$ vtex content:generate-schema [COMPONENT_SCHEMAS_PATH] [CONTENT_TYPES_PATH]
ARGUMENTS
COMPONENT_SCHEMAS_PATH [default: cms/faststore/components] Path to a directory containing all custom component
schemas.
CONTENT_TYPES_PATH [default: cms/faststore/pages] Path to a directory containing all custom content-type
definitions.
OPTIONS
-b, --base=base-schema-id Use a custom base schema instead of vtex.faststore.
-h, --help show CLI help
-l, --local=path-to-schema-file Use a local schema as the base schema instead of the default FastStore schema from
the registry.
-o, --out=path-to-output-file [default: cms_schema.json] Path to the output file where the generated schema will be
saved.
-v, --verbose Show debug level logs
--trace Ensure all requests to VTEX IO are tracedSee code: build/commands/content/generate-schema.ts
vtex content:init
Initialize CMS folder structure with example files.
USAGE
$ vtex content:init
OPTIONS
-h, --help show CLI help
-v, --verbose Show debug level logs
--trace Ensure all requests to VTEX IO are tracedSee code: build/commands/content/init.ts
vtex content:split-components
Split CMS component files from sections.json
USAGE
$ vtex content:split-components
OPTIONS
-h, --help show CLI help
-i, --input=path-to-sections-file [default: cms/faststore/sections.json] Path to the sections.json file
-o, --output=path-to-output-directory [default: cms/faststore/components] Path to the output directory for component
files
-v, --verbose Show debug level logs
--trace Ensure all requests to VTEX IO are tracedSee code: build/commands/content/split-components.ts
vtex content:split-content-types
Split CMS content-type files from content-types.json
USAGE
$ vtex content:split-content-types
OPTIONS
-h, --help show CLI help
-i, --input=path-to-content-types-file [default: cms/faststore/content-types.json] Path to the content-types.json
file
-o, --output=path-to-output-directory [default: cms/faststore/pages] Path to the output directory for content-type
files
-s, --sections=path-to-sections-file [default: cms/faststore/sections.json] Path to the sections.json file used to
filter components by requiredScopes
-v, --verbose Show debug level logs
--trace Ensure all requests to VTEX IO are tracedSee code: build/commands/content/split-content-types.ts
vtex content:upload-schema [SCHEMA_PATH]
Upload a local schema to Schema Registry.
USAGE
$ vtex content:upload-schema [SCHEMA_PATH]
ARGUMENTS
SCHEMA_PATH [default: schema.json] Path to the schema file to upload.
OPTIONS
-h, --help show CLI help
-v, --verbose Show debug level logs
--trace Ensure all requests to VTEX IO are tracedSee code: build/commands/content/upload-schema.ts
Development
./bin/run content -h