CLI for controlling BambuLab printers directly over MQTT/FTPS/camera.
go build -o bambu-cli ./cmd/bambu-clibrew install tobiasbischoff/tap/bambu-cli# Create a profile
bambu-cli config set --printer lab \
--ip 192.168.1.200 \
--serial AC12309BH109 \
--access-code-file ~/.config/bambu/lab.code \
--default
# Status
bambu-cli status
# Start a print
bambu-cli print start ./benchy.3mf --plate 1- User config:
~/.config/bambu/config.json - Project config:
./.bambu.json - Precedence: flags > env > project config > user config
Get the printer access code from the device or Bambu Studio, then store it in a file:
mkdir -p ~/.config/bambu
printf "%s" "YOUR_ACCESS_CODE" > ~/.config/bambu/lab.code
chmod 600 ~/.config/bambu/lab.codeIn Bambu Studio on macOS: open the Device view for your printer, open its settings, and look for "LAN Access" or "Access Code" (often shown alongside IP/serial details).
BAMBU_PROFILEBAMBU_IPBAMBU_SERIALBAMBU_ACCESS_CODE_FILEBAMBU_TIMEOUTBAMBU_NO_CAMERABAMBU_MQTT_PORTBAMBU_FTP_PORTBAMBU_CAMERA_PORT
- Printer must be reachable on ports 8883 (MQTT), 990 (FTPS), 6000 (camera).
- Avoid passing access codes via flags; use
--access-code-fileor--access-code-stdin.