Open-source CLI · LAN only · MIT

Bambu Lab prints
from your terminal

Slice headlessly with Bambu Studio presets, run safety preflight, send over LAN, monitor, and grab camera frames. Built for humans and AI agents.

brew install voska/tap/bambu
$ bambu slice bracket.stl --recipe functional-petg
sliced  bracket-functional-petg
  time      35m 38s   filament  13.22 g PETG (GFG00)   layers 113
  temps     bed 70 C (textured_plate)   nozzle 252 C

$ bambu print send bracket-functional-petg.gcode.3mf --slot A2 --dry-run
preflight PASS  (workshop, slot A2)
  [PASS] printer_idle       state=IDLE
  [PASS] filament_type      slot A2=PETG file=PETG
  [WARN] filament_amount    slot A2 remaining unknown; job needs 13.2 g
  [PASS] bed_type           file=textured_plate installed=textured_plate
DRY RUN nothing sent

$ bambu print send bracket-functional-petg.gcode.3mf --slot A2 --confirm
sent bracket-functional-petg.gcode.3mf on workshop: PREPARE

What it does

One static binary. No cloud account. Talks MQTT and FTPS directly to your printer.

Headless slicing that's actually right

The Bambu Studio CLI ignores preset inheritance — unflattened presets slice for a generic 200×200 bed. bambu resolves presets exactly like Bambu Studio, per model and nozzle.

Recipes + validated overrides

prototype-pla, solid-pla, functional-pla, functional-petg. --set key=value for any setting; typos are rejected; 100% infill patterns are fixed automatically. No brims unless you ask.

Safety preflight

Idle printer, no blocking HMS errors, Developer Mode, SD card, sliced for this printer, nozzle, plate, filament type and amount in the chosen AMS slot, temperatures.

Verified LAN send

FTPS upload with MD5 read-back, then the project_file command with bed leveling, flow calibration and first-layer inspection on. Requires --confirm.

Monitor with outcomes

NDJSON events, a layer-N camera snapshot, an --exec hook, and exit codes for finished / failed / paused / timeout. Informational HMS codes don't cry wolf.

Agent-ready

--json everywhere, schema introspection, stable exit codes, hints on every error, keychain credentials, and an agent skill in the repo.

Install

# macOS / Linux
brew install voska/tap/bambu

# Go (any platform)
go install github.com/voska/bambu/cmd/bambu@latest

# Binaries
https://github.com/voska/bambu/releases

Needs Bambu Studio (for slicing) and ffmpeg (for snapshots). The printer must be in LAN Only mode with Developer Mode (Settings → LAN Only) — Bambu's firmware requires it for third-party control since 2025.

Quick start

bambu printer add workshop --host 192.168.1.50 --serial 00M00A000000000 --model X1C
echo "<access code>" | bambu auth set workshop      # OS keychain, verified read-only
bambu status
bambu slice part.3mf --recipe solid-pla
bambu camera snapshot -o plate.jpg
bambu print send part-solid-pla.gcode.3mf --slot 1 --dry-run
bambu print send part-solid-pla.gcode.3mf --slot 1 --confirm
bambu monitor --snapshot-at-layer 2

For AI agents

Give your agent the skill, and keep a human on --confirm.

bambu schema --json            # full command tree
bambu status --json            # errors.blocking, AMS trays, dev_mode
bambu print send f.gcode.3mf --slot A2 --dry-run --json
bambu monitor --json           # NDJSON; exit 0 finish · 12 failed · 13 paused · 14 timeout
codemeaningcodemeaning
0success8retryable (unreachable)
2usage9gate failed (preflight / --confirm / busy)
4auth required / refused11slice failed
6forbidden (Developer Mode off)13print paused — needs a human

FAQ

Does it work without Developer Mode?

Status does. Sending, pausing and stopping need Developer Mode: since the January 2025 "Authorization Control" firmware, printers reject unsigned third-party commands. Developer Mode disconnects Bambu Cloud and the Handy app.

Which printers are supported?

Tested on an X1 Carbon. The X1, X1E, P1, A1, H2 and P2S series share the LAN protocol and should work; camera snapshots currently need an RTSPS camera (X1/H2/P2S series).

Will it change my printer settings?

No. There is no command that changes settings. Filament, plate and toggles are up to you.

Is this affiliated with Bambu Lab?

No. It's an independent MIT-licensed project that builds on public protocol documentation (OpenBambuAPI, ha-bambulab).