PHPackages                             boaideas/laravel-cli-create-user - 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. [Database &amp; ORM](/categories/database)
4. /
5. boaideas/laravel-cli-create-user

ActiveLibrary[Database &amp; ORM](/categories/database)

boaideas/laravel-cli-create-user
================================

An artisan command to create, list and remove users in a laravel application from the cli

v1.5(5y ago)1610.7k6[1 PRs](https://github.com/amosmos/laravel-cli-create-user/pulls)MITPHPPHP ^7.0

Since Aug 21Pushed 3y ago3 watchersCompare

[ Source](https://github.com/amosmos/laravel-cli-create-user)[ Packagist](https://packagist.org/packages/boaideas/laravel-cli-create-user)[ Docs](https://github.com/amosmos/laravel-cli-create-user)[ RSS](/packages/boaideas-laravel-cli-create-user/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (14)Used By (0)

Easily create, list and remove Laravel users with a CLI command
===============================================================

[](#easily-create-list-and-remove-laravel-users-with-a-cli-command)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9369a3634c2c375c214742da8852b4444b9b20619e4f9a84eb083e016b979086/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626f6169646561732f6c61726176656c2d636c692d6372656174652d757365722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/boaideas/laravel-cli-create-user)[![Software License](https://camo.githubusercontent.com/46da754f781df85607e6ba77563e7fc9acaa54d6b0235a9fe0dc04893d36b25f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626f6169646561732f6c61726176656c2d636c692d6372656174652d757365722e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![StyleCI](https://camo.githubusercontent.com/c005e95587bea68dad426d1659d66d8204438fde4b4e472bb435ad857bd109c3/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130303933303834332f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/100930843)[![Total Downloads](https://camo.githubusercontent.com/74ddbdddd40def95c8ae873a94871490909284acfa929b90cae9d2fda95e6f72/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626f6169646561732f6c61726176656c2d636c692d6372656174652d757365722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/boaideas/laravel-cli-create-user)

Using this artisan command it's easy to create Laravel users from the CLI whenever you need them. If you want, it will even email the user their credentials.

The command will validate the user details using Laravel's regular validation engine (which means you can create your own rules). If you want, the command can create a random password for you.

We also added commands to list all existing users and to easily remove users.

Requirements
------------

[](#requirements)

The package is based on the defaul User model that ships with Laravel, so it assumes you're using a model (you can name it anything you want) with name, email and password fields.

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

[](#installation)

You can install the package via composer:

```
composer require boaideas/laravel-cli-create-user
```

If you're installing the package on Laravel 5.5 or higher, you're done (The package uses Laravel's auto package discovery).

If you're using Laravel 5.4 or less, add the `BOAIdeas\CreateUser\CreateUserServiceProvider` service provider to your providers array:

```
// config/app.php

'providers' => [
    ...
    BOAIdeas\CreateUser\CreateUserServiceProvider::class,
];
```

Usage
-----

[](#usage)

### Create a new user

[](#create-a-new-user)

From your CLI execute:

```
php artisan user:create
```

You will be asked for the user's name, email and password, and then the user account will be created. If you choose, a random password will be created for you.

#### Input validation

[](#input-validation)

Your input will be validated using Laravel's validation engine with Laravel's default user input rules (you can [change the rules](#configuration) if you want).

#### Email user credentials

[](#email-user-credentials)

You will be asked if you want to send an email to the newly created user with their credentials. If you do, the command will send a regular Laravel notification to the user's email, so make sure you've sert your app's [mail settings](https://laravel.com/docs/master/mail).

The notification is using the default APP\_NAME, APP\_URL, MAIL\_FROM\_ADDRESS and MAIL\_FROM\_NAME so make sure they're set correctly.

### List all existing users

[](#list-all-existing-users)

From your CLI execute:

```
php artisan user:list
```

You will be presented with a table of all existing users.

### Remove a user (by ID)

[](#remove-a-user-by-id)

From your CLI execute:

```
php artisan user:remove {user_id}
```

The command will confirm that you want to remove that user and will remove it.

Configuration
-------------

[](#configuration)

By default, the package assumes your User model is called User and validates your model input with the default rules that Laravel uses for users creation.

If you want to change any of these settings, you can publish the config file with:

```
php artisan vendor:publish --provider="BOAIdeas\CreateUser\CreateUserServiceProvider"
```

This is the content of the published config file:

```
// config/createuser.php

return [
    /*
    * The class name of the user model to be used.
    */
    'model' => 'App\User',

    /*
    * The validation rules to check for user model input.
    */
    'validation_rules' => [
    	'name' => 'string|max:255',
    	'email' => 'string|email|max:255|unique:users',
    	'password' => 'string|min:6',
    ],

];
```

Credits
-------

[](#credits)

- [Amos Shacham](https://github.com/amosmos)
- [All Contributors](../../contributors)

Alternatives
------------

[](#alternatives)

- [laravel-make-user](https://github.com/michaeldyrynda/laravel-make-user)
- [laravel-cli-user](https://github.com/subdesign/laravel-cli-user)
- [create-user-command](https://github.com/rap2hpoutre/create-user-command)

License
-------

[](#license)

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

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 93.8% 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 ~93 days

Recently: every ~274 days

Total

13

Last Release

2076d ago

Major Versions

v0.3.3 → v1.02017-09-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a987c4f53b6ef2305f7cd99a2a995686f7c6f41688af56814b6d53be8fd2bb3?d=identicon)[amosmos](/maintainers/amosmos)

---

Top Contributors

[![amosmos](https://avatars.githubusercontent.com/u/2318695?v=4)](https://github.com/amosmos "amosmos (75 commits)")[![litalboa](https://avatars.githubusercontent.com/u/19529643?v=4)](https://github.com/litalboa "litalboa (2 commits)")[![EmilMoe](https://avatars.githubusercontent.com/u/555083?v=4)](https://github.com/EmilMoe "EmilMoe (1 commits)")[![jlalande](https://avatars.githubusercontent.com/u/2721747?v=4)](https://github.com/jlalande "jlalande (1 commits)")[![roblesterjr04](https://avatars.githubusercontent.com/u/6423115?v=4)](https://github.com/roblesterjr04 "roblesterjr04 (1 commits)")

---

Tags

artisanclicreatedatabaseeloquentlaraveluserclilaraveldatabaseemaileloquentartisanuserlistcreateremoveBOA Ideaslaravel-create-user

### Embed Badge

![Health badge](/badges/boaideas-laravel-cli-create-user/health.svg)

```
[![Health](https://phpackages.com/badges/boaideas-laravel-cli-create-user/health.svg)](https://phpackages.com/packages/boaideas-laravel-cli-create-user)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11120.2M21](/packages/anourvalar-eloquent-serialize)[betterapp/laravel-db-encrypter

Provides database model attribute encryption/decryption

365614.7k8](/packages/betterapp-laravel-db-encrypter)[waad/laravel-model-metadata

A robust Laravel package for handling metadata with JSON casting, custom relation names, and advanced querying capabilities.

823.1k](/packages/waad-laravel-model-metadata)[wayofdev/laravel-cycle-orm-adapter

🔥 A Laravel adapter for CycleORM, providing seamless integration of the Cycle DataMapper ORM for advanced database handling and object mapping in PHP applications.

3516.7k3](/packages/wayofdev-laravel-cycle-orm-adapter)

PHPackages © 2026

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