PHPackages                             spatie/laravel-artisan-dd - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. spatie/laravel-artisan-dd

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

spatie/laravel-artisan-dd
=========================

Run dd from your commandline

2.5.0(2mo ago)16387.7k↓18.4%141MITPHPPHP ^8.2CI passing

Since May 14Pushed 2mo ago4 watchersCompare

[ Source](https://github.com/spatie/laravel-artisan-dd)[ Packagist](https://packagist.org/packages/spatie/laravel-artisan-dd)[ Docs](https://github.com/spatie/laravel-artisan-dd)[ Fund](https://spatie.be/open-source/support-us)[ GitHub Sponsors](https://github.com/spatie)[ RSS](/packages/spatie-laravel-artisan-dd/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (19)Used By (1)

Quickly dd anything from the commandline
========================================

[](#quickly-dd-anything-from-the-commandline)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b1ddbf2f0c308ac874156e6b0f296dd0b979aacb990002833f0c29b04b308e41/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370617469652f6c61726176656c2d6172746973616e2d64642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-artisan-dd)[![run-tests](https://github.com/spatie/laravel-artisan-dd/actions/workflows/run-tests.yml/badge.svg)](https://github.com/spatie/laravel-artisan-dd/actions/workflows/run-tests.yml)[![Check & fix styling](https://github.com/spatie/laravel-artisan-dd/workflows/Check%20&%20fix%20styling/badge.svg)](https://github.com/spatie/laravel-artisan-dd/workflows/Check%20&%20fix%20styling/badge.svg)[![Total Downloads](https://camo.githubusercontent.com/2c1e6511c8f54621ef5634286887c11d9508ce90ac71f4540e8c5c271ca273e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370617469652f6c61726176656c2d6172746973616e2d64642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/laravel-artisan-dd)

[Laravel's tinker command](https://github.com/laravel/tinker) allows to run any code you want as if you are inside your Laravel app. But if you want to run a single line of code if can be a bit bothersome. You must start up tinker, type the code, press enter, and quit tinker.

This package contains an Artisan command to dd anything from the commandline. No need to start and quit tinker anymore.

```
# dumps the first user
php artisan dd "User::first()"
```

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/f8eea6f7b2aeac4704233a36c4960f23c32c7595330a408d6da65068a285a606/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6c61726176656c2d6172746973616e2d64642e6a70673f743d31)](https://spatie.be/github-ad-click/laravel-artisan-dd)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

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

[](#installation)

You can install the package via composer:

```
composer require spatie/laravel-artisan-dd
```

You must register the `Spatie\ArtisanDd\DdCommand` in the bootstrap file:

```
// bootstrap/app.php

->withCommands([
    \Spatie\ArtisanDd\DdCommand::class,
])
```

Usage
-----

[](#usage)

You can pass any code you want to execute as the first argument. The result will be dumped to the screen.

```
php artisan dd "bcrypt('secret')";
```

Multiple pieces of code can be dumped in one go:

```
php artisan dd "bcrypt('secret')" "bcrypt('another-secret')";
```

Support for short class names
-----------------------------

[](#support-for-short-class-names)

Under the hood registers short class names using our [laravel-tinker-tools](https://github.com/spatie/laravel-tinker-tools) package. So instead of

```
php artisan dd "\App\Models\NewsItem::first()";
```

you can do this:

```
php artisan dd "NewsItem::first()";
```

A word to the wise
------------------

[](#a-word-to-the-wise)

This command can run arbitrary code by using PHP's `eval`. Be aware that this can be potentially dangerous. By default the command will only run in a `local` environment. You can make it run in other environments by setting an `ALLOW_DD_COMMAND` enviroment variable to `true`.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you've found a bug regarding security please mail  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Freek Van der Herten](https://github.com/freekmurze)
- [All Contributors](../../contributors)

Idea: [Sebastian De Deyne](https://github.com/sebastiandedeyne)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

64

—

FairBetter than 99% of packages

Maintenance83

Actively maintained with recent releases

Popularity46

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~373 days

Total

17

Last Release

86d ago

Major Versions

0.0.1 → 1.0.02017-05-15

1.1.0 → 2.0.02017-08-30

PHP version history (6 changes)0.0.1PHP ^7.0

2.0.3PHP ^7.1

2.1.0PHP ^7.2

2.3.2PHP ^7.2|^8.0

2.3.3PHP ^7.4|^8.0

2.4.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7535935?v=4)[Spatie](/maintainers/spatie)[@spatie](https://github.com/spatie)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (76 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (18 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (15 commits)")[![patinthehat](https://avatars.githubusercontent.com/u/5508707?v=4)](https://github.com/patinthehat "patinthehat (11 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (10 commits)")[![AdrianMrn](https://avatars.githubusercontent.com/u/12762044?v=4)](https://github.com/AdrianMrn "AdrianMrn (7 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (7 commits)")[![alexmanase](https://avatars.githubusercontent.com/u/10696975?v=4)](https://github.com/alexmanase "alexmanase (3 commits)")[![akoepcke](https://avatars.githubusercontent.com/u/5311185?v=4)](https://github.com/akoepcke "akoepcke (3 commits)")[![rubenvanassche](https://avatars.githubusercontent.com/u/619804?v=4)](https://github.com/rubenvanassche "rubenvanassche (3 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (2 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (1 commits)")[![imliam](https://avatars.githubusercontent.com/u/4326337?v=4)](https://github.com/imliam "imliam (1 commits)")[![mi-dave](https://avatars.githubusercontent.com/u/127017591?v=4)](https://github.com/mi-dave "mi-dave (1 commits)")[![d13r](https://avatars.githubusercontent.com/u/236616?v=4)](https://github.com/d13r "d13r (1 commits)")

---

Tags

artisandebugdumplaravelspatiedebugartisandeveloplaravel-artisan-dd

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/spatie-laravel-artisan-dd/health.svg)

```
[![Health](https://phpackages.com/badges/spatie-laravel-artisan-dd/health.svg)](https://phpackages.com/packages/spatie-laravel-artisan-dd)
```

###  Alternatives

[symfony/var-dumper

Provides mechanisms for walking through any arbitrary PHP variable

7.4k855.5M8.0k](/packages/symfony-var-dumper)[barryvdh/laravel-debugbar

PHP Debugbar integration for Laravel

19.2k124.3M624](/packages/barryvdh-laravel-debugbar)[php-debugbar/php-debugbar

Debug bar in the browser for php application

4.4k21.3M40](/packages/php-debugbar-php-debugbar)[spatie/laravel-web-tinker

Artisan Tinker in your browser

1.2k3.8M6](/packages/spatie-laravel-web-tinker)[fruitcake/laravel-telescope-toolbar

Toolbar for Laravel Telescope based on Symfony Web Profiler

8041.6M3](/packages/fruitcake-laravel-telescope-toolbar)[spatie/backtrace

A better backtrace

433169.4M51](/packages/spatie-backtrace)

PHPackages © 2026

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