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

@cerebellum/cli

v1.0.4

Published

## Introduction

Downloads

36

Readme

Cerebellum CLI

Introduction

Cerebellum is a scalable, drop-in infrastructure and library for realtime applications. The Cerebellum CLI tool is used to deploy the ready-made infrastructure to AWS with just a few simple commands. Cerebellum's preconfigured WebSocket Server is the default configuration for simple and efficient time-to-deployment with the Cerebellum SDK. If you prefer, you can use your own backend server by providing your image when prompted.

Usage

$ npm install -g @cerebellum/cli

$ cerebellum COMMAND
running command...

$ cerebellum (--version)
@cerebellum/cli/1.0.2 darwin-arm64 node-v20.11.0

$ cerebellum --help [COMMAND]
USAGE
  $ cerebellum COMMAND
...

Getting Started

Prerequisites

  • an AWS account has been created
  • an AWS IAM role has been created with given AdministratorAccess permissions
    • the Access Key and Secret Access Key are required to connect to AWS
  • npm is installed
  • AWS CLI is installed and configured
  • AWS CDK is installed
  • SSL/TLS certificate has been validated and issued using AWS Certificate Manager

Installation

  • run npm install -g @cerebellum/cli
  • type cerebellum --help to see the available commands

First Time Usage

Once installed, the cerebellum commands can be run by executing cerebellum <command> in your terminal.

For further detail on each command, type cerebellum <command> --help in the terminal.

Upon executing cerebellum init or cerebellum create, you will be prompted to provide some configurations for deployment:

  • Your AWS Access Key
  • Your AWS Secret Access Key
  • Your preferred AWS region
  • AWS description (can leave blank)
  • Your dockerized image (if you intend to use your own server)
  • Your validated SSL/TLS certificate ARN from AWS Certificate Manager
  • Maximum and minimum number of concurrent remote servers for scaling up and down
    • Your infrastructure will automatically scale down to the minimum number of servers on low load
    • Your infrastructure will automatically scale up as the load increases until it reaches the approved maximum

Commands

cerebellum create

Create a new directory, initialize the CDK project, and deploy infrastructure to AWS

USAGE
  $ cerebellum create

DESCRIPTION
  Create a new directory, initialize the CDK project, and deploy infrastructure to AWS

cerebellum init

Initialize the CDK project in current directory and deploy infrastructure to AWS

USAGE
  $ cerebellum init

DESCRIPTION
  Initialize the CDK project in current directory and deploy infrastructure to AWS

cerebellum destroy

Destroy the infrastructure (delete stack from AWS)

USAGE
  $ cerebellum destroy

DESCRIPTION
  Destroy the infrastructure (delete stack from AWS)

FAQ

I canceled the cerebellum create (or cerebellum init) command while the infrastructure was still deploying, and now it won't let me redeploy. How can I fix this?

  • The infrastructure will continue to deploy, even if you cancel the command during deployment. You may check in your CloudFormation in the AWS console to see the logs.

I have been waiting for a really long time and it is still deploying. Is something wrong?

  • Deployments to AWS can take up to 30 minutes. There is a lot of work AWS has to do behind the scenes to provision new resources or to drain existing resources.
  • To troubleshoot, log in to your AWS console and check the logs in your CloudFormation. You will be able to discern which resource is holding up the deployment. Then, you may navigate to that resource and check its logs to further investigate.

I want to cancel my deployment, but it is still updating or deploying. How can I do this?

  • If there are any errors, or if you wish to cancel the deployment, you can force delete the stack from CloudFormation in the AWS console.

Does Cerebellum apply identifiers to the infrastructure that gets spun up by the CLI?

  • Everything deployed using cerebellum create or cerebellum init has Cerebellum as a prefix on its identifier. You can change these manually in the CDK if you wish, but make sure they are uniquely named.