### Docker: Pre-built Image Installation Source: https://github.com/maziggy/bambuddy/blob/main/README.md Use this method for the fastest Docker setup. It involves downloading the docker-compose.yml file and starting the service. ```bash mkdir bambuddy && cd bambuddy curl -O https://raw.githubusercontent.com/maziggy/bambuddy/main/docker-compose.yml docker compose up -d ``` -------------------------------- ### Quick Install Bambuddy (Linux/macOS) Source: https://github.com/maziggy/bambuddy/wiki/Installation Use this for a fast setup on Linux or macOS. It clones the repository, sets up a virtual environment, installs dependencies, and starts the server. ```bash # Clone the repository git clone https://github.com/maziggy/bambuddy.git cd bambuddy # Create and activate virtual environment python3 -m venv venv source venv/bin/activate # Install Python dependencies pip install -r requirements.txt # Start the server uvicorn backend.app.main:app --host 0.0.0.0 --port 8000 ``` -------------------------------- ### Manual Installation: Run Application Source: https://github.com/maziggy/bambuddy/blob/main/README.md Start the Bambuddy backend server using uvicorn after completing the manual installation steps. ```bash # Run uvicorn backend.app.main:app --host 0.0.0.0 --port 8000 ``` -------------------------------- ### Backend Development Setup Source: https://github.com/maziggy/bambuddy/blob/main/CONTRIBUTING.md Set up the Python backend environment, install dependencies, configure pre-commit hooks, and run the development server. ```bash # Create virtual environment python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt pip install -r requirements-dev.txt # Dev/test dependencies (pytest, ruff, bandit, etc.) # Install pre-commit hooks pip install pre-commit pre-commit install # Run backend DEBUG=true uvicorn backend.app.main:app --reload --host 0.0.0.0 --port 8000 ``` -------------------------------- ### Quick Start Installation Source: https://github.com/maziggy/bambuddy/blob/main/DOCKERHUB.md Installs Bambuddy using Docker. Ensure you have Docker and Docker Compose installed. Access the UI at http://localhost:8000. ```bash mkdir bambuddy && cd bambuddy curl -O https://raw.githubusercontent.com/maziggy/bambuddy/main/docker-compose.yml docker compose up -d ``` -------------------------------- ### Inno Setup Script for Windows Installer Source: https://github.com/maziggy/bambuddy/blob/main/CHANGELOG.md The Inno Setup script used to define the structure and behavior of the Windows installer package. ```text installers/windows/bambuddy.iss ``` -------------------------------- ### Frontend Development Setup Source: https://github.com/maziggy/bambuddy/blob/main/CONTRIBUTING.md Set up the Node.js frontend environment, install dependencies, and run the development server. API requests are proxied to the backend. ```bash cd frontend # Install dependencies npm install # Run development server npm run dev ``` -------------------------------- ### Windows Installer Parameters Source: https://github.com/maziggy/bambuddy/blob/main/install/README.md Configure the Windows installation using parameters like installation directory, port, and service setup. Use '-Yes' for non-interactive mode. ```powershell -InstallDir PATH -Port PORT -Yes -Silent -NoService -NoStart -LocalOnly ``` -------------------------------- ### Build Bambuddy Windows Installer Source: https://github.com/maziggy/bambuddy/blob/main/installers/windows/README.md Execute the build script for the Bambuddy Windows installer. After running the script, compile the Inno Setup script using the Inno Setup Compiler. ```cmd cd installers\windows python build.py "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" bambuddy.iss ``` -------------------------------- ### Install BamBuddy on Linux/macOS (Interactive) Source: https://github.com/maziggy/bambuddy/blob/main/install/README.md Run the install script interactively to install BamBuddy with default settings. This is suitable for most users who want a quick setup. ```bash ./install.sh ``` -------------------------------- ### Manual Installation: Clone and Setup Source: https://github.com/maziggy/bambuddy/blob/main/README.md Set up Bambuddy manually on Linux or macOS by cloning the repository, creating a virtual environment, and installing dependencies. ```bash # Clone and setup git clone https://github.com/maziggy/bambuddy.git cd bambuddy python3 -m venv venv source venv/bin/activate pip install -r requirements.txt ``` -------------------------------- ### Windows Installer CI Workflow Source: https://github.com/maziggy/bambuddy/blob/main/CHANGELOG.md GitHub Actions workflow for building the Windows installer on tag pushes or manual dispatch. It runs on 'windows-latest' and uses Chocolatey to install Inno Setup. ```yaml .github/workflows/windows-installer.yml ``` -------------------------------- ### Quick Start: Running Slicer API Services Source: https://github.com/maziggy/bambuddy/blob/main/slicer-api/README.md This snippet shows how to navigate to the slicer-api directory, copy the example environment file, and start the OrcaSlicer or both slicer services using Docker Compose. It also includes commands to check the health of the running services. ```bash cd slicer-api/ cp .env.example .env # edit ports if you like # OrcaSlicer only (default profile): docker compose up -d curl http://localhost:3003/health # Both slicers: docker compose --profile bambu up -d curl http://localhost:3001/health # bambu-studio-api curl http://localhost:3003/health # orca-slicer-api ``` -------------------------------- ### Copy Example Environment File Source: https://github.com/maziggy/bambuddy/wiki/Installation Copies the example environment configuration file to a new file named .env, which can then be customized. ```bash cp .env.example .env ``` -------------------------------- ### Install Homebrew and Python/Node.js (macOS) Source: https://github.com/maziggy/bambuddy/wiki/Installation Installs Homebrew, then uses it to install Python 3.12 and Node.js on macOS. ```bash # Install Homebrew if not installed /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Install Python and Node.js brew install python@3.12 node ``` -------------------------------- ### Install Prerequisites (Ubuntu/Debian) Source: https://github.com/maziggy/bambuddy/wiki/Installation Installs Python 3, venv, pip, Node.js, npm, and Git on Ubuntu/Debian systems. ```bash sudo apt update sudo apt install python3 python3-venv python3-pip nodejs npm git ``` -------------------------------- ### Native Update Script with Environment Overrides Source: https://github.com/maziggy/bambuddy/blob/main/install/README.md Examples of running the native update script with custom environment variables to control installation directory, service name, backup behavior, and API key. ```bash # Typical native install defaults INSTALL_DIR=/opt/bambuddy SERVICE_NAME=bambuddy sudo ./update.sh # Require backup to succeed (abort update if backup fails) BACKUP_MODE=require sudo ./update.sh # Skip backup API call BACKUP_MODE=skip sudo ./update.sh # Auth-enabled instances: provide API key for backup endpoint BAMBUDDY_API_KEY=bb_xxx BACKUP_MODE=require sudo ./update.sh ``` -------------------------------- ### Windows Native Installation Script Source: https://github.com/maziggy/bambuddy/blob/main/README.md Execute this PowerShell command to download and run the Windows installer script. It handles native installation, including Python and service registration. ```powershell powershell -ExecutionPolicy Bypass -Command "iwr -useb https://raw.githubusercontent.com/maziggy/bambuddy/main/install/windows-installer.ps1 -OutFile windows-installer.ps1; .\windows-installer.ps1" ``` -------------------------------- ### Implement In-App Install Prompt Source: https://github.com/maziggy/bambuddy/blob/main/CHANGELOG.md This component captures the 'beforeinstallprompt' event to allow users to install the PWA. It handles displaying the prompt, user acceptance, and cleans up the event. It renders nothing if the PWA is already installed, the browser is unsupported, or on iOS Safari. ```typescript import { createContext, useCallback, useContext, useEffect, useState, } from 'react'; import { useToast } from '@chakra-ui/react'; import { useTranslate, useTranslateEffect, } from '@bambuddy/frontend/hooks/useTranslate'; // @ts-ignore const InstallAppPromptContext = createContext<{ promptEvent: BeforeInstallPromptEvent | null; setPromptEvent: (event: BeforeInstallPromptEvent | null) => void; }>({ promptEvent: null, setPromptEvent: () => {} }); export const InstallAppPromptProvider = ({ children }: { children: React.ReactNode }) => { const [promptEvent, setPromptEvent] = useState(null); const handleBeforeInstallPrompt = useCallback((event: BeforeInstallPromptEvent) => { // Prevent the default mini-infobar event.preventDefault(); setPromptEvent(event); }, []); useEffect(() => { window.addEventListener('beforeinstallprompt', handleBeforeInstallPrompt); return () => { window.removeEventListener('beforeinstallprompt', handleBeforeInstallPrompt); }; }, [handleBeforeInstallPrompt]); return ( {children} ); }; export const useInstallAppPrompt = () => { const { promptEvent, setPromptEvent } = useContext(InstallAppPromptContext); const toast = useToast(); const { t } = useTranslate(); const installApp = useCallback(async () => { if (!promptEvent) return; promptEvent.prompt(); // Show the install prompt // Wait for the user to respond to the prompt const { outcome } = await promptEvent.userChoice; setPromptEvent(null); // Clear the event after the prompt is closed // Optionally, send analytics event with outcome console.log(`User response to the install prompt: ${outcome}`); if (outcome === 'accepted') { toast({ title: t('nav.installAppSuccess'), status: 'success', duration: 5000, isClosable: true, }); } }, [promptEvent, setPromptEvent, toast, t]); return { promptEvent, installApp, showInstallButton: !!promptEvent, }; }; ``` -------------------------------- ### Linux/macOS Docker Installation Script Source: https://github.com/maziggy/bambuddy/blob/main/install/README.md Use this script for interactive or unattended installations on Linux and macOS. It supports custom installation paths, ports, timezones, and building from source. ```bash # Interactive installation ./docker-install.sh ``` ```bash # Unattended with custom settings ./docker-install.sh --path /srv/bambuddy --port 3000 --tz Europe/Berlin --yes ``` ```bash # Build from source ./docker-install.sh --build --yes ``` -------------------------------- ### Run Install Script with Sudo Source: https://github.com/maziggy/bambuddy/blob/main/install/README.md Use this command on Linux if you encounter permission denied errors during installation. It ensures the script has the necessary privileges to execute. ```bash sudo ./install.sh ``` -------------------------------- ### Docker Installation (Windows) Source: https://github.com/maziggy/bambuddy/blob/main/install/README.md Installs BamBuddy using Docker on Windows via PowerShell. Requires PowerShell and Docker Desktop. Printer auto-discovery is unavailable. ```powershell powershell -ExecutionPolicy Bypass -Command "iwr -useb https://raw.githubusercontent.com/maziggy/bambuddy/main/install/docker-install.ps1 -OutFile docker-install.ps1; .\docker-install.ps1" ``` -------------------------------- ### Native Installation Update Script Source: https://github.com/maziggy/bambuddy/blob/main/install/README.md Download, make executable, and run the update script for native installations. This script handles backups and service restarts. ```bash curl -fsSL https://raw.githubusercontent.com/maziggy/bambuddy/main/install/update.sh -o update.sh chmod +x update.sh sudo ./update.sh ``` -------------------------------- ### Docker Installation (Linux/macOS) Source: https://github.com/maziggy/bambuddy/blob/main/install/README.md Installs BamBuddy using Docker on Linux or macOS. Requires curl and bash. Ensure Docker Desktop is running. ```bash curl -fsSL https://raw.githubusercontent.com/maziggy/bambuddy/main/install/docker-install.sh -o docker-install.sh && chmod +x docker-install.sh && ./docker-install.sh ``` -------------------------------- ### Windows Installer Build Script Source: https://github.com/maziggy/bambuddy/blob/main/CHANGELOG.md Python script to stage files for the Windows installer. It hard-fails on non-Windows hosts but supports cross-build under Wine with a flag. ```python installers/windows/build.py ``` -------------------------------- ### Set Up Python Environment (Windows Command Prompt) Source: https://github.com/maziggy/bambuddy/wiki/Installation Creates a virtual environment, activates it, upgrades pip, and installs project dependencies using the Command Prompt on Windows. ```cmd python -m venv venv venv\Scripts\activate.bat pip install --upgrade pip pip install -r requirements.txt ``` -------------------------------- ### Set Up Python Environment (Linux/macOS) Source: https://github.com/maziggy/bambuddy/wiki/Installation Creates a virtual environment, activates it, upgrades pip, and installs project dependencies for Linux and macOS. ```bash python3 -m venv venv source venv/bin/activate pip install --upgrade pip pip install -r requirements.txt ``` -------------------------------- ### Windows Native Update via Installer Source: https://github.com/maziggy/bambuddy/blob/main/install/README.md Update a native Windows installation by stopping the service, rerunning the installer with specific parameters, and then starting the service. ```powershell Stop-Service Bambuddy .ambuddy-installer.ps1 -Yes Start-Service Bambuddy ``` -------------------------------- ### Build Frontend from Source Source: https://github.com/maziggy/bambuddy/wiki/Installation Navigates to the frontend directory, installs Node.js dependencies, and builds the frontend assets. ```bash cd frontend npm install npm run build cd .. ``` -------------------------------- ### Set Up Python Environment (Windows PowerShell) Source: https://github.com/maziggy/bambuddy/wiki/Installation Creates a virtual environment, activates it, upgrades pip, and installs project dependencies using PowerShell on Windows. ```powershell python -m venv venv . venv\Scripts\Activate.ps1 pip install --upgrade pip pip install -r requirements.txt ``` -------------------------------- ### Example Response for Get Individual Preset Source: https://github.com/maziggy/bambuddy/blob/main/docs/bambu_lab_preset_sync_api.md This JSON structure represents the detailed information returned when fetching an individual preset. It includes common fields and a 'setting' object with type-specific configurations. ```json { "message": "success", "code": null, "error": null, "public": false, "version": "1.5.0.20", "type": "filament", "name": "Devil Design PLA @Bambu Lab X1 Carbon 0.6 nozzle", "update_time": "2025-12-08 01:06:27", "nickname": null, "base_id": "GFSA00", "setting": { "inherits": "Bambu PLA Basic @BBL X1C", "filament_vendor": "\"Devil Design\"", "nozzle_temperature": "225,220", "pressure_advance": "0.03", "updated_time": "1765138658" }, "filament_id": null } ``` -------------------------------- ### Run Bambuddy Application Source: https://github.com/maziggy/bambuddy/wiki/Installation Starts the Bambuddy server using uvicorn. Ensure you are in the project's root directory. ```bash uvicorn backend.app.main:app --host 0.0.0.0 --port 8000 ``` -------------------------------- ### Unattended Windows Native Installation Source: https://github.com/maziggy/bambuddy/blob/main/install/README.md Performs an unattended native installation of BamBuddy on Windows with specified installation directory and port. Requires the windows-installer.ps1 script. ```powershell .\windows-installer.ps1 -InstallDir C:\Bambuddy -Port 8000 -Yes ``` -------------------------------- ### Configure Documentation External Link Source: https://github.com/maziggy/bambuddy/wiki/External-Sidebar-Links Example configuration for adding a documentation link to the sidebar. ```text Name: Docs URL: https://docs.example.com Icon: Built-in book icon ``` -------------------------------- ### Install BamBuddy on Linux/macOS without Service Source: https://github.com/maziggy/bambuddy/blob/main/install/README.md Install BamBuddy without setting up the systemd or launchd service. Use the '--no-service' flag along with '-y' for an unattended installation. ```bash ./install.sh --no-service -y ``` -------------------------------- ### Windows PowerShell Docker Installation Script Source: https://github.com/maziggy/bambuddy/blob/main/install/README.md This PowerShell script is a Windows equivalent for Docker installations. It requires Docker Desktop and supports unattended installations with custom parameters and building from source. ```powershell # Interactive .\docker-install.ps1 ``` ```powershell # Unattended .\docker-install.ps1 -InstallPath C:\bambuddy -Port 8080 -TimeZone Europe/Berlin -Yes ``` ```powershell # Build from source .\docker-install.ps1 -Build -Yes ``` -------------------------------- ### NSSM Service Installation Script Source: https://github.com/maziggy/bambuddy/blob/main/CHANGELOG.md Batch script to wrap NSSM for installing the Bambuddy service on Windows. ```batch installers/windows/service/install-service.bat ``` -------------------------------- ### Print Process Preset Settings Example Source: https://github.com/maziggy/bambuddy/blob/main/docs/bambu_lab_preset_sync_api.md This JSON object shows typical settings for a print process preset, including parameters related to prime tower dimensions and speed. ```json { "inherits": "0.08mm Extra Fine @BBL H2D", "print_settings_id": "# 0.08mm Extra Fine @BBL H2D", "prime_tower_max_speed": "100", "prime_tower_rib_wall": "0", "prime_tower_width": "20" } ``` -------------------------------- ### Manually Update Bambuddy Native Install Source: https://github.com/maziggy/bambuddy/blob/main/UPDATING.md Execute the manual steps equivalent to `update.sh` if preferred. This involves stopping the service, fetching changes, resetting the branch, installing dependencies, and restarting the service. Replace `/opt/bambuddy` with your actual install path if different. ```bash cd /opt/bambuddy sudo systemctl stop bambuddy sudo -u bambuddy git fetch origin sudo -u bambuddy git reset --hard origin/main sudo -u bambuddy venv/bin/pip install -r requirements.txt sudo systemctl start bambuddy ```