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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@optimizely/cms-cli

v1.0.0

Published

CLI application for integration with Optimizely CMS

Readme

@optimizely/cms-cli

npm version

The official command-line tool for Optimizely CMS that enables code-first content modeling. Sync your TypeScript content type definitions to Optimizely CMS, allowing you to manage content models alongside your code with full version control.

Features

  • ContentTypes-to-CMS sync - Push your TypeScript definitions to Optimizely CMS
  • Code-first workflow - Define content types in your preferred IDE with IntelliSense
  • Version control - Manage content types alongside your application code
  • Simple CLI commands - Intuitive interface for common tasks
  • Seamless integration - Works perfectly with @optimizely/cms-sdk

Installation

Install as a development dependency:

npm install -D @optimizely/cms-cli

Or using other package managers:

# pnpm
pnpm add -D @optimizely/cms-cli

# yarn
yarn add -D @optimizely/cms-cli

Quick Start

1. Configure your environment

Create a .env file in your project root with your CMS credentials:

OPTIMIZELY_CMS_URL=https://your-cms-instance.com
OPTIMIZELY_CMS_CLIENT_ID=your-client-id
OPTIMIZELY_CMS_CLIENT_SECRET=your-client-secret

2. Define your content types

Create TypeScript definitions for your content models:

import { contentType } from '@optimizely/cms-sdk';

export const ArticlePage = contentType({
  key: 'Article',
  displayName: 'Article page',
  baseType: '_page',
  properties: {
    title: {
      displayName: 'Title',
      type: 'string',
    },
    subtitle: {
      type: 'string',
      displayName: 'Subtitle',
    },
    body: {
      displayName: 'body ',
      type: 'richText',
    },
  },
});

3. Sync to CMS

Run the CLI to push your definitions to Optimizely CMS:

pnpm exec optimizely-cms-cli config push ./optimizely.config.mjs

Commands

Configuration Management

Sync your TypeScript content type definitions with Optimizely CMS:

# Push content types to CMS (uses ./optimizely.config.mjs by default)
optimizely-cms-cli config push

# Push with custom config file
optimizely-cms-cli config push ./custom-config.mjs

# Force update (may result in data loss)
optimizely-cms-cli config push --force

# Pull current CMS configuration to JSON
optimizely-cms-cli config pull --output ./config.json

Authentication

Verify your CMS credentials are correctly configured:

# Test your credentials from environment variables
optimizely-cms-cli login

# Show detailed authentication output
optimizely-cms-cli login --verbose

Content Type Operations

Manage individual content types:

# Delete a specific content type
optimizely-cms-cli content delete ArticlePage

# Delete with custom host
optimizely-cms-cli content delete ProductPage --host https://example.com

Dangerous Operations

⚠️ Use with extreme caution - these commands are destructive:

# Delete ALL user-defined content types (interactive confirmation required)
optimizely-cms-cli danger delete-all-content-types

Get Help

# Show all available commands
optimizely-cms-cli --help

# Show help for a specific command
optimizely-cms-cli config push --help

# Show help for a topic
optimizely-cms-cli config --help

Documentation

For comprehensive guides and best practices:

Getting Started

  • Installation - Set up your development environment
  • Setup - Configure the SDK and CLI
  • Modelling - Define your content types with TypeScript

Workflow Guides

Best Practices

This CLI tool works best when used alongside the @optimizely/cms-sdk for a complete type-safe development experience:

# Install both packages
npm install @optimizely/cms-sdk
npm install -D @optimizely/cms-cli

The typical workflow:

  1. Define content types in TypeScript
  2. Use the CLI to sync definitions to CMS
  3. Create content in Optimizely CMS
  4. Fetch and render content with the SDK

For complete setup instructions, see the main repository README.

Support

License

Apache License 2.0


Built by the Optimizely CMS Team | Documentation | GitHub