Slice headlessly with Bambu Studio presets, run safety preflight, send over LAN, monitor, and grab camera frames. Built for humans and AI agents.
$ 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
One static binary. No cloud account. Talks MQTT and FTPS directly to your printer.
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.
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.
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.
FTPS upload with MD5 read-back, then the project_file command with bed leveling, flow calibration and first-layer inspection on. Requires --confirm.
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.
--json everywhere, schema introspection, stable exit codes, hints on every error, keychain credentials, and an agent skill in the repo.
# 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.
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
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
| code | meaning | code | meaning |
|---|---|---|---|
| 0 | success | 8 | retryable (unreachable) |
| 2 | usage | 9 | gate failed (preflight / --confirm / busy) |
| 4 | auth required / refused | 11 | slice failed |
| 6 | forbidden (Developer Mode off) | 13 | print paused — needs a human |
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.
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).
No. There is no command that changes settings. Filament, plate and toggles are up to you.
No. It's an independent MIT-licensed project that builds on public protocol documentation (OpenBambuAPI, ha-bambulab).