Bambu Labs logo

Bambu Labs

CommunityPopular
earthtojake
bambu-labs

Dry-run, upload, and cautiously initiate local Bambu Lab print jobs from validated plain `.gcode`, using Bambu LAN FTPS/MQTT handoffs.

Overview

Publisherearthtojake
Repositorytext-to-cad
Skill namebambu-labs
Stars
16K
Forks
1.7K
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by earthtojake on GitHub. Read the source before you install it.

Installation

Install the Bambu Labs AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/earthtojake/text-to-cad.git /tmp/text-to-cad
mkdir -p .claude/skills
cp -r /tmp/text-to-cad/skills/bambu-labs .claude/skills/bambu-labs
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Bambu Labs in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Bambu Labs on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Bambu Labs is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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 serial or let send cache it.
  • Prefer workspace-root bambu-printers.json over 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.

CAD Viewer Handoff

After completing Bambu work that creates or modifies a local .3mf print artifact, you must ALWAYS hand the explicit file path to $cad-viewer when that skill is installed. CAD Viewer does not open .gcode, so a plain G-code artifact takes no handoff. $cad-viewer must start CAD Viewer if it is not already running and return link(s) to the relevant created or updated file(s); if $cad-viewer is unavailable or startup fails, report that instead of silently omitting the handoff.

Workflow

  1. 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, prefer brew install --cask orcaslicer.
  2. 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.json directly. For a new printer setup or onboarding request, read references/new-printer-onboarding.md first. 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.
bash
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:

json
{
  "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.

  1. Read status before live work:
bash
python scripts/bambu_lan_print.py status \
  --printer a1-mini \
  --push-all \
  --wait-seconds 10
  1. 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-print after 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.

bash
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:

bash
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:

bash
python scripts/bambu_lan_print.py serial \
  --printer a1-mini \
  --json

Clear a stale printer error after fixing the underlying cause:

bash
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:

bash
python scripts/bambu_lan_print.py pause \
  --printer a1-mini

Execute pause and collect printer reports:

bash
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:

bash
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:

bash
python scripts/bambu_lan_print.py cancel \
  --printer a1-mini \
  --execute \
  --confirm-cancel-print \
  --mqtt-qos 1 \
  --wait-after-publish 10

Failure Modes

  • gcode_file returns result: fail or leaves the printer IDLE: plain G-code upload worked, but the firmware rejected or ignored direct local start. For A1 Mini, switch to template-project.
  • Project uploaded under cache/ starts then fails with print_error: 83935248 or 0500-C010: clear the error, upload project handoffs to FTPS root, and use ftp:///<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: FAILED or HMS after enabling Developer Mode: clear the printer error and power-cycle before retrying.
  • FTPS login works but upload fails with 553 or missing cache/: 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.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Bambu Labs AI skill do?

Dry-run, upload, and cautiously initiate local Bambu Lab print jobs from validated plain `.gcode`, using Bambu LAN FTPS/MQTT handoffs.

Why use Bambu Labs on TypingMind?

Because you install it once and use it with any model. Bambu Labs is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Bambu Labs in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/earthtojake/text-to-cad/tree/main/skills/bambu-labs. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Bambu Labs?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Bambu Labs?

As many as you like. As long as a model supports skills, you can use Bambu Labs with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Bambu Labs AI skill free?

Yes. It is published on GitHub by earthtojake under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