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

cbs-block

v1.0.11

Published

SDK for creating CodeBlock Studio blocks

Readme

🚀 CodeBlock Studio SDK (CLI)

The professional toolkit for building, testing, and sharing CodeBlock Studio extensions.

Built for performance. Designed for developers.


📦 Installation

Install globally to use the cbs-block command anywhere:

npm install cbs-block -g

🛠️ Feature Highlights

  • Code-First Workflow: Build complex blocks with full folder structures, supporting index.js/ts, package.json, and local node_modules.
  • Advanced Dependency Bundling: Automatically bundle popular npm packages (axios, lodash, moment) into blocks for seamless execution.
  • Integrated Unit Testing: Run logic tests instantly with cbs-block test (now supports async functions).
  • Micro-Benchmarking: Performance-test your logic with cbs-block bench (100k iteration analysis).
  • Integrated Tutorials: Every new project includes a beautiful, CSS-rich tutorial.html. View it via cbs-block tutorial.
  • VSIX-Style Packaging: Bundle your workspace into a professional .cbsext extension with one command.

🔧 Advanced Dependency Bundling

The SDK now supports automatic bundling of popular npm packages:

Supported Packages

  • axios: HTTP client for API calls
  • lodash: Utility functions for data manipulation
  • moment: Date/time formatting and parsing

Example: Weather API Block

// In your index.js
const axios = require('axios');
const _ = require('lodash');
const moment = require('moment');

async function run(inputs) {
  const response = await axios.get(`https://api.weather.com/${inputs.city}`);
  const data = _.pick(response.data, ['temp', 'description']);
  return {
    temperature: data.temp,
    description: _.capitalize(data.description),
    timestamp: moment().format('YYYY-MM-DD HH:mm:ss')
  };
}

Building with Dependencies

# Install dependencies
npm install axios lodash moment

# Build with automatic bundling
cbs-block build

# Output shows bundled packages
📦 Bundling axios...
📦 Bundling lodash utilities...
📦 Bundling moment.js...
✔ Built successfully!

🚀 Quick Start

1. Initialize a Project

Create a new workspace for your block library:

cbs-block init MyAwesomePack
cd MyAwesomePack

2. Create a Block

Generate a professional directory-based block:

cbs-block create MyBlock

3. Develop & Test

Open index.js, write your logic, and test it:

cbs-block build
cbs-block test myblock.cbsblock

4. Pack & Share

Bundle your workspace into a professional extension:

cbs-block pack

🛠️ Command Reference

| Command | Description | | --- | --- | | init [name] | Initialize a new block project workspace. | | create [name] | Scaffold a new block (supports Directory or Single-File mode). | | build [dir] | Compile a directory block into a production .cbsblock with dependency bundling. | | pack | Bundle your workspace into a professional .cbsext extension. | | test <file> | Run logic unit tests with mock data (now supports async functions). | | bench <file> | Benchmark block logic performance (iterations & μs). | | tutorial | Open the integrated developer guide in your browser. | | link | Link local blocks to your CodeBlock Studio installation. | | publish | Deploys your package to the global CBS Marketplace. | | site | Generate a themed documentation website for your project. | | doc <file> | Generate a markdown README for a specific block. | | lint | Validate block definitions for schema compliance. | | wizard | Launch the guided template-based block creator that outputs polished .cbsblock files. | | status | Check SDK version and environment health. |


🚀 Guided Block Wizard

cbs-block wizard walks through curated templates (Math Adder, HTTP Fetch, Web Alert) and writes a polished .cbsblock file with metadata, ports, logic, and color already substituted.

Included Templates

  • File System Operator – read/write/append/delete files, list directories, glob, and mkdir from one block.
  • Environment Manager – get/set/delete environment variables and load/save .env files.
  • Database Operator – mock relational queries, inserts, updates, deletes, and table lifecycle actions.
  • Network API – HTTP/WebSocket/ping/download/upload helper with consistent mock responses.
  • Weather Lookup – OpenWeatherMap-based weather fetcher that falls back to mock data without an API key.

Template Library

The wizard reads templates/library.json, where each entry defines a block skeleton with {{placeholder}} tokens, default metadata (category, color, defaultName), and variables prompts that collect template-specific values (with optional sanitization for port names).

Edit templates/library.json to add or tune starters; the wizard refreshes automatically the next time it runs.

🧩 The .cbsext Format

Professional extensions are packaged as ZIP-based .cbsext files. This allows for:

  • Rich Assets: Bundle icons, helper scripts, and HTML tutorials into one file.
  • Enterprise Metadata: Verified publisher IDs and display names.
  • Dependency Isolation: Fully bundled logic with optimized execution.

Build the future of visual coding with CodeBlock Studio.