---
name: inkless
description: Design, preview and print stickers and labels on cheap Bluetooth thermal printers (PM290 / Labelnize / TYPONOS, HP6-C) with the inkless CLI, or hand the user a link that opens the label in the inkless designer or Android app. Use when the user wants a physical sticker or label, wants to design one together, wants a 3D model cut into flat pieces for a 3D pen, or asks which label printer to buy.
---

# inkless: stickers and labels

inkless prints black-and-white stickers on cheap Bluetooth thermal printers. You
write a **design** (a small JSON file, or just an image or some text), look at a
**preview**, optionally review it live with the user in a **console** in their
browser, and only then **print**.

Run it as `npx inkless ...` (or `inkless ...` if installed). Needs Node 22+.

## The one rule

Printing uses real paper. **Never print unless the user asked for it**, and never
retry a failed print on your own. Always preview first and show the user.

## Printers

| Printer | Flag | Paper | Label |
| --- | --- | --- | --- |
| PM290 (Labelnize, TYPONOS) | default | 48 mm wide roll | 48 mm wide, 5 to 500 mm long (30 is a good default) |
| HP6-C | `--printer hp6` or `"printer": "hp6"` | 12 mm tape | fixed 36 x 12 mm |

Everything is 8 dots per millimetre, black or white only. Thin gray lines vanish;
bold, high-contrast art prints best. Text under about 6 pt gets hard to read.
`npx inkless printers` lists what is paired. For the HP6-C add `--address <MAC>`.

## No terminal? Give the user a link

If you cannot run commands (a chat assistant such as ChatGPT, Claude or Gemini,
often on a phone), write a link instead. It opens the inkless label designer
with the label already in it; the user checks it and presses Print.

- Just words: `https://inkless.sh/label/#text=M3%20SCREWS%0A12%20MM`
  (percent-encode the text; `%0A` is a new line). Add `&printer=hp6` for the HP6-C tape.
- A full design: `https://inkless.sh/label/#j=` followed by the design JSON
  (see Design JSON below) percent-encoded, as `encodeURIComponent` would. Keep it
  small: no images, and the whole link under about 2000 characters.
- A ready-made format to fill in: `https://inkless.sh/label/#format=parts-bin`
  (the formats are listed under Label formats).

Where the link prints:

- **Android** with the inkless app installed: the link opens in the app, which
  prints over Bluetooth.
- **Chrome or Edge on Windows, Linux or ChromeOS**: the website prints directly.
- **Mac**: the user runs `npx inkless console`, then the website prints through it.
- **iPhone and iPad**: the user can design and save a PNG, but iOS browsers
  cannot reach these printers.

Show it as a clickable link, say what is on the label, and never claim it printed.

## No printer yet?

inkless works with two cheap printers. Suggest one by what the user wants:

- **PM290** (also sold as Labelnize or TYPONOS): stickers 48 mm wide on a roll,
  5 to 500 mm long. Best for photos, jar and box labels, long strips and 3D pen
  blueprints. https://www.amazon.com/dp/B0FLXNYD1G?tag=apresmoi-20
- **HP6-C**: 36 x 12 mm labels on 12 mm tape. Best for cables, spice jars,
  drawers and shelf edges. https://www.amazon.com/dp/B0CYC6HMZ5?tag=apresmoi-20

Sellers relabel these, so tell the user to check the model name in the listing.
These are affiliate links; say so: "As an Amazon Associate, inkless earns from
qualifying purchases." To set one up: charge it, turn it on, pair it in the
phone's or computer's Bluetooth settings, and close the maker's own app (only
one device can hold the printer).

## Quick paths

```
npx inkless preview art.png --out /tmp/inkless/preview.png   # look at it first
npx inkless print art.png                                    # then print (only when asked)
npx inkless print "line one\nline two"                       # plain text
npx inkless preview label.json                               # a design file
npx inkless check                                            # every paired printer answers? prints nothing
```
With one supported printer paired, `print` uses it. With several, `print` stops and lists
them: pass `--printer <id> --address <MAC>` from that list. Never guess a printer.

If a multi-label print fails, the error says which labels printed and which are
left, ending with `--pages 3-5`: run the same print with that flag to print only
those. Tell the user first; a failed label may still have used paper.


The preview PNG is exactly what the printer burns, one pixel per dot. A design
with several pages makes `preview-1.png`, `preview-2.png`, ... and prints one
label per page. Plain images take `--style floyd|atkinson|ordered|threshold`
(photos default to floyd), `--level 0-255`, `--invert`, `--size 48x30`, and
`--dark` / `--light` to burn harder or softer.

