bambu-labs
earthtojake/text-to-cad
Dry-run, upload, and start Bambu Lab print jobs locally via validated G-code and LAN FTPS/MQTT.
What is bambu-labs?
This skill manages local-network Bambu Lab 3D printer handoffs after G-code validation. Use it to safely upload sliced models and initiate prints with built-in safeguards: dry-run by default, explicit confirmation flags for live operations, and physical-check reminders before starting.
- Dry-run print payloads before executing live printer commands
- Upload validated G-code via FTPS to the printer's local network
- Start prints using template-project or plain G-code handoff modes
- Pause and cancel running prints with confirmation requirements
- Fetch printer serial, status, and error state over LAN
- Clear printer errors and manage MQTT publish with configurable QoS
How to install bambu-labs
npx skills add https://github.com/earthtojake/text-to-cad --skill bambu-labs- A Bambu Lab printer on the local network with LAN Only and Developer Mode enabled
- Printer IP address and LAN access code from the printer's touchscreen settings
- Plain `.gcode` file already generated and validated (this skill does not slice)
- OrcaSlicer or compatible slicer installed to generate G-code if needed
How to use bambu-labs
- 1.Generate and validate plain G-code using a slicer like OrcaSlicer
- 2.Configure your printer by running `config set` with IP, access code, and model, or edit `bambu-printers.json` directly
- 3.Read printer status with `status --printer <name> --push-all --wait-seconds 10` to confirm connectivity and state
- 4.Dry-run the handoff with `send --printer <name> --gcode <file> --handoff template-project --action upload-start` (no `--execute` flag)
- 5.Review the dry-run JSON payload and printer status, then execute with `--execute --confirm-start-print` only if the user explicitly asked to print
Use cases
- Slice a model with OrcaSlicer, validate the G-code, then upload and start a print on a local Bambu Lab A1/A1 Mini
- Pause a running print mid-job and confirm the printer state changed
- Upload a prepared G-code project without starting, then review before initiating the print later
- Debug MQTT handoff failures by inspecting dry-run payloads and printer status reports
- Onboard a new Bambu Lab printer by configuring its IP and LAN access code, then validating connectivity
- 3D printer operators using Bambu Lab A1, A1 Mini, P1S, or compatible models
- Developers integrating local printer control into CAD-to-print workflows
- Users who want safe, confirmable print initiation with dry-run inspection
bambu-labs FAQ
OrcaSlicer is recommended to generate G-code. If not installed, the skill will suggest installing it via `brew install --cask orcaslicer` on macOS, but you can also use any compatible slicer that outputs plain `.gcode`.
Template-project wraps your G-code in a known-good `.gcode.3mf` project file and uploads to FTPS root; it is the validated path for A1 Mini. Plain mode uploads raw `.gcode` to cache; use it only for diagnostics or printers where template-project is not supported.
Dry-run shows you the exact MQTT payload and file operations before they touch the printer, letting you inspect and confirm intent. Live operations require explicit `--execute` and `--confirm-start-print` flags to prevent accidental prints.
Use `pause --printer <name>` or `cancel --printer <name>` to dry-run the control request. Add `--execute` and `--confirm-cancel-print` (for cancel) to send it live. Always read printer status afterward to confirm the state changed.
Clear the build plate, verify correct plate/filament/nozzle, ensure safe surroundings, and stay nearby. The skill will remind you of these checks and require physical confirmation when intent is unclear.
Full instructions (SKILL.md)
Source of truth, from earthtojake/text-to-cad.
name: bambu-labs
description: Dry-run, upload, and cautiously initiate local Bambu Lab print jobs from validated plain .gcode, using Bambu LAN FTPS/MQTT handoffs.
Bambu Labs
Provenance: maintained in earthtojake/text-to-cad. Use the installed local skill files as the runtime source of truth; the repository link is only for provenance and release review.
Use this skill for local-network Bambu Lab print handoffs after a plain .gcode
file already exists and has been validated. This skill does not slice models.
Safety Rules
- Default to dry-run plans. Real printer traffic requires
--execute. - Never start a print without
--execute --confirm-start-print. - Pause and cancel controls are live printer requests; default to dry-run plans.
Canceling a print requires
--execute --confirm-cancel-print. - Treat an explicit user request to print or start a specific job as live-start authorization; do not pause for a second confirmation solely for physical checks. Still validate the G-code, inspect the dry-run payload, read printer status, prefer upload-only before upload-start, state the physical checks, and stop if validation/status/intent is unsafe or ambiguous.
- Do not ask for the printer serial by default; fetch it from the printer TLS certificate with
serialor letsendcache it. - Prefer workspace-root
bambu-printers.jsonover repeating access codes in commands. The file is local config and should be ignored by Git. - Before a live start, state the physical checks: clear build plate, correct plate/filament/nozzle, safe surroundings, and operator nearby.
- Publishing MQTT is only a start request. Confirm acceptance with printer status/UI and physical observation.
Workflow
- Generate and validate plain G-code with
$gcode. If no slicer is installed, install OrcaSlicer and retry; do not treat the missing slicer as a blocker. On macOS, preferbrew install --cask orcaslicer. - Configure the printer. The user can either give the IP/access code in the thread and let the agent write JSON, or edit
bambu-printers.jsondirectly. For a new printer setup or onboarding request, readreferences/new-printer-onboarding.mdfirst. Walk the user through the model-specific touchscreen steps to find the IP and LAN access code, and make Enable LAN Only plus Enable Developer Mode explicit before running local start workflows.
python scripts/bambu_lan_print.py config set \
--printer a1-mini \
--host 192.168.1.34 \
--access-code 12345678 \
--model a1-mini \
--fetch-serial
Manual JSON shape:
{
"printers": {
"a1-mini": {
"host": "192.168.1.34",
"access_code": "12345678",
"model": "a1-mini"
}
}
}
On A1/A1 Mini, find the IP and LAN access code on the printer touchscreen under network/LAN settings. Enable LAN Only and Developer Mode when offered, then power-cycle before retrying local start commands.
- Read status before live work:
python scripts/bambu_lan_print.py status \
--printer a1-mini \
--push-all \
--wait-seconds 10
- Dry-run the exact handoff, inspect the JSON payload, then run upload-only.
Only after upload succeeds should you run upload-start. If the user explicitly
asked to print or start the job, proceed to
upload-start --execute --confirm-start-printafter the validation, status, and upload checks pass. If the user only asked to prepare, slice, upload, or review, stop before the start request.
Handoff Modes
--handoff template-project is the A1 Mini path validated against a real
printer over LAN. It starts from validated plain .gcode, copies a known-good
same-printer .gcode.3mf template, replaces Metadata/plate_N.gcode, writes
the plate MD5, uploads the project to the FTPS root, and publishes
print.project_file with url: ftp:///<name>.gcode.3mf.
python scripts/bambu_lan_print.py send \
--printer a1-mini \
--gcode /tmp/job.gcode \
--handoff template-project \
--template-project /path/to/same-printer-template.gcode.3mf \
--action upload-start
Execute after review when the user explicitly asked to print or start, or after physical confirmation when intent is unclear:
python scripts/bambu_lan_print.py send \
--printer a1-mini \
--gcode /tmp/job.gcode \
--handoff template-project \
--template-project /path/to/same-printer-template.gcode.3mf \
--action upload-start \
--execute \
--confirm-start-print
--handoff plain uploads cache/<name>.gcode and publishes
print.gcode_file. Keep it for diagnostics or printers/firmware where this is
known to work. On the tested A1 Mini, direct plain G-code was uploaded
successfully but gcode_file failed or was ignored, so do not use it as the
A1 Mini live-start path.
--handoff bambox-project packages plain .gcode with bambox, uploads the
.gcode.3mf project to FTPS root, and publishes print.project_file.
Currently enabled only for p1s-0.4 with PLA, ASA, or PETG-CF.
Known but disabled until validated profiles exist: a1-mini-0.4, a1-0.4,
x1c-0.4, and p1p-0.4.
Common Debugging Commands
Fetch/cache serial:
python scripts/bambu_lan_print.py serial \
--printer a1-mini \
--json
Clear a stale printer error after fixing the underlying cause:
python scripts/bambu_lan_print.py clear-error \
--printer a1-mini \
--execute
Use --mqtt-qos 1 --wait-after-publish 10 on send when debugging whether the
printer acknowledged the MQTT publish and what status it reported immediately
afterward.
Print Controls
For a running print, use dedicated print-control commands rather than ad hoc MQTT snippets. These commands publish only a control request; they do not upload files or start a new job. Read status after execution to confirm the printer state changed.
Dry-run pause payload:
python scripts/bambu_lan_print.py pause \
--printer a1-mini
Execute pause and collect printer reports:
python scripts/bambu_lan_print.py pause \
--printer a1-mini \
--execute \
--mqtt-qos 1 \
--wait-after-publish 10
Dry-run cancel payload. The Bambu LAN command sent to the printer is stop:
python scripts/bambu_lan_print.py cancel \
--printer a1-mini
Execute cancel only when the user explicitly asks to cancel/stop the print or after confirmation when intent is ambiguous:
python scripts/bambu_lan_print.py cancel \
--printer a1-mini \
--execute \
--confirm-cancel-print \
--mqtt-qos 1 \
--wait-after-publish 10
Failure Modes
gcode_filereturnsresult: failor leaves the printerIDLE: plain G-code upload worked, but the firmware rejected or ignored direct local start. For A1 Mini, switch totemplate-project.- Project uploaded under
cache/starts then fails withprint_error: 83935248or0500-C010: clear the error, upload project handoffs to FTPS root, and useftp:///<name>.gcode.3mf. file:///sdcard/cache/...or local HTTP URLs appear accepted but nothing starts: stop using those URL forms for this workflow.- Bambu Studio or OrcaSlicer project export crashes on macOS: do not keep retrying GUI-backed project export. Use OrcaSlicer for plain
.gcode, then this skill for handoff. - Stale
gcode_state: FAILEDor HMS after enabling Developer Mode: clear the printer error and power-cycle before retrying. - FTPS login works but upload fails with
553or missingcache/: check printer storage/SD card status before MQTT start. - MQTT status works but start does not: confirm serial, access code, Developer Mode/LAN Only status, and the exact handoff payload before retrying.
Read references/new-printer-onboarding.md for new printer setup,
references/local-lan-protocol.md for protocol details, and
references/real-printer-checklist.md before first live use on a new printer.
Related skills
More from earthtojake/text-to-cad and the wider catalog.

cad
Generate parametric CAD models from Python, export to STEP/STL/3MF/GLB, and inspect geometry.

cad-viewer
Open CAD and robot-description files in a live web viewer with browsable catalog and compile status.

dfam-check
Measure mesh files against Design for Additive Manufacturing rules and report printability per process.

dxf
Generate and validate 2D DXF drawings from Python build123d sources for laser/plasma/waterjet cutting.

gcode
Generate and validate FDM G-code from 3D meshes using local slicer CLIs.

implicit-cad
Create browser-native implicit CAD models using GLSL signed-distance fields and raymarching.