PHPackages                             noxterr/spirit - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. noxterr/spirit

ActiveLibrary[File &amp; Storage](/categories/file-storage)

noxterr/spirit
==============

A package that handles working with files with B2 (backblaze) in an elegant manner

3.2.0(1y ago)112[1 issues](https://github.com/noxterr/spirit/issues)MITPHPPHP ^8.1

Since Oct 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/noxterr/spirit)[ Packagist](https://packagist.org/packages/noxterr/spirit)[ Docs](https://github.com/noxterr/spirit)[ RSS](/packages/noxterr-spirit/feed)WikiDiscussions 3.x Synced 1mo ago

READMEChangelogDependenciesVersions (8)Used By (0)

 [![b2 spirit logo](/art/logo.png)](/art/logo.png)

 [![Total Downloads](https://camo.githubusercontent.com/cb380349497ed20c3681696e06c18d0aced8d818ed2b79880825c13dd05e5f19/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6f78746572722f737069726974)](https://packagist.org/packages/noxterr/spirit) [![Latest Stable Version](https://camo.githubusercontent.com/799a6bf96219c52322865687dd0ece781e5947c0dcc9e43906b02c83c28ef51d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6f78746572722f737069726974)](https://packagist.org/packages/noxterr/spirit) [![License](https://camo.githubusercontent.com/343f93e4e31d6ca3de6ae9c38fa1b5407b4cc6457e5bdaee8ccd2012bed5fca5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6e6f78746572722f737069726974)](https://packagist.org/packages/noxterr/spirit)

B2 Spirit is a Laravel package designed to handle file transfers with Backblaze B2 Cloud Storage.

(on a side-note, this project is paused since I don't have time to add other endpoints/fix issues, but I aim at doing so in the future)

Features
--------

[](#features)

- Seamless integration with Laravel
- Easy file uploads and downloads
- Secure file storage with Backblaze B2

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

[](#installation)

To install the package, use Composer:

```
composer require noxterr/spirit
```

Setup migrations
----------------

[](#setup-migrations)

Migrations aren't necessary for this package to work and all the functions and features will work even if you don't publish migration and execute them.

The simply migration will keep a table for logging on your database, which will log every single action that is carried out from this package.

This allows auditing and logging, in order to keep track of every action.

Even if you publish and run migrations, you need to enable the logging flow by adding a key in the `.env` file.

Step 1: Export the migrations

```
php artisan vendor:publish --tag="spirit-migrations"
```

Step 2: Run `php artisan migrate` to run the migrations.

Step 3: Add key in your `.env` for migrations

```
B2_MIGRATION_ENABLED=true # This is either true or false
# (optional)
B2_MIGRATION_LEVEL=`B2_MIGRATION_LEVEL` # This is 'off' | 'minimal' | 'normal' | 'exhaustive' | 'intense' | 'full'
```

Set your Backblaze B2 credentials in the `.env` file:

```
B2_KEY=`YOUR_B2_KEY` # You can put your master key for now. Creating a key with the privileges you need also works
B2_BUCKET_NAME=`YOUR_B2_BUCKET_NAME` # The globally-available name you gave your bucket
B2_BUCKET_ID=`YOUR_B2_BUCKET_ID`
B2_ACCOUNT_ID=`YOUR_B2_ACCOUNT_ID`
```

Usage
-----

[](#usage)

### Uploading a File

[](#uploading-a-file)

```
use Noxterr\Spirit\Spirit;

$spirit = new Spirit();

$uploaded_file = $spirit->uploadFile($file);
```

### Downloading a File

[](#downloading-a-file)

```
use Noxterr\Spirit\Spirit;

$spirit = new Spirit();

$file = $spirit->downloadFile($file_name);
```

### Handling respones

[](#handling-respones)

Every time an action is carried out on Spirit, a response is provided to the user under the form of a so-called ClassReturn.

This is an object that returns standardized data, making it easier to interface with your custom application.

The object is as follows

```
// In another class
$response = new \ClassReturn();

return $response;

/** This returns
 * {
 *    errcode: 1 | 0,
 *    message: string | null (contains the error information if needed)
 *    data: mixed | null -> contains the data from a response
 * }
*/
```

With this flow, you can always ensure to check errors like so `if ($response->errcode != 0) { Error handling }`, so is easy to use.

Versioning and branches
-----------------------

[](#versioning-and-branches)

Every branch will be named `X.Y.Z` to match the version (meaning 2.0.0, 1.2.3 etc...). The latest branch is v.x (meaning 2.x, 3.x and so on).

Tag-wise, a tag that matches the version will be pushed on a new release under the same version schema with v appended upfront (meaning v1.2.4, v2.0.0)

For tags, if a version is, say, `3.x`, the corresponding tags can range from `v3.0.0` to `v3.9.9`, higher meaning latest version to require via composer

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

Contributing
------------

[](#contributing)

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

Support
-------

[](#support)

For any issues, please open an issue on GitHub.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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 ~2 days

Total

8

Last Release

552d ago

Major Versions

1.4.0 → 2.0.02024-10-24

2.0.0.x-dev → 3.0.02024-11-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/e166f4b5e51cc8147768f07b96445edc6d17c1f060df813329c0559f45d3709b?d=identicon)[noxterr](/maintainers/noxterr)

---

Top Contributors

[![noxterr](https://avatars.githubusercontent.com/u/85783430?v=4)](https://github.com/noxterr "noxterr (41 commits)")

---

Tags

laravelfilesstorageb2backblaze

### Embed Badge

![Health badge](/badges/noxterr-spirit/health.svg)

```
[![Health](https://phpackages.com/badges/noxterr-spirit/health.svg)](https://phpackages.com/packages/noxterr-spirit)
```

###  Alternatives

[gliterd/backblaze-b2

PHP SDK for working with backblaze B2 cloud storage.

84263.3k8](/packages/gliterd-backblaze-b2)[cwhite92/b2-sdk-php

A SDK for working with B2 cloud storage.

74146.6k2](/packages/cwhite92-b2-sdk-php)[gliterd/laravel-backblaze-b2

Backblaze B2 Cloud Storage for Laravel 5

5341.6k](/packages/gliterd-laravel-backblaze-b2)[obregonco/backblaze-b2

An SDK for working with B2 cloud storage.

2732.9k](/packages/obregonco-backblaze-b2)[bringyourownideas/laravel-backblaze

Backblaze B2 Cloud Storage for Laravel 5. Original by Paul Olthof (@hpolthof) continued by @bringyourownideas

1237.8k](/packages/bringyourownideas-laravel-backblaze)[zing/laravel-flysystem-obs

Flysystem Adapter for OBS

1211.2k](/packages/zing-laravel-flysystem-obs)

PHPackages © 2026

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