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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@fire-shield/cli

v2.2.1

Published

Fire Shield RBAC CLI tool for validation and permission management

Downloads

197

Readme

o# @fire-shield/cli

Command-line interface for Fire Shield RBAC.

Installation

# npm
npm install -g @fire-shield/cli

# yarn
yarn global add @fire-shield/cli

# pnpm
pnpm add -g @fire-shield/cli

Usage

Validate Configuration

Validate an RBAC configuration file:

fire-shield validate ./fire-shield.config.json

With options:

fire-shield validate ./config.json --strict --verbose

Options:

  • -s, --strict - Enable strict mode validation
  • -v, --verbose - Show detailed validation output

Check Permission

Check if a user has a specific permission:

fire-shield check ./config.json \
  --user john123 \
  --roles admin editor \
  --permission user:write

Options:

  • -u, --user <userId> - User ID to check
  • -r, --roles <roles...> - User roles (space-separated)
  • -p, --permission <permission> - Permission to check
  • -v, --verbose - Show detailed check output

CLI Information

Display CLI information:

fire-shield info

Initialize Configuration (Coming Soon)

Initialize a new Fire Shield configuration:

fire-shield init

Examples

Basic Validation

fire-shield validate ./rbac-config.json

Output:

🔍 Validating RBAC configuration...

✓ Configuration is valid

  Validated in 12ms

Verbose Validation

fire-shield validate ./rbac-config.json --verbose

Output:

🔍 Validating RBAC configuration...

  File: /path/to/rbac-config.json
  Strict mode: disabled

✓ Configuration is valid

  Configuration details:
  • Name: my-rbac
  • Version: 1.0.0
  • Permissions: 10
  • Roles: 4

  Permissions:
    • user:read [bit: 1]
    • user:write [bit: 2]
    • user:delete [bit: 4]
    ...

  Roles:
    • viewer [level: 1]
      Permissions: user:read, post:read
    • editor [level: 5]
      Permissions: user:read, user:write, post:read, post:write
    ...

  Validated in 15ms

Permission Check

fire-shield check ./config.json \
  --user alice \
  --roles editor \
  --permission user:write \
  --verbose

Output:

🔍 Checking permission...

  Config file: /path/to/config.json
  User: alice
  Roles: editor
  Permission: user:write

✓ User has permission "user:write"

  User: alice
  Roles: editor
  Permission: user:write
  Result: ALLOWED
  Granted by: editor

Configuration File Format

Fire Shield CLI expects a JSON configuration file with this structure:

{
  "name": "my-rbac",
  "version": "1.0.0",
  "permissions": [
    { "name": "user:read", "bit": 1 },
    { "name": "user:write", "bit": 2 },
    { "name": "user:delete", "bit": 4 }
  ],
  "roles": [
    {
      "name": "viewer",
      "permissions": ["user:read"],
      "level": 1
    },
    {
      "name": "editor",
      "permissions": ["user:read", "user:write"],
      "level": 5
    }
  ]
}

Exit Codes

  • 0 - Success
  • 1 - Validation/check failed or error occurred

License

DIB © khapu2906