1.1.0 • Published 2 months ago

@kontent-ai-consulting/content-model-accelerator v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Kontent.ai Model Accelerator

!TIP
The idea behind this tool is to export & import content model structures to & from Kontent.ai environments. Data is both exported and imported via Management Api into a specified json format.

Getting started

We recommend running @kontent-ai-consulting/content-model-accelerator with npx. Use --help anytime to get information about available commands and their options.

npx @kontent-ai-consulting/content-model-accelerator --help

# you can also install the package globally, or locally
npm i @kontent-ai-consulting/content-model-accelerator -g

# with the package installed, you can call the tool as follows
kontent-ai-accelerator --help

Use via CLI

Configuration

ConfigValue
environmentIdId of Kontent.ai environment (required)
apiKeyManagement API key (required)
actionOne of (export, list, remoteImport or fileImport) (required)
filenameFilename used to export or import
modelCodename of the remote model (required for remoteImport)
contentTypesComma-separated list of codenames. May be used to import only selected content types
contentTypeSnippetsComma-separated list of codenames. May be used to import only selected content type snippets
taxonomiesComma-separated list of codenames. May be used to import only selected taxonomies
debugIf set to true, full error messages are shown in console log
forceIf set to true, confirmation prompt is disabled

Execution

!CAUTION
We do not recommend importing into a production environment directly (without proper testing). Instead you should first create a testing environment and run the script there to make sure everything works as you intended to.

# List default accelerator models
kontent-ai-accelerator --action=list

# Export existing model to json
kontent-ai-accelerator --action=export --environmentId=xxx --apiKey=yyy --filename=my-export.json

# Import from file to an existing environment
kontent-ai-accelerator --action=fileImport --environmentId=xxx --apiKey=yyy --filename=my-export.json

# Import from the default accelerator model
kontent-ai-accelerator --action=remoteImport --environmentId=xxx --apiKey=yyy --model=advanced_model

# Import only parts from the default accelerator model
kontent-ai-accelerator --action=remoteImport --environmentId=xxx --apiKey=yyy --model=advanced_model --contentTypes=link --contentTypeSnippets=metadata --taxonomies=persona,product_type

# To get some help you can use:
kontent-ai-accelerator --help
1.1.0

2 months ago

1.0.2

3 months ago

1.0.1

3 months ago

1.0.0

3 months ago

0.2.11

3 months ago

0.2.10

3 months ago

0.2.9

3 months ago

0.2.7

3 months ago

0.2.6

3 months ago

0.2.3

3 months ago

0.2.2

3 months ago

0.2.5

3 months ago

0.2.4

3 months ago

0.2.1

3 months ago

0.2.0

3 months ago