PHPackages                             cviebrock/artisan-hash - 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. [CLI &amp; Console](/categories/cli)
4. /
5. cviebrock/artisan-hash

ActiveLibrary[CLI &amp; Console](/categories/cli)

cviebrock/artisan-hash
======================

Adds Artisan tasks to Laravel to work with password hashes from the CLI.

v1.0.1(12y ago)10842MITPHPPHP &gt;=5.4.0

Since Apr 25Pushed 12y ago1 watchersCompare

[ Source](https://github.com/cviebrock/artisan-hash)[ Packagist](https://packagist.org/packages/cviebrock/artisan-hash)[ RSS](/packages/cviebrock-artisan-hash/feed)WikiDiscussions master Synced today

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

artisan-hash
============

[](#artisan-hash)

Adds Artisan tasks to Laravel to work with password hashes from the CLI.

[![Latest Stable Version](https://camo.githubusercontent.com/aa481d6d8463e9c4c9538db9e8f8d387682147ebbd61374b21d64eb87926ecf4/68747470733a2f2f706f7365722e707567782e6f72672f6376696562726f636b2f6172746973616e2d686173682f762f737461626c652e706e67)](https://packagist.org/packages/cviebrock/artisan-hash)[![Total Downloads](https://camo.githubusercontent.com/81992e2f6287ecea45070a767b708ebe81ba0cbf22b1485d81266feb727ad64d/68747470733a2f2f706f7365722e707567782e6f72672f6376696562726f636b2f6172746973616e2d686173682f646f776e6c6f6164732e706e67)](https://packagist.org/packages/cviebrock/artisan-hash)

- [Installation](#installation)
- [Usage](#usage)
- [Bugs, Suggestions and Contributions](#bugs)
- [Copyright and License](#copyright)

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

[](#installation)

First, add the package to the `require-dev` attribute of your `composer.json` file:

```
{
    "require": {
        "cviebrock/artisan-hash": "1.*"
    },
}
```

> You could add it to the `require` section instead, but you likely only need this during development.

Next, update Composer from the Terminal:

```
composer update --dev
```

Once this operation completes, add the service provider. Open `app/config/app.php`, and add a new item to the providers array.

```
'Cviebrock\ArtisanHash\ArtisanHashServiceProvider'

```

That's it! Run the `artisan` command from the Terminal to see the new commands.

```
php artisan
```

Usage
-----

[](#usage)

### hash:make

[](#hashmake)

This will hash the given plaintext string and output the hash to the console. If you don't provide a string, you will be asked to enter one (this will keep the plaintext string out of your shell history).

```
$ php artisan hash:make foo
$2y$08$3nq5mD1faNAPUdyt72yyqOTRl/OIrizhQ84EnH1kbouC/8ud31smW
```

### hash:check

[](#hashcheck)

This will compare a given hash to a plaintext string and see if they match.

```
$ php artisan hash:check '$2y$08$3nq5mD1faNAPUdyt72yyqOTRl/OIrizhQ84EnH1kbouC/8ud31smW' foo
Hash matches.
```

> Note that if the hash contains dollar signs -- as it likely will -- you will need to escape them in your shell. The easiest way is just to surround the hash in single quotes, or don't provide the hash via the command and use the prompt.

The command will also check if the hash needs rehashing.

```
$ php artisan hash:check '$1$stCkrNrE$W92vGH25VHnLK.kDBmZwz0' foo
Hash matches.
Your hash needs to be rehashed.
```

Bugs, Suggestions and Contributions
-----------------------------------

[](#bugs-suggestions-and-contributions)

Please use Github for bugs, comments, suggestions.

1. Fork the project.
2. Create your bugfix/feature branch and write your (well-commented) code.
3. Create unit tests for your code:
    - Run `composer install --dev` in the root directory to install required testing packages.
    - Add your test methods to `artisan-hash/tests/`.
    - Run `vendor/bin/phpunit` to the new (and all previous) tests and make sure everything passes.
4. Commit your changes (and your tests) and push to your branch.
5. Create a new pull request against the artisan-hash `develop` branch.

**Please note that you must create your pull request against the `develop` branch.**

Copyright and License
---------------------

[](#copyright-and-license)

[artisan-hash](https://github.com/cviebrock/artisan-hash) was written by Colin Viebrock and released under the MIT License. See the LICENSE file for details.

Copyright 2014 Colin Viebrock

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Total

2

Last Release

4397d ago

### Community

Maintainers

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

---

Top Contributors

[![cviebrock](https://avatars.githubusercontent.com/u/166810?v=4)](https://github.com/cviebrock "cviebrock (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cviebrock-artisan-hash/health.svg)

```
[![Health](https://phpackages.com/badges/cviebrock-artisan-hash/health.svg)](https://phpackages.com/packages/cviebrock-artisan-hash)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[nunomaduro/laravel-console-menu

Laravel Console Menu is an output method for your Laravel/Laravel Zero commands.

815412.0k48](/packages/nunomaduro-laravel-console-menu)[bestmomo/nice-artisan

Web interface for Laravel Artisan

215149.3k](/packages/bestmomo-nice-artisan)[statamic/cli

Statamic CLI Tool

7587.7k](/packages/statamic-cli)[mwguerra/web-terminal

A web-based terminal component for Filament/Laravel with command whitelisting and multiple connection types

251.1k](/packages/mwguerra-web-terminal)[sunaoka/laravel-facade-generator

Provide command line generation of facade layer files.

171.9k](/packages/sunaoka-laravel-facade-generator)

PHPackages © 2026

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