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

open-fcm

v0.1.0

Published

Parser and encoder for Brother ScanNCut FCM/VCM files

Readme

open-fcm

TypeScript parser and encoder for Brother ScanNCut FCM/VCM files.

What's an FCM file?

FCM (and VCM) files are the native format for Brother ScanNCut cutting machines. They contain vector cut paths, thumbnails, and metadata. VCM files are specifically for print-and-cut workflows with registration marks.

Quick Start

import { readFcmFile, writeFcmFile } from "open-fcm";

// Parse an FCM file
const data = new Uint8Array(/* file bytes */);
const fcm = readFcmFile(data);

console.log(fcm.file_header.variant);  // "FCM" or "VCM"
console.log(fcm.cut_data.file_type);   // "Cut" or "PrintAndCut"
console.log(fcm.piece_table.pieces.length);

// Modify and re-encode
const output = writeFcmFile(fcm);

SVG Path Conversion

import { SvgPathParser, PathTool } from "open-fcm";

const parser = new SvgPathParser({ dpi: 72 });
const shapes = parser.parse("M 0,0 L 100,0 L 100,100 L 0,100 Z");

// Use shapes to build FCM paths
const path = {
  tool: PathTool.TOOL_CUT,
  shape: shapes[0],
  rhinestone_diameter: null,
  rhinestones: [],
};

Registration Marks (Print-and-Cut)

import { PageSizes, getFcmAlignmentMarks, generateRegistrationMarksSvg } from "open-fcm";

// Get mark positions for FCM alignment data
const marks = getFcmAlignmentMarks(PageSizes.LETTER);

// Generate SVG with registration marks for printing
const svg = generateRegistrationMarksSvg(PageSizes.LETTER);

Thumbnail Generation

import { generateThumbnail, generateBlankThumbnail } from "open-fcm";

// Generate thumbnail from paths (prevents machine reboots from invalid BMPs)
const thumbnail = generateThumbnail(paths);

// Or a blank white thumbnail
const blank = generateBlankThumbnail();

API Overview

| Module | Purpose | |--------|---------| | readFcmFile / writeFcmFile | Parse and encode complete FCM files | | SvgPathParser | Convert SVG path d attributes to FCM format | | generateThumbnail | Create valid 88×88 monochrome BMP thumbnails | | getFcmAlignmentMarks | Registration mark positions for print-and-cut | | generateRegistrationMarksSvg | SVG output with Brother-compatible marks |

Attribution

This is a TypeScript port inspired by the original Rust library:

  • fcmlib by justjanne — MPL 2.0 licensed, comprehensive FCM parser with examples
  • fcmlib fork — Adds SVG path parsing, registration marks, and a sticker sheet example for print-and-cut workflows

The original Rust implementation is more mature and battle-tested.

Disclaimer

"Brother" and "ScanNCut" are trademarks of Brother Industries, Ltd. This project is not affiliated with, endorsed by, or sponsored by Brother. The FCM/VCM file format was reverse-engineered for interoperability purposes.

See Also

  • Brother ScanNCut — The cutting machines that use FCM files
  • scripts/make-sticker-sheet.ts — Example script for generating print-and-cut files