npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

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

v1.1.0

Published

This utility enables easy export / import of project structure's in Kontent.ai

Downloads

42

Readme

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

| Config | Value | | ----------------------- | -------------------------------------------------------------------------------------------- | | environmentId | Id of Kontent.ai environment (required) | | apiKey | Management API key (required) | | action | One of (export, list, remoteImport or fileImport) (required) | | filename | Filename used to export or import | | model | Codename of the remote model (required for remoteImport) | | contentTypes | Comma-separated list of codenames. May be used to import only selected content types | | contentTypeSnippets | Comma-separated list of codenames. May be used to import only selected content type snippets | | taxonomies | Comma-separated list of codenames. May be used to import only selected taxonomies | | debug | If set to true, full error messages are shown in console log | | force | If 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