This documentation covers the TypeScript surface for @ghosttypes/ff-api.
This repository and flashforge-python-api share the same protocol/domain baseline, but they do not promise strict 1:1 public API parity. The TypeScript library uses its own idiomatic public surface.
Read parity.md first if you are comparing both libraries or maintaining downstream integrations across both languages.
- Getting Started
- Architecture Overview
- Client Documentation
- Models & Interfaces
- Modules & Namespaces
- Protocols
- Error Handling
- Advanced Topics
- Discovery Migration
npm install @ghosttypes/ff-apiimport { PrinterDiscovery } from '@ghosttypes/ff-api';
const discovery = new PrinterDiscovery();
const printers = await discovery.discover();import { FiveMClient } from '@ghosttypes/ff-api';
const client = new FiveMClient('192.168.1.100', 'SERIAL123', 'CHECKCODE123');
if (await client.initialize()) {
await client.initControl();
}import { FlashForgeClient } from '@ghosttypes/ff-api';
const client = new FlashForgeClient('192.168.1.100');
await client.initControl();The library is built around three main ideas:
FiveMClientfor modern HTTP-capable printers such as Adventurer 5M, 5M Pro, and AD5XFlashForgeClient/FlashForgeTcpClientfor legacy TCP and low-level G-code operationsPrinterDiscoveryfor typed UDP discovery across modern and legacy models
For method-level documentation, continue to clients.md and modules.md.