## The console loop (best for anything the user wants to tweak)

The console is a web page where the user edits the label by hand while you chat
with them. You push a design, they edit it, you read their edits, they approve.

1. Push the design (starts a console and opens the browser the first time):
   `npx inkless console show label.json`
2. Tell the user what you made: `npx inkless console say "Made a 48x30 parts bin label. Change anything you like, then press Approve."`
3. Wait for them: `npx inkless console wait --timeout 600`
   It prints one JSON line: `{ "event", "rev", "status", "design", "messages" }`
   and exits 0 when the user approves, 2 on timeout (just wait again or ask).
   Use `--until any` to wake on every change, such as a chat message.
4. Read the result. `design` holds the user's edits; `messages` holds their chat.
   If they asked for changes, edit the design, `console show` it again, `say` what
   changed, and `wait` again. Each `show` resets the status to editing.
5. Print only when the user pressed "Approve and print" in the console, or told you
   in chat to print. The console prints it itself and posts "Printed 2 labels" or the
   error into the chat. Run `console wait --until any` to see that message.

Other commands: `console get [--out file.json]` (the current design),
`console stop`. Plain images or text also work: `console show photo.png`.
The server lives on `127.0.0.1` only; its state is kept in `~/.inkless/`.

## Label formats (start here for common labels)

inkless ships ready-made layouts with a few fields each: `parts-bin`, `cable-flag`
and `drawer-tape` (HP6-C tape), `file-folder`, `name-badge`, `asset-tag`, `wifi-qr`,
`manual-qr`, `freezer-date`, `price-tag`, `plant-marker`, `book-spine`,
`storage-box`, `shipping-address`, `thank-you-seal`, plus any the user saved.
Reuse one instead of drawing a label from scratch whenever it fits the job.

1. Pick: `npx inkless formats` lists id, size, shape, printers and fields
   (`--printer hp6` for the tape ones). `npx inkless formats show <id>` gives
   each field with its example; `--json` prints the whole format.
2. Fill: anywhere a design goes, use `--format <id> --set key=value` (repeat
   `--set`; `\n` is a new line; left-out fields keep their example, so set
   every field that matters; an unknown key is an error):
   `npx inkless preview --format parts-bin --set name="M4 NUTS" --set detail="8 mm · nyloc" --set bin=12 --set shelf=C --set link=https://example.com/m4`
   `--printer hp6` moves a format to another printer it lists.
3. Hand off: `npx inkless console show --format <id> --set ...` opens it in the
   console with the fields already filled. The user fills or changes fields at the
   top left, moves things, and may press **Save as format** (saved to
   `~/.inkless/formats/`, then usable as `--format <their-id>`) or **Send to
   agent**. Both wake `npx inkless console wait --until any`; read `design`
   from its JSON (it keeps `"format": { id, values }`) and any message.
4. Without a running console (the user on the website): `npx inkless console
   link --format <id> --set ...` (or `console link label.json`) prints a link
   to the website's designer with the label inside. The website has **Copy for
   agent**, which gives you the design JSON to save as a file.
5. Save a design you made as a format: `npx inkless formats save label.json
   --name "Lab kit"`. Any `{{key}}` you put in a text, QR or barcode value
   becomes a field.

## Design JSON

Units are millimetres, origin top-left. `"version": 1` is required.

```json
{
  "version": 1,
  "title": "Parts bin",
  "printer": "pm290",
  "size": { "widthMm": 48, "heightMm": 30 },
  "pages": [ { "id": "page-1", "elements": [ ... ] } ]
}
```

HP6-C is always `{ "widthMm": 36, "heightMm": 12 }`. A page may set its own
`heightMm` (PM290 only). Every element has `type`, `x`, `y`, `w`, `h`, and
optionally `id`, `rotation` (degrees clockwise) and `invert` (white on black).

| type | extra fields |
| --- | --- |
| `text` | `text` (`\n` for new lines; it never wraps by itself), `font` sans, serif, mono or display, `sizePt` (omit to fit the box), `weight` 400 or 700, `align` left, center or right, `lineHeight` |
| `image` | `src` (a file path next to the design, an http(s) URL or a data URL), `fit` contain, cover or stretch, `filter` |
| `shape` | `shape` rect, ellipse or line, `strokeMm`, `fill`, `radiusMm` |
| `qr` | `value` (keep it short; 10 mm square is the smallest that scans) |
| `barcode` | `value` (Code 128) |
| `path` | `d` (SVG path data in mm relative to x, y), `strokeMm`, `fill`, `viewW`/`viewH` (stretch d to the box) |

