PHPackages                             darvis/nuki - 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. [API Development](/categories/api)
4. /
5. darvis/nuki

ActiveLibrary[API Development](/categories/api)

darvis/nuki
===========

Laravel package for the NUKI Web API (smartlocks, logs, authorizations, webhooks).

v1.0.3(3w ago)05↓100%[2 PRs](https://github.com/ArvidDeJong/nuki/pulls)MITPHPPHP ^8.2CI passing

Since May 12Pushed 3w agoCompare

[ Source](https://github.com/ArvidDeJong/nuki)[ Packagist](https://packagist.org/packages/darvis/nuki)[ Docs](https://github.com/ArvidDeJong/nuki)[ RSS](/packages/darvis-nuki/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (7)Versions (8)Used By (0)

darvis/nuki
===========

[](#darvisnuki)

[![Latest version on Packagist](https://camo.githubusercontent.com/fda3f1f492f2d1b516114ed721ca20503a873124884e0a6aaec6cee2dced2b70/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6461727669732f6e756b692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/darvis/nuki)[![Tests](https://camo.githubusercontent.com/6f969cdef544e484ec92e101361ad91479f0685371bc089de279eea1ca587d3c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f417276696444654a6f6e672f6e756b692f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/ArvidDeJong/nuki/actions/workflows/tests.yml)[![Total downloads](https://camo.githubusercontent.com/dcffb4559a6fea179def65882b9008feed5beb6aa4c5714f84b7ac7dbc83dc7e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6461727669732f6e756b692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/darvis/nuki)[![License](https://camo.githubusercontent.com/8407212b21d5f34f978b4d2ed1d2353f20f0942786c7902958818747e676e77e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6461727669732f6e756b692e7376673f7374796c653d666c61742d737175617265)](LICENSE)

A Laravel package for the [NUKI Web API](https://developer.nuki.io/). Provides a clean, typed interface for managing smartlocks, fetching activity logs, managing authorizations (keypad codes / app users), and receiving webhook callbacks.

- PHP 8.2+ — Laravel 11, 12, 13
- Bearer (API token) **and** OAuth 2.0 Authorization Code support
- Account-aware: a single application can manage multiple NUKI accounts
- Webhook receiver with HMAC signature verification and idempotent dispatch
- Built-in Livewire 3.5+ / 4 + Flux 2 UI: dashboard, activity timeline, smartlocks, keypad authorizations, webhooks and OAuth status
- Optional self-contained user-auth (`darvis-nuki` guard) with email OTP, sub-users, per-smartlock permissions and a weekday bitmask

Documentation
-------------

[](#documentation)

Full developer documentation lives in [docs/](docs/README.md). Quick links:

- [Getting started](docs/getting-started.md) — install, publish, "hello world".
- [Configuration reference](docs/configuration.md) — every `NUKI_*` env var and `config/nuki.php` key.
- [NUKI API authentication](docs/nuki-api-authentication.md) — token mode, OAuth, multi-account scoping with `Nuki::as()`.
- [API reference](docs/api-reference.md) — every public method on every resource, plus DTOs and console commands.
- [Users and permissions](docs/users-and-permissions.md) — package-managed users, sub-user permissions, weekday bitmask, OTP, password reset.
- [Auth routes](docs/auth-routes.md) — every URL registered when the auth feature is on.
- [Webhooks](docs/webhooks.md) — signature verification, dedup, `NukiWebhookReceived` event.
- [UI and localization](docs/ui-and-localization.md) — Livewire components, locales, layout override.
- [Demo mode](docs/demo-mode.md) — `NUKI_DEMO=true`, seeded accounts.
- [Troubleshooting](docs/troubleshooting.md) — common errors and fixes.

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

[](#installation)

```
composer require darvis/nuki
php artisan vendor:publish --tag=nuki-config
php artisan migrate
```

Service provider and `Nuki` facade are auto-discovered.

Minimal `.env` (token mode, single account)
-------------------------------------------

[](#minimal-env-token-mode-single-account)

```
NUKI_AUTH=token
NUKI_TOKEN_RESOLVER=config
NUKI_API_TOKEN=your-personal-api-token-from-web-nuki-io
```

Generate the token in the [NUKI Web portal](https://web.nuki.io/) under *API*. For multi-account or OAuth, see [NUKI API authentication](docs/nuki-api-authentication.md).

Hello world
-----------

[](#hello-world)

```
use Darvis\Nuki\Facades\Nuki;

$locks = Nuki::smartlocks()->all();          // Collection
$lock  = Nuki::smartlocks()->find($id);      // SmartLock

Nuki::smartlocks()->lock($id);
Nuki::smartlocks()->unlock($id);

$entries = Nuki::logs()->forSmartlock($id, ['limit' => 50]);

Nuki::auths()->create($id, [
    'name' => 'Cleaning lady',
    'type' => 13,                            // keypad code
    'code' => 123456,
]);
```

For everything else — every method on every resource, the DTO shapes, multi-account, OAuth, webhooks, the bundled UI, the optional user-auth — see [docs/](docs/README.md).

Webhooks
--------

[](#webhooks)

```
NUKI_WEBHOOK_ENABLED=true
NUKI_WEBHOOK_SECRET=a-long-random-string
```

Listen for inbound events:

```
use Darvis\Nuki\Events\NukiWebhookReceived;

Event::listen(NukiWebhookReceived::class, function (NukiWebhookReceived $event) {
    // $event->type, $event->payload, $event->accountKey
});
```

See [docs/webhooks.md](docs/webhooks.md) for signature verification, deduplication and registering the callback with NUKI.

Demo mode
---------

[](#demo-mode)

```
NUKI_DEMO=true
```

Intercepts every call to `api.nuki.io` and answers with realistic canned data. Combine with `php artisan db:seed --class="Darvis\\Nuki\\Database\\Seeders\\NukiDemoSeeder"`to populate the multi-account switcher. Perfect for screenshots and walk-throughs; **never enable in production**. See [docs/demo-mode.md](docs/demo-mode.md).

User authentication (optional)
------------------------------

[](#user-authentication-optional)

```
NUKI_AUTH_USERS_ENABLED=true
php artisan nuki:user-create --email=admin@example.com --name=Admin --password=secret123
```

Registers a `darvis-nuki` auth guard, gates `/nuki/*` behind it, and ships login / OTP / register / password-reset Livewire screens. Main users can create sub-users with per-smartlock permissions, a validity window and a weekday bitmask. See [docs/users-and-permissions.md](docs/users-and-permissions.md).

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- Author: **Arvid de Jong** (Darvis) —  —

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance94

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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

Total

4

Last Release

25d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/24c445b7580e09ff72b8340d1423886148c4c8a249d0a828c98285109e7e5663?d=identicon)[darvis](/maintainers/darvis)

---

Top Contributors

[![ArvidDeJong](https://avatars.githubusercontent.com/u/7394837?v=4)](https://github.com/ArvidDeJong "ArvidDeJong (5 commits)")

---

Tags

apilaravelwebhookiotnukismartlock

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/darvis-nuki/health.svg)

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

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k36.4M124](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k13.5M59](/packages/knuckleswtf-scribe)[kyon147/laravel-shopify

Shopify package for Laravel to aide in app development

481287.3k](/packages/kyon147-laravel-shopify)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

74287.1k1](/packages/mozex-anthropic-laravel)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.2k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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