Package: octoprint-cli
octoprint-cliPython 3 command line tool for controlling OctoPrint serversThis tool uses the OctoPrint API to control and view the status of 3D printers connected to OctoPrint serversThis project is a work in progress. Some features may not work as intended or be missing. If you have suggestions or find bugs, please report them inissues. Feel free to fork this repo to fix issues or to implement new features.FeaturesThese are the features that have been implemented so far, more functions will be implemented in the future. Current progress on features can be found on theproject board.Printer connection statusPrint job statusFile selectionPause, resume, cancel printsStart printSystem commands (shutdown, reboot, restart)Listing files/foldersRetrieving file/folder informationSetting extruder and bed temperatureConnect and disconnect from printerContinuous status output with temperature status and progress barGCODE and STL file uploads to server storageRun G-code on printer from terminalLayer information from OctoPrint-DisplayLayerProgress plugin if installed on serverLimitationsCurrently, octoprint-cli is limited to only printers with a single extruder and heated bed. Support for additional extruders and heated chambers may be implemented in the future. This program has been tested on OctoPi 0.17.0 on the Raspberry Pi 4 running OctoPrint 1.4.1 with a Monoprice Select Mini V2.Colored and formatted text is not available on Windows systems due to the lack of support on cmd and powershell terminalsThe program requires the API key to have all permissions to runInstallationoctoprint-cli can be installed from PyPI usingpip. PyPI package can be found athttps://pypi.org/project/octoprint-cli/pipinstalloctoprint-clioctoprint-cli can also be installed manually usinggitandsetup.pygitclonehttps://github.com/UserBlackBox/octoprint-cli.gitcdoctoprint-cli
python3setup.pyinstall--userDependenciesCan be found inrequirements.txtand installed withpiptermcolorrequestsConfigurationThe tool reads its configuration from eitherconfig.iniin the application directory or from~/.config/octoprint-cli.inion Linux systemsA sample config file has been included insample-config.ini[server];Set OctoPrint server address and x-api-keyServerAddress=SERVER_ADDRESS_HEREApiKey=API_KEY_HERE[preferences];Set if the program uses colored or formatted text, this setting is turned off on windows due to cmd and powershell limitationsFormattedText=true;Set if the program should check for updatesUpdateCheck=true[printer];Set maximum temperature that printer can be set toMaxExtruderTemp=250MaxBedTemp=85UsageGeneral Commandsoctoprint-cli version- get OctoPrint server version informationoctoprint-cli continuous- get continuous refreshing temperature, layer, and print statusPrint Commandsoctoprint-cli print status- get current print job statusoctoprint-cli print select [path]- load file on serveroctoprint-cli print start- start print job on loaded fileoctoprint-cli print cancel- cancel current print joboctoprint-cli print pause- pauses the current print joboctoprint-cli print resume- resumes the current print joboctoprint-cli gcode [command]- run GCODE command on printeroctoprint-cli layers- get layer information during prints from the DisplayLayerProgress pluginConnection Commandsoctoprint-cli connection status- get OctoPrint print connection informationoctoprint-cli connection connect- connect to printer, serial port and baudrate are decided automatically unless specified with the-b [BAUDRATE]and-p [PORT]flagsoctoprint-cli connection disconnect- disconnect from printerTemperature Commandsoctoprint-cli temp status- get current and target temperatures of extruder and bedoctoprint-cli temp extruder [temp]- set target temperature of extruderoctoprint-cli temp bed [temp]- set target temperature of print bedSystem Commandsoctoprint-cli system restart- restart OctoPrint serveroctoprint-cli system restart-safe- restart OctoPrint server to safe modeoctoprint-cli reboot- reboot OctoPrint serveroctoprint-cli shutdown- shutdown OctoPrint serverFile Commandsoctoprint-cli files list- list files on OctoPrint server, listing in folders can be done with-p [PATH]flag, files/folders can be filtered using the--filesand--foldersflagsoctoprint-cli files info [file]- get information on file on serveroctoprint-cli files upload [file]- upload local file to serverThe-hor--helpflag can bring up a help message for all commandsThe-vor--verboseflag can be used to view execution information like requests, useful for debugging configuration