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

mcfe-cli

v1.2.8

Published

CLI tool for interacting with MCE API

Downloads

25

Readme

MCFE CLI

The MCFE CLI (mcfe) is a command-line tool for managing MCFE projects, modules, versions, and file uploads via a REST API. It interacts with a backend service to perform operations like creating projects, listing modules, activating versions, and uploading files.

Table of Contents

Installation

Prerequisites

  • Node.js: Version 14 or higher.
  • npm: Included with Node.js.

Steps

  1. Clone the repository:
    git clone <repository-url>
    cd mcfe-cli
  2. Install dependencies:
    npm install
  3. Link the CLI globally (optional, for global access):
    npm link

Usage

Run the CLI with:

npx mcfe-cli [command] [options]

Global Options

  • --base-url <url>: Backend service URL (default: http://localhost:3000).
  • --insecure: Skip SSL certificate verification (useful for development).
  • --help: Display help for commands.
  • --version: Show the CLI version (1.0.0).

Example:

npx mcfe-cli --insecure --base-url https://mcfe.node.local project list

Upload Version:

npx mcfe-cli --insecure --base-url https://mcfe.node.local version push 7 "D:\Dinocollabs\mcfe-provider\layout-react-js\dist" --link-commit <url>

Commands

Project Commands

Manage projects in the MCFE system.

  • Create a project:

    npx mcfe-cli project create <name>

    Example:

    npx mcfe-cli project create my-project

    Output:

    {
      "id": 1,
      "name": "my-project",
      "createdAt": "2025-05-16T09:17:00Z"
    }
  • List projects:

    npx mcfe-cli project list [--filter <json>]

    Example:

    npx mcfe-cli project list --filter '{"status":"active"}'

    Output:

    [
      {
        "id": 1,
        "name": "my-project",
        "status": "active"
      }
    ]
  • Get a project:

    npx mcfe-cli project get <id>

    Example:

    npx mcfe-cli project get 1

    Output:

    {
      "id": 1,
      "name": "my-project"
    }

Module Commands

Manage modules within projects.

  • Create a module:

    npx mcfe-cli module create <projectId> <name>

    Example:

    npx mcfe-cli module create 1 my-module

    Output:

    {
      "id": 101,
      "projectId": 1,
      "name": "my-module"
    }
  • List modules:

    npx mcfe-cli module list <projectId>

    Example:

    npx mcfe-cli module list 1

    Output:

    [
      {
        "id": 101,
        "name": "my-module"
      }
    ]

Version Commands

Manage versions of modules.

  • Create a version:

    npx mcfe-cli version create <moduleId> <name>

    Example:

    npx mcfe-cli version create 101 v1.0

    Output:

    {
      "id": 201,
      "moduleId": 101,
      "name": "v1.0"
    }
  • Activate a version:

    npx mcfe-cli version activate <versionId>

    Example:

    npx mcfe-cli version activate 201

    Output:

    {
      "id": 201,
      "moduleId": 101,
      "name": "v1.0",
      "active": true
    }
  • List versions:

    npx mcfe-cli version list <moduleId>

    Example:

    npx mcfe-cli version list 101

    Output:

    [
      {
        "id": 201,
        "name": "v1.0"
      }
    ]

File Commands

Upload files to the server.

  • Upload a file:
    npx mcfe-cli file upload <filePath>
    Example:
    npx mcfe-cli file upload ./test-file.zip
    Output:
    {
      "id": "123",
      "filename": "test-file.zip",
      "url": "http://localhost:3000/uploads/test-file.zip",
      "uploadedAt": "2025-05-16T09:18:00Z"
    }
    Notes:
    • File size limit: 100MB.
    • The file must exist at the specified path.

Configuration

Environment Variables

  • MCFE_BASE_URL: Override the default --base-url.
  • MCFE_INSECURE: Set to true to skip SSL verification (equivalent to --insecure).

Example:

export MCFE_BASE_URL=https://mcfe.node.local
mcfe project list

Development

Project Structure

  • index.ts: Main CLI entry point, defines commands using commander.
  • api-client.ts: MceApiClient class for API interactions.
  • package.json: Defines dependencies and scripts.

Dependencies

  • commander: CLI framework.
  • axios: HTTP client for API requests.
  • form-data: For multipart/form-data file uploads.

Building

The project uses TypeScript. Compile it with:

npm run build

Testing

Add tests using a framework like jest. Example test setup:

npm install --save-dev jest ts-jest @types/jest

Run tests:

npm test

Extending the CLI

To add new commands:

  1. Update index.ts with new commander commands.
  2. Extend MceApiClient with corresponding API methods.
  3. Align with the OpenAPI spec (openapi.json).

Contributing

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/new-feature).
  3. Commit changes (git commit -m "Add new feature").
  4. Push to the branch (git push origin feature/new-feature).
  5. Open a pull request.

License

MIT License. See LICENSE for details.


Generated on May 16, 2025