New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@ghosttypes/ff-api

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ghosttypes/ff-api

FlashForge 3D Printer API for Node.js

latest
Source
npmnpm
Version
2.1.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

FlashForge TypeScript API

TypeScript and Node.js library for controlling FlashForge 3D printers over the modern HTTP API and the legacy TCP protocol.

Supported Printers

PrinterSupport
Adventurer 5MFull
Adventurer 5M ProFull
AD5XFull
Adventurer 3 / 4Dedicated TCP clients

Installation

npm install @ghosttypes/ff-api

Quick Start

Modern Printers

Use FiveMClient for Adventurer 5M, 5M Pro, and AD5X.

import { FiveMClient } from '@ghosttypes/ff-api';

async function main() {
  const client = new FiveMClient('192.168.1.100', 'SERIAL_NUMBER', 'CHECK_CODE');

  if (!(await client.initialize())) {
    return;
  }

  await client.initControl();

  console.log(`Printer: ${client.printerName}`);
  console.log(`Firmware: ${client.firmwareVersion}`);

  const status = await client.info.get();
  console.log(`State: ${status?.Status}`);

  await client.control.homeAxes();
  await client.dispose();
}

main();

Legacy TCP Printers

Use FlashForgeA4Client or FlashForgeA3Client for documented legacy TCP control. FlashForgeClient remains available as a generic fallback.

import { FlashForgeA4Client } from '@ghosttypes/ff-api';

async function main() {
  const client = new FlashForgeA4Client('192.168.1.101');

  if (await client.initControl()) {
    const info = await client.getPrinterInfo();
    console.log(`${info?.machineType} (${info?.variant})`);
  }

  await client.dispose();
}

main();

Main Entry Points

  • FiveMClient: modern HTTP + TCP client for 5M, 5M Pro, and AD5X
  • PrinterDiscovery: UDP discovery for supported FlashForge printers
  • FlashForgeA4Client: documented TCP client for Adventurer 4 Lite / Pro printers
  • FlashForgeA3Client: documented TCP client for Adventurer 3 printers
  • FlashForgeClient: generic legacy TCP fallback for direct G-code workflows

Capabilities

  • printer discovery
  • printer status and machine information
  • job control
  • file listing, uploads, and thumbnails
  • temperature and motion control
  • LED, camera, and filtration control where supported
  • AD5X-specific job and material-station support

Documentation

  • docs/README.md
  • docs/clients.md
  • docs/modules.md
  • docs/protocols.md

Keywords

flashforge

FAQs

Package last updated on 27 Sep 2026

Related posts