### Install bambu-cli using Homebrew Source: https://github.com/tobiasbischoff/bambu-cli/blob/master/README.md Installs the bambu-cli tool on macOS using the Homebrew package manager. This command adds the bambu-cli repository to your Homebrew sources and then installs the package. Ensure Homebrew is installed and updated before running this command. ```bash brew install tobiasbischoff/tap/bambu-cli ``` -------------------------------- ### Start BambuLab Print Job Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Uploads and starts a print job for .3mf or .gcode files, with options for plate selection, AMS configuration, skipping objects, and disabling calibration. Supports dry runs for previewing. Requires the `bambu-cli` tool. ```bash # Start print with default settings (plate 1, AMS enabled) bambu-cli print start ./benchy.3mf # Specify plate number bambu-cli print start ./multipart.3mf --plate 2 # Start without AMS bambu-cli print start ./model.3mf --no-ams # Custom AMS mapping (tray indices) bambu-cli print start ./multicolor.3mf --ams-mapping "0,1,2,3" # Start from G-code file (auto-wrapped in 3MF) bambu-cli print start ./model.gcode --plate 1 # Skip specific objects during print bambu-cli print start ./model.3mf --skip-objects "1,3,5" # Use file already on printer (no upload) bambu-cli print start existing_file.3mf --no-upload # Disable flow calibration bambu-cli print start ./model.3mf --flow-calibration=false # Dry run to preview bambu-cli --dry-run print start ./model.3mf ``` -------------------------------- ### Start a print job with bambu-cli Source: https://github.com/tobiasbischoff/bambu-cli/blob/master/README.md Initiates a print job on the BambuLab printer. This command takes the path to the 3MF file and the plate number as arguments. Ensure the printer is configured and the specified file and plate are valid. ```bash bambu-cli print start ./benchy.3mf --plate 1 ``` -------------------------------- ### Build bambu-cli with Go Source: https://github.com/tobiasbischoff/bambu-cli/blob/master/README.md Builds the bambu-cli executable using the Go compiler. This command compiles the source code located in the cmd/bambu-cli directory and outputs an executable file named 'bambu-cli'. Ensure you have Go installed and are in the project's root directory. ```bash go build -o bambu-cli ./cmd/bambu-cli ``` -------------------------------- ### Get and Set Printer Temperatures Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Retrieve current temperature readings for the bed, nozzle, and chamber, or set target temperatures for these components. Supports JSON output for programmatic access. ```bash bambu-cli temps get bambu-cli --json temps get bambu-cli temps set --bed 60 bambu-cli temps set --nozzle 220 bambu-cli temps set --chamber 40 bambu-cli temps set --bed 60 --nozzle 220 --chamber 40 ``` -------------------------------- ### Get BambuLab Printer Status Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Retrieves real-time status information from a BambuLab printer, including print progress, temperatures, layer details, and error states. Supports human-readable, JSON, and plain key=value output formats. Requires the `bambu-cli` tool. ```bash # Human-readable status bambu-cli status # Output: # State: RUNNING (PRINTING) # Progress: 45% (120/267) # Temps: bed=60.0C nozzle=220.0C chamber=35.0C # Remaining: 47 min # File: benchy.3mf # Light: on # WiFi: -52 dBm # Error: 0 # JSON output for scripting bambu-cli --json status # Plain key=value output bambu-cli --plain status ``` -------------------------------- ### Control Printer Axis Movement Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Home all printer axes to their starting positions or move the Z-axis to a specific height. A dry run option is available to preview the movement without executing it. ```bash bambu-cli home bambu-cli move z --height 100 bambu-cli --dry-run move z --height 50 ``` -------------------------------- ### Get bambu-cli printer status Source: https://github.com/tobiasbischoff/bambu-cli/blob/master/README.md Retrieves the current status of the configured BambuLab printer. This command sends a request to the printer and displays its operational state. It requires a previously configured printer profile. ```bash bambu-cli status ``` -------------------------------- ### Bambu CLI Global Flags Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Reference for common flags applicable to most bambu-cli commands, including output formatting (`--json`, `--plain`, `--no-color`), confirmation handling (`--force`, `--confirm`, `--no-input`), preview mode (`--dry-run`), verbosity (`--quiet`, `--verbose`), printer selection, connection options, and configuration file overrides. ```bash # Output formats bambu-cli --json status # JSON output bambu-cli --plain status # Key=value output bambu-cli --no-color status # Disable colored output # Confirmation handling bambu-cli --force print stop # Skip confirmation prompts bambu-cli --confirm stop print stop # Non-interactive confirmation bambu-cli --no-input print stop # Disable all prompts # Preview mode bambu-cli --dry-run print start ./model.3mf # Verbosity bambu-cli --quiet status # Less output bambu-cli --verbose status # More output # Printer selection bambu-cli --printer office status # Use specific profile bambu-cli --ip 192.168.1.100 --serial ABC123 --access-code-file ./code status # Connection options bambu-cli --timeout 30 status # Set timeout (seconds) bambu-cli --no-camera status # Skip camera connection # Config file override bambu-cli --config ./custom-config.json status ``` -------------------------------- ### Run Printer Calibration Routines Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Initiate various printer calibration routines, such as bed leveling, motor noise analysis, and vibration compensation. Specific routines can be skipped, and a dry run option is available. ```bash # Full calibration bambu-cli --force calibrate # Skip bed leveling bambu-cli --force calibrate --no-bed-level # Skip motor noise calibration bambu-cli --force calibrate --no-motor-noise # Skip vibration compensation bambu-cli --force calibrate --no-vibration # Dry run bambu-cli --dry-run calibrate ``` -------------------------------- ### Create and secure printer access code file Source: https://github.com/tobiasbischoff/bambu-cli/blob/master/README.md Creates a directory and a file to store the BambuLab printer's access code, then sets restrictive permissions. This is a crucial step for authenticating with the printer. Replace 'YOUR_ACCESS_CODE' with the actual code obtained from the printer or Bambu Studio. ```bash mkdir -p ~/.config/bambu printf "%s" "YOUR_ACCESS_CODE" > ~/.config/bambu/lab.code chmod 600 ~/.config/bambu/lab.code ``` -------------------------------- ### Run Connection Diagnostics Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Perform diagnostic checks on network connectivity to essential printer services like MQTT, FTP, and the camera. The output indicates the status of each connection. ```bash bambu-cli doctor ``` -------------------------------- ### Configure BambuLab Printer Profile Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Sets up and manages printer profiles, including connection details like IP address, serial number, and access code file. Profiles are stored in `~/.config/bambu/config.json` with optional project-level overrides. Requires the `bambu-cli` tool. ```bash # Store access code securely (get from printer or Bambu Studio) mkdir -p ~/.config/bambu printf "%s" "YOUR_ACCESS_CODE" > ~/.config/bambu/lab.code chmod 600 ~/.config/bambu/lab.code # Create a printer profile bambu-cli config set --printer lab \ --ip 192.168.1.200 \ --serial AC12309BH109 \ --access-code-file ~/.config/bambu/lab.code \ --default # List all configured profiles bambu-cli config list # Get specific config value bambu-cli config get --printer lab ip # Remove a profile bambu-cli config remove --printer lab ``` -------------------------------- ### Capture BambuLab Camera Snapshot Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Captures a single image frame from the BambuLab printer's built-in camera. Allows saving to a specified file path or outputting directly to stdout for piping to other commands. Requires the `bambu-cli` tool. ```bash # Save snapshot to default file (snapshot.jpg) bambu-cli camera snapshot # Save to specific path bambu-cli camera snapshot --out ./printer_view.jpg # Output to stdout for piping bambu-cli --force camera snapshot --out - | convert - -resize 50% thumbnail.jpg ``` -------------------------------- ### Send G-code Commands to Printer Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Execute raw G-code commands on the printer, with options to send single lines, multiple lines, from standard input, skip validation, or perform a dry run. The `--force` flag bypasses confirmation prompts. ```bash # Send single G-code line bambu-cli --force gcode send "G28" # Send multiple lines bambu-cli --force gcode send "G28" "G0 Z50" "M104 S200" # Send G-code from stdin (pipe from file) cat commands.gcode | bambu-cli --force gcode send --stdin # Skip G-code validation bambu-cli --force gcode send --no-check "CUSTOM_COMMAND" # Dry run to preview bambu-cli --dry-run --force gcode send "G28" ``` -------------------------------- ### Manage BambuLab Printer Files Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Handles file operations on the BambuLab printer's internal storage via FTPS, including listing, uploading, downloading, and deleting files. Supports specifying directories, custom remote names, and outputting to stdout. Requires the `bambu-cli` tool. ```bash # List files in root directory bambu-cli files list # List specific directory bambu-cli files list --dir /cache # Upload file bambu-cli files upload ./model.3mf # Upload with custom remote name bambu-cli files upload ./model.3mf --as custom_name.3mf # Download file to local path bambu-cli files download remote_file.3mf --out ./downloaded.3mf # Download to stdout (for piping) bambu-cli --force files download remote_file.3mf --out - # Delete file (requires confirmation) bambu-cli files delete old_print.3mf # Force delete bambu-cli --force files delete old_print.3mf # JSON output for file listing bambu-cli --json files list ``` -------------------------------- ### Configure bambu-cli printer profile Source: https://github.com/tobiasbischoff/bambu-cli/blob/master/README.md Sets up a new printer profile for bambu-cli. This command configures a printer named 'lab' with its IP address, serial number, and access code file. The `--default` flag makes this the active profile. Ensure the access code file exists and is correctly populated. ```bash bambu-cli config set --printer lab \ --ip 192.168.1.200 \ --serial AC12309BH109 \ --access-code-file ~/.config/bambu/lab.code \ --default ``` -------------------------------- ### Reboot the Printer Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Restart the printer. The command can be executed with or without a confirmation prompt using the `--force` flag. ```bash bambu-cli reboot bambu-cli --force reboot ``` -------------------------------- ### Watch BambuLab Printer Status Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Continuously monitors BambuLab printer status with configurable update intervals. Can output in JSON format for logging and monitoring. Requires the `bambu-cli` tool. ```bash # Watch status every 5 seconds (default) bambu-cli watch # Custom interval with refresh requests bambu-cli watch --interval 10 --refresh # JSON output for logging/monitoring bambu-cli --json watch --interval 5 > print_log.jsonl ``` -------------------------------- ### Configure Bambu CLI via Environment Variables Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Set environment variables to configure bambu-cli settings such as printer profile, IP address, serial number, access code, timeouts, and port configurations. These settings are overridden by command-line flags. ```bash # Set environment variables export BAMBU_PROFILE=lab export BAMBU_IP=192.168.1.200 export BAMBU_SERIAL=AC12309BH109 export BAMBU_ACCESS_CODE_FILE=~/.config/bambu/lab.code export BAMBU_TIMEOUT=30 export BAMBU_NO_CAMERA=true export BAMBU_MQTT_PORT=8883 export BAMBU_FTP_PORT=990 export BAMBU_CAMERA_PORT=6000 # Run commands using environment config bambu-cli status ``` -------------------------------- ### Control Printer Chamber Light Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Manage the printer's chamber light by turning it on or off. The current status can also be retrieved. ```bash bambu-cli light on bambu-cli light off bambu-cli light status ``` -------------------------------- ### Control BambuLab Print Job Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Manages active print jobs on a BambuLab printer, allowing users to pause, resume, or stop the current print. Supports forceful or non-interactive stopping with confirmation tokens. Requires the `bambu-cli` tool. ```bash # Pause current print bambu-cli print pause # Resume paused print bambu-cli print resume # Stop print (requires confirmation) bambu-cli print stop # Force stop without confirmation bambu-cli --force print stop # Non-interactive stop with confirmation token bambu-cli --confirm stop print stop ``` -------------------------------- ### Check Automatic Material System (AMS) Status Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Retrieve the status of connected AMS units, including humidity, temperature, and details about each filament tray. Supports both human-readable and JSON output formats. ```bash bambu-cli ams status bambu-cli --json ams status ``` -------------------------------- ### Set Printer Fan Speeds Source: https://context7.com/tobiasbischoff/bambu-cli/llms.txt Adjust the speeds of the part cooling, auxiliary, and chamber fans. Speeds can be set using a 0-255 range or a 0.0-1.0 percentage. Multiple fans can be configured simultaneously. ```bash # Set part cooling fan (0-255 or 0.0-1.0) bambu-cli fans set --part 200 # Set as percentage (0.0-1.0 = 0-100%) bambu-cli fans set --part 0.75 # Set auxiliary fan bambu-cli fans set --aux 128 # Set chamber fan bambu-cli fans set --chamber 100 # Set multiple fans bambu-cli fans set --part 200 --aux 128 --chamber 100 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.