PHPackages                             techenby/octoprint-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. techenby/octoprint-sdk

ActiveLibrary

techenby/octoprint-sdk
======================

A PHP SDK for OctoPrint.

1.2.4(3y ago)77042MITPHPPHP ^8.0

Since Mar 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/techenby/octoprint-sdk)[ Packagist](https://packagist.org/packages/techenby/octoprint-sdk)[ RSS](/packages/techenby-octoprint-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (9)Used By (0)

OctoPrint SDK
=============

[](#octoprint-sdk)

[![Build Status](https://github.com/techenby/octoprint-sdk/workflows/tests/badge.svg)](https://github.com/techenby/octoprint-sdk/actions)[![Total Downloads](https://camo.githubusercontent.com/decaa9d2a9d4f52a7ec98880243e25f5bd6b08e2164b92a9af676a4bcd00c334/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74656368656e62792f6f63746f7072696e742d73646b)](https://packagist.org/packages/techenby/octoprint-sdk)[![Latest Stable Version](https://camo.githubusercontent.com/29dbec3e10b063fca64c5cb18e8f1e4b007d4d7b95f931359e31a39afa692dd9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74656368656e62792f6f63746f7072696e742d73646b)](https://packagist.org/packages/techenby/octoprint-sdk)[![License](https://camo.githubusercontent.com/8f9e05060ef3aba5d90b75f049a363da4e6826ef0e028bb3a057a4e4ccf5859d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f74656368656e62792f6f63746f7072696e742d73646b)](https://packagist.org/packages/techenby/octoprint-sdk)

The [OctoPrint](https://octoprint.org/) SDK provides an expressive interface for interacting with [OctoPrint's Rest API](https://docs.octoprint.org/en/master/api/files.html) and managing OctoPrint instances servers. The structure of this repository is based on the [Laravel Forge SDK](https://github.com/laravel/forge-sdk).

Installation
------------

[](#installation)

To install the SDK in your project you need to require the package via composer:

```
composer require techenby/octoprint-sdk
```

Basic Usage
-----------

[](#basic-usage)

You can create an instance of the SDK like so:

```
$pikachu = new TechEnby\OctoPrint(PRINTER_URL, API_TOKEN);
```

Using the `OctoPrint` instance you may perform multiple actions as well as retrieve the different resources OctoPrint's API provides:

```
$files = $pikachu->files();
```

Rest Endpoints and SDK Methods
------------------------------

[](#rest-endpoints-and-sdk-methods)

**Resource****Request****Method****General Information**LoginPOST `/api/login``$octoPrint->login()`Current UserGET `/api/currentuser``$octoPrint->currentUser()`**Version Information**Version InformationGET `/api/version``$octoPrint->version()`**Server Information**Server informationGET `/api/server``$octoPrint->server()`**Connection handling**Get connection settingsGET `/api/connection``$octoPrint->connection()`Get connection state`$octoPrint->state()`*Issue a connection command*POST `/api/connection`Connect OctoPrint to printer`$octoPrint->connect()`Disconnect OctoPrint from printer`$octoPrint->dissconect()`**File operations**Retrieve all filesGET `/api/files``$octoPrint->files()`Retrieve files from specific locationGET `/api/files/{location}``$octoPrint->files($location)`Upload filePOST `/api/files/{location}``$octoPrint->uplaodFile($location, $path, $contents)`Retrieve a specific file's or folder's informationGET `/api/files/{location}/{filename}``$octoPrint->file($location, $path)`Issue a file commandPOST `/api/files/{location}/{path}`Select a file`$octoPrint->selectFile($location, $path)`Unselect a file`$octoPrint->unselectFile($location, $path)`Slice a file`$octoPrint->sliceFile($location, $path, $data)`Copy a file`$octoPrint->copyFile($location, $path, $destination)`Move a file`$octoPrint->moveFile($location, $path, $destination)`Delete fileDELETE `/api/files/{location}/{path}``$octoPrint->deleteFile($location, $path)`**Job operations***Issue a job command*POST `/api/job`Start the print of the currently selected file`$octoPrint->start()`Cancel current job`$octoPrint->cancel()`Restart job with selected file from beginning`$octoPrint->restart()`Pause/Resume/Toggle current job`$octoPrint->pause($action)`Retrieve information about the current jobGET `/api/job``$octoPrint->job()`**Languages**Retrieve installed language packsGET `/api/languages``$octoPrint->languages()`Upload a language packPOST `/api/languages`❌Delete a language packDELETE `/api/languages/{locale}/{pack}``$octoPrint->deleteLanguage($locale, $pack)`**Printer operations**Retrieve the current printer stateGET `/api/printer``$octoPrint->printer()`*Issue a print head command*POST `/api/printer/printhead`Jog the print head`$octoPrint->jog($x, $y, $z, $absolute, $speed)`Home the print head`$octoPrint->home($axes)`Change the feedrate factor`$octoPrint->feedrate($factor)`*Issue a tool command*POST `/api/printer/tool`Set the target tool temperature`$octoPrint->targetToolTemps($targets)`Set the offset tool temperature`$octoPrint->offsetToolTemps($offsets)`Select printer's current tool`$octoPrint->selectTool($tool)`Extrude from current tool`$octoPrint->extrude($amount, $speed)`Retract from current tool`$octoPrint->retract($amount, $speed)`Set the flow rate`$octoPrint->flowrate($factor)`Retrieve the current tool stateGET `/api/printer/tool``$octoPrint->tool()`*Issue a bed command*POST `/api/printer/bed`Set the target bed temperature`$octoPrint->targetBedTemps($targets)`Set the offset bed temperature`$octoPrint->offsetBedTemp($offsets)`Retrieve the current bed stateGET `/api/printer/bed``$octoPrint->bed()`*Issue a chamber command*POST `/api/printer/chamber`Set the target chamber temperature`$octoPrint->targetChamberTemps($targets)`Set the offset chamber temperature`$octoPrint->offsetChamberTemp($offsets)`Retrieve the current chamber stateGET `/api/printer/chamber``$octoPrint->chamber()`*Issue an SD command*POST `/api/printer/sd`Initialize the printer’s SD card`$octoPrint->initSD()`Refresh the printer’s SD card`$octoPrint->refreshSD()`Release the printer’s SD card`$octoPrint->releaseSD()`Retrieve the current SD stateGET `/api/printer/sd``$octoPrint->sd()`Send an arbitrary command(s) to the printerPOST `/api/printer/command``$octoPrint->command($command)` `$octoPrint->commands($commands)`Retrieve custom controlsGET `/api/printer/command/custom`❌**Printer profile operations**Retrieve all printer profilesGET `/api/printerprofiles``$octoPrint->profiles()`Retrieve a single printer profileGET `/api/printerprofiles/{identifier}``$octoPrint->profile($id)`Add a new printer profilePOST `/api/printerprofiles``$octoPrint->createProfile($data, $basedOn)`Update an existing printer profilePATCH `/api/printerprofiles/{profile}``$octoPrint->updateProfile($id, $data)`Remove an existing printer profileDELETE `/api/printerprofiles/{profile}``$octoPrint->deleteProfile($id)`**Settings**Retireve current settingsGET `/api/settings``$octoPrint->settings()`Save settingsPOST `/api/settings``$octoPrint->updateSettings($data)`Regenerate the system wide API keyPOST `/api/settings/apikey``$octoPrint->regenerateApiKey()`Fetch template dataGET `/api/settings/templates`Will implement when not in beta**Slicing**List All Slicers and Slicing ProfilesGET `/api/slicing``$octoPrint->slicers()`List Slicing Profiles of a Specific SlicerGET `/api/slicing/{slicer}/profiles``$octoPrint->slicerProfiles($slicer)`Retrieve Specific ProfileGET `/api/slicing/{slicer}/profiles/{key}``$octoPrint->slicerProfile($slicer, $key)`Add Slicing ProfilePUT `/api/slicing/{slicer}/profiles/{key}``$octoPrint->createSlicerProfile($slicer, $key, $data)`Update Slicing ProfilePATCH `/api/slicing/{slicer}/profiles/{key}``$octoPrint->updateSlicerProfile($slicer, $key, $data)`Delete Slicing ProfileDELETE `/api/slicing/{slicer}/profiles/{key}``$octoPrint->deleteSlicerProfile($slicer, $key)`**System**List all registered system commandsGET `/api/system/commands``$octoPrint->systemCommands()`List all registered system commands for a sourceGET `/api/system/commands/{source}``$octoPrint->systemCommand($source)`Execute a registered system commandPOST `/api/system/commands/{source}/{action}``$octoPrint->runSystemCommand($source, $action)`**Timelapse**Retirieve a list of timelapses and the current configGET `/api/timelapse``$octoPrint->timelapses()` `$octoPrint->timelapseConfig()`Delete a timelapseDELETE `/api/timelapse/{filename}``$octoPrint->deleteTimelapse($filename)`Issue a command for an unrendered timelapsePOST `/api/timelapse/unrendered/{name}``$octoPrint->renderTimelapse($name)`Delete an unrendered timelapseDELETE `/api/timelapse/unrendered/{name}``$octoPrint->deleteTimelapse($filename, true)`Change current timelapse configPOST `/api/timelapse``$octoPrint->updateTimelapseSettings($data)`Contributing
------------

[](#contributing)

Thank you for considering contributing to OctoPrint SDK! All pull requests are welcome, please follow the conventions set out in existing files.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](https://github.com/techenby/octoprint-sdk/security/policy) on how to report security vulnerabilities.

License
-------

[](#license)

OctoPrint SDK is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~19 days

Recently: every ~13 days

Total

7

Last Release

1418d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c6fdde47e6975072038750c283c282a0a1282181467838e940ec17a3c7afdb0?d=identicon)[techenby](/maintainers/techenby)

---

Top Contributors

[![techenby](https://avatars.githubusercontent.com/u/6541180?v=4)](https://github.com/techenby "techenby (45 commits)")

---

Tags

sdkoctoprint

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/techenby-octoprint-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/techenby-octoprint-sdk/health.svg)](https://phpackages.com/packages/techenby-octoprint-sdk)
```

###  Alternatives

[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