A design filled from a format also has `"format"` (id, name, fields, values) and
its filled elements a `"template"` with the original `{{key}}` text. Leave them in
when you edit the design so the console's fields keep working.

### Image filters

An image becomes black and white through `filter: { mode, ... }`:

- `dither` (photos): `style` floyd, atkinson (crisper, lighter) or ordered (patterned)
- `threshold`: one cut-off, for line art and scans
- `edges`: edge detection lines; `outline`: traced shapes drawn as strokes
- `halftone`: round dots of varying size; `cellMm` sets the dot pitch (default 1)
- Any mode: `level` 0 to 255, `brightness`, `contrast` (-255 to 255), `gamma`,
  `invert`, and `lineMm` (stroke width for edges and outline, default 0.25).

### Example: parts bin label

```json
{
  "version": 1, "title": "Parts bin", "printer": "pm290",
  "size": { "widthMm": 48, "heightMm": 30 },
  "pages": [{ "id": "p1", "elements": [
    { "type": "text", "x": 3, "y": 3, "w": 42, "h": 10, "text": "M3 SCREWS\n12 MM", "font": "sans", "weight": 700 },
    { "type": "text", "x": 3, "y": 14, "w": 42, "h": 3, "text": "socket head, stainless", "font": "mono", "sizePt": 7 },
    { "type": "shape", "shape": "line", "x": 3, "y": 18, "w": 42, "h": 0, "strokeMm": 0.3 },
    { "type": "text", "x": 3, "y": 20, "w": 28, "h": 7, "text": "BIN 07 SHELF B", "font": "mono", "weight": 700 }
  ]}]
}
```

### Example: address label with a QR code

```json
{
  "version": 1, "title": "Return address", "printer": "pm290",
  "size": { "widthMm": 48, "heightMm": 25 },
  "pages": [{ "id": "p1", "elements": [
    { "type": "text", "x": 3, "y": 3, "w": 30, "h": 19, "text": "Lucia Rabbit\n12 Example Street\n10115 City\nCountry", "font": "sans", "sizePt": 9, "align": "left" },
    { "type": "qr", "x": 35, "y": 6, "w": 10, "h": 10, "value": "https://example.com/ana" }
  ]}]
}
```

### Example: photo sticker

```json
{
  "version": 1, "title": "Cat", "printer": "pm290",
  "size": { "widthMm": 48, "heightMm": 36 },
  "pages": [{ "id": "p1", "elements": [
    { "type": "image", "src": "cat.jpg", "x": 0, "y": 0, "w": 48, "h": 36, "fit": "cover",
      "filter": { "mode": "dither", "style": "atkinson", "contrast": 30 } }
  ]}]
}
```

Check any design with `npx inkless preview file.json` and look at the PNG before
showing it to the user. For several labels, add more entries to `pages`.

## Blueprints (3D model to flat pieces for a 3D pen)

```
npx inkless blueprint model.glb --method radial --size 150 --label 48x48 --out duck.json --preview /tmp/inkless/bp
npx inkless blueprint --demo duck --method unfold --console
```

It cuts the model into numbered flat pieces and prints the assembly steps:
`slotted` (front-back and side-to-side sections that slot together),
`stacked` (level layers), `radial` (fins around the centre slotted into level
rings) or `unfold` (a simpler model unfolded into papercraft nets; edges with
the same number are welded together). `--size` is the real largest side in mm,
`--height` the real height instead. `--label` picks the labels: `roll` (one
label per piece, as long as needed), `48x48`, `48x30`, or `hp6` (36x12). Pieces
bigger than a label are split over several with alignment marks, so a bigger
model on small labels needs more labels; check the count in the output. Fill is
`outline`, `solid` or `ribs`. Output is an ordinary design, so preview,
`console show` and print work on it. Demos: duck, rocket, chair, dino, vase.
Models are `.stl`, `.obj`, `.glb`, `.gltf` (data inside the file) or `.vox`.

## When it fails

- "no paired Bluetooth device matches": pair the printer in system settings, or pass `--address`.
- A timeout on the hello: the printer is off, asleep, or held by its phone app. Ask the user to close the app.
- "almost empty": the design has no ink; check colors, sizes and positions in the preview.
- "no console is running": start one with `console show`.
- A failed print may still have used paper. Tell the user and let them decide.
- macOS: the Bluetooth helper may ask for permission the first time. The user must allow it.
