Documentation

Print generated content to thermal receipt printers.

Slipbridge is a local Rust CLI for agents, scripts, and the terminal. It takes Markdown, text, images, and JSON templates, then sends ESC/POS to a receipt printer. The public repository is not up yet. This page describes the working CLI.

Quickstart

From a local checkout, install with Cargo, check the machine, find a printer, and print a Markdown file. Do not install the crates.io or npm packages. Those are old snapshots.

cargo install --path . --force

slipbridge doctor --json
slipbridge printers list --json
slipbridge print ./ticket.md \
  --printer tcp://epson-m30:9100 \
  --paper 80mm \
  --json

Use --printer with a discovered printer id, a tcp:// endpoint, or a usb:// selector.

Connect printers

Start with discovery, then inspect the selected printer when you need the resolved driver and capabilities. The hardware path we have actually used is an Epson TM-m30II-H.

Receipt printers over TCP

tcp://epson-m30:9100

Raw socket endpoints used by many ESC/POS receipt printers.

USB receipt printers

usb://04b8:0e15

USB vendor and product id, with optional bus and address.

Discovery

slipbridge printers list

Lists USB and network printers the CLI can see from this machine.

slipbridge printers list --json
slipbridge printers inspect \
  --printer tcp://epson-m30:9100 \
  --json
slipbridge printers test \
  --printer tcp://epson-m30:9100 \
  --json

Automation

Add --json when another process needs to read results. Use the structured fields instead of parsing human output.

slipbridge print ./ticket.md \
  --printer tcp://epson-m30:9100 \
  --paper 80mm \
  --json

ok

Whether the command completed successfully.

printer.id

The resolved printer target used for the command.

driver.resolved

The selected driver, such as escpos.

Queueing

Queueing is useful when more than one process may print to the same device. Slipbridge writes a job to disk, then a worker sends queued jobs while holding a per-printer lock.

slipbridge print ./ticket.md \
  --printer tcp://epson-m30:9100 \
  --paper 80mm \
  --enqueue \
  --json

slipbridge jobs list --json
slipbridge jobs inspect --job <job-id> --json
slipbridge jobs cancel --job <job-id> --json
slipbridge jobs run --once --json

Queue state lives in the platform data directory by default. Set SLIPBRIDGE_STATE_DIR when you want an isolated queue for tests or development.

Printer defaults

Defaults keep repeated commands short. They are stored locally in printers.toml, so a script or agent can use the same settings as a human operator.

slipbridge printers defaults set \
  --printer tcp://epson-m30:9100 \
  --paper 80mm

slipbridge printers defaults show \
  --printer tcp://epson-m30:9100 \
  --json

Troubleshooting

Start with diagnostics

Run slipbridge doctor --json to check local USB access and the rendering pipeline.

Discovery shows the wrong printer

Use an explicit tcp:// or usb:// selector instead of relying on a display name.

The print is the wrong width

Set --paper 80mm or --paper 58mm, then use slipbridge render to inspect the PNG before printing.