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

@naseej/blox

v1.7.0

Published

blox cli

Downloads

158

Readme

BLOX CLI

BLOX CLI helps you bootstrap, manage, update, and contribute BLOX-based apps and blocks.

Content

Installation

Install globally with npm:

npm install -g patch-package @naseej/blox

Notes:

  • Ensure npm is available in your PATH.
  • Use minimal mode (-m, --minimal) if spinners interfere with interactive input.

Quick Start

Start with the core commands:

blox --help
blox init
blox add
blox update

Commands

Other available command:

  • blox detach: detach to base

init

Initialize a new app.

Usage:

blox init

Important options:

  • -n, --name: app name
  • -t, --template: template to use
  • --branch: branch name to use

add

Add one or more blocks to an app.

Usage:

blox add [blocks]

Example:

blox add components applet-template

Important options:

  • --branch: branch name (applies to all selected blocks)
  • --dest: destination directory (applies to all selected blocks)

Important notes:

  • If blocks are omitted, BLOX prompts with a multiselect from available blocks.
  • Blocks are processed sequentially in the order provided.

remove

Remove one or more installed blocks.

Usage:

blox remove [blocks]

Example:

blox remove components applet-template

Important options:

  • -f, --force: remove even when other blocks depend on them

Important notes:

  • If blocks are omitted, BLOX prompts with a multiselect from installed blocks.
  • You can pass registry keys or installed folder names under blocks/.
  • Only directories under blocks/ containing a valid .blox file are treated as removable blocks.
  • Blocks are processed sequentially in the order provided.

update

Update the app, bases, or specific blocks.

Usage:

blox update

Important options:

  • -s, --scope: app, bases, block, or all (default: all)
  • -b, --block: block to update (valid only when --scope block)

Important notes:

  • You may need to resolve merge conflicts.
  • If a template, base, or block is missing from the registry, BLOX prompts you to continue or stop.

contribute

Contribute app changes back to template/base/block repositories.

Usage:

blox contribute

Important options:

  • --existing: add changes to an existing contribution branch
  • --title <title>: contribution title
  • --description <text>: contribution description
  • --commits <commits>: comma-separated commit hashes from the app repo
  • --force: bypass safety pre-flight checks
  • --type <type>: target type (template, base, or block)
  • --name <name>: target name (used with --type)

conf

Set global BLOX configuration.

Usage:

blox conf

Important options:

  • -r, --registries: remote registry URLs

upgrade

Upgrade BLOX CLI to the latest version.

Usage:

blox upgrade

migrate

Migrate BLOX schema.

Usage:

blox migrate

skills

Install and manage BLOX CLI skills (wraps npx skills).

Usage:

blox skills <command> [options]

Important notes:

  • BLOX clones the BLOX CLI skills repository, runs npx skills with your arguments, then cleans up.
  • No repository URL is required.

Features

Ignore Policy

Ignore rules tell BLOX which files or paths to skip.

Template-level ignore:

  • Defined in definition.ignore.
  • Comes from template/block maintainers.

App-level ignore:

  • Defined in project.ignore.
  • Local to your app and controlled by you.

Example root .blox configuration:

{
    "project": {
        "ignore": ["applet-core", "dist/**", "*.generated.ts"]
    }
}

How ignore sources are combined:

  • blox update combines patterns from:
    • remote template ignore (definition.ignore)
    • local project ignore (project.ignore in local .blox)
    • local .gitignore
    • command option --ignore (when provided)
  • blox contribute also respects local project.ignore.
  • Local project.ignore is project-owned and is not replaced by remote template ignore during update.

Lifecycle Hooks

Lifecycle hooks are optional shell commands defined in .blox files.

Where hooks can be defined:

  • Root template: .blox at app root
  • Each block: blocks/<name>/.blox

Supported hooks:

  • init
  • add
  • update
  • remove

When hooks run:

| Hook | Template (root .blox) | Block (blocks/.../.blox) | | -------- | ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- | | init | Runs after blox init finishes creating the app. | Runs after a new block is cloned and initialized, before its dependencies are added. | | add | Runs once per blox add command, only if at least one new block was added (including dependencies). | Runs when the block is added, right after that new block's init hook, still before dependencies. | | update | Runs after blox update when the root template, a base, or a block remote actually advanced (new commit applied). | Runs only when that block's remote actually advanced (new commit). Skipped if already up to date. | | remove | Runs after blox remove actually removed a block in that run. | Runs before the block is deleted, while its files still exist. |

Skills

Installing Skills

Use blox skills to run the Skills CLI against the BLOX CLI skills repository.

Behavior:

  • BLOX executes npx skills with all arguments passed after skills.
  • BLOX handles cloning and cleanup automatically.

CLI Compatibility

Skills declare a cliCompatibility range in skill.json (npm semver).

For blox skills add and blox skills update:

  • BLOX checks whether your installed CLI version satisfies the required range.
  • If not, BLOX shows the required range and your current version.
  • You can choose to continue or exit and run blox upgrade first.

Common Commands

blox skills add
blox skills add -a cursor -y
blox skills add -a cursor -a claude-code -y
blox skills list

Compatibility

Skills are not tied to a specific editor or product. They work across tools that support skill-style instructions, and metadata marks agents as generic for broad use.

Create new template

Create a new template by starting from an existing one, updating its metadata, then publishing it.

1 - Initialize from an existing template

Create a new project using the template you want to build on.

Example:

blox init -n my-template -t existing-template

2 - Update .blox configuration

Edit your project's .blox file to describe the new template.

  • Set definition.name to your new template name.
  • Keep the original template in the bases list so you can continue receiving updates from it.

3 - Publish and register the template

  • Push the template project to a remote repository.
  • Add that repository to a BLOX registry (Or any custom registry) so BLOX CLI can discover and use your template.