PHPackages                             sbuerk/typo3-ensure-admin - 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. sbuerk/typo3-ensure-admin

ActiveTypo3-cms-extension[CLI &amp; Console](/categories/cli)

sbuerk/typo3-ensure-admin
=========================

Provides a TYPO3 cli command to create or update admin user

2.0.3(3y ago)19822[1 issues](https://github.com/sbuerk/typo3-ensure-admin/issues)[2 PRs](https://github.com/sbuerk/typo3-ensure-admin/pulls)GPL-2.0-or-laterPHPPHP ^7.4 || ^8.0 || ^8.1

Since Sep 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/sbuerk/typo3-ensure-admin)[ Packagist](https://packagist.org/packages/sbuerk/typo3-ensure-admin)[ RSS](/packages/sbuerk-typo3-ensure-admin/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (11)Versions (10)Used By (0)

TYPO3 Ensure Admin
==================

[](#typo3-ensure-admin)

State
=====

[](#state)

Workflowmain (2.x)1 (1.x)tests core 10-[![tests core 10](https://github.com/sbuerk/typo3-ensure-admin/actions/workflows/testcore10.yml/badge.svg?branch=1)](https://github.com/sbuerk/typo3-ensure-admin/blob/1/.github/workflows/testcore10.yml)tests core 11[![tests core 11](https://github.com/sbuerk/typo3-ensure-admin/actions/workflows/testcore11.yml/badge.svg?branch=main)](https://github.com/sbuerk/typo3-ensure-admin/actions/workflows/testcore11.yml)-tests core 12[![tests core 12](https://github.com/sbuerk/typo3-ensure-admin/actions/workflows/testcore12.yml/badge.svg?branch=main)](https://github.com/sbuerk/typo3-ensure-admin/actions/workflows/testcore12.yml)-Mission
=======

[](#mission)

The mission of this extension is to provide a tool to create and update users for staging and development purpose. Thus, it should be only taken as development dependencies for projects.

Additionally, it provides a simple password encoding command, which may be used to encode a password and use it to set the TYPO3 installtool password, for example.

> ℹ️ This extension only handles backend user compatible passwords. This means, Frontend Users passwords are not handled.

Version compatibility
=====================

[](#version-compatibility)

versionTYPO3PHP2.xv11 + v127.4, 8.0, 8.1, 8.21.xv107.2, 7.3, 7.4Alternatives
============

[](#alternatives)

[TYPO3 Console](https://github.com/TYPO3-Console/TYPO3-Console) includes some commands, which (partly) can do which this extension tries to archieve. If you are already using it, maybe existing features suits you. Then stay with that extension.

-

> ℹ️ We are not aware of further extensions providing similar abilities. Let us know if there are some, and we will add them here as alternative.

Installation
============

[](#installation)

Composer
--------

[](#composer)

You probably want to install this as `--dev` dependency.

```
$ composer require --dev sbuerk/typo3-ensure-admin

```

Usage
=====

[](#usage)

ensure admin user
-----------------

[](#ensure-admin-user)

```
$ vendor/bin/typo3 sbuerk:admin:ensure [options]
```

*Synopsis:*

```
Description:
  Create or update an admin user

Usage:
  sbuerk:admin:ensure [options]

Options:
      --name=NAME            Admin username - ENV: TYPO3_ENSUREADMIN_USERNAME
      --email=EMAIL          Admin email - ENV: TYPO3_ENSUREADMIN_EMAIL
      --password=PASSWORD    Admin password (plain) - ENV: TYPO3_ENSUREADMIN_PASSWORD
      --firstname=FIRSTNAME  Admin firstname - ENV: TYPO3_ENSUREADMIN_FIRSTNAME
      --lastname=LASTNAME    Admin lastname - ENV: TYPO3_ENSUREADMIN_LASTNAME
      --json                 Response with json for tool usages.
      --force                Force admin user creation, means updating existing one.
  -h, --help                 Display help for the given command. When no command is given display help for the list command
  -q, --quiet                Do not output any message
  -V, --version              Display this application version
      --ansi|--no-ansi       Force (or disable --no-ansi) ANSI output
  -n, --no-interaction       Do not ask any interactive question
  -v|vv|vvv, --verbose       Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

```

This command can be used to create or update admin user. If a user exists, the `--force` flag must be provided to update the admin user.

Additionally, this command supports `JSON Response` results instead of normal text outputs, which may be used for integrating in other tools or workflows. Use the `--json` flag to retrieve `JSON Results`.

Some options are required and mandatory, others are optional. Options can be provided as command line options or as Environment Variables, except `--json`and `--enforce` flags.

> ℹ️ If for an option both variants are provided, the option variants preceeds the Environment Variable variant.

optionrequiredenv variabledescription--name=yes`TYPO3_ENSUREADMIN_USERNAME`Admin username--password=yes`TYPO3_ENSUREADMIN_PASSWORD`Sets the admin `password`--email=no`TYPO3_ENSUREADMIN_EMAIL`Sets the admin `email` address.--firstname=no`TYPO3_ENSUREADMIN_FIRSTNAME`Will be used in combination with lastname to set the admin `realName`--lastname=no`TYPO3_ENSUREADMIN_LASTNAME`Will be used in combination with firstname to set the admin `realName`--jsonno-Return messages as json objects/strings--forceno\*-Required if you want to update an existing admin user. Optional/not used if new admin user is created.JSON Response structure:

```
{
    "success": true,
    "message": "Success or error message"
}
```

`Normal mode` and `JSON result mode` both provides proper exit codes, which may be used as a first indicator without really reading the output.

result-stateexit codesuccess0failure1password encode
---------------

[](#password-encode)

```
$ vendor/bin/typo3 sbuerk:password:encode  [--json]
```

*Synopsis:*

```
Description:
  Takes a plain password and returns the password hash. Can be used as install tool password.

Usage:
  sbuerk:password:encode [options] [--]

Arguments:
  plain                 Plain password to encode to be used for install tool / .env setting

Options:
      --json            Output json result
  -h, --help            Display help for the given command. When no command is given display help for the list command
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

```

argument/optiondescriptionplain-passwordYou must specify the plan password you want to encode. This is required.--json*Optional* Add this flag if you want json responses instead of human readable output.JSON Response structure:

```
{
    "success": true,
    "password": "",
    "message": "Message, for example the plain => hashed password success message"
}
```

`Normal mode` and `JSON result mode` both provides proper exit codes, which may be used as a first indicator without really reading the output.

result-stateexit codesuccess0failure1TYPO3 Extension Repository
--------------------------

[](#typo3-extension-repository)

For non-composer projects, the extension is available in TER as extension key `cli_ensure_admin` and can be installed using the extension manager.

Tagging and releasing
=====================

[](#tagging-and-releasing)

[packagist.org](https://packagist.org/packages/sbuerk/typo3-ensure-admin) is enabled via the casual github hook. TER releases are created by the "publish.yml" github workflow when tagging versions using [tailor](https://github.com/typo33/tailor). The commit message of the tagged commit is used as TER upload comment.

```
$ Build/Scripts/runTests.sh -s clean
$ Build/Scripts/runTests.sh -s composerUpdate
$ composer req --dev typo3/tailor
$ .Build/bin/tailor set-version 2.0.3 --no-docs
$ composer rem --dev typo3/tailor
$ git commit -am "[RELEASE] 2.0.3 Updated and test publish workflow"
$ git tag 2.0.3
$ git push
$ git push --tags
```

Feedback / Bug reports / Contribution
=====================================

[](#feedback--bug-reports--contribution)

Bug reports, feature requests and pull requests are welcome in the GitHub repository:

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

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

Total

8

Last Release

1360d ago

Major Versions

1.0.2 → 2.0.02022-09-11

1.x-dev → 2.0.32022-10-13

PHP version history (2 changes)1.0.0PHP ^7.2 || ^7.3 || ^7.4

2.0.0PHP ^7.4 || ^8.0 || ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1453466?v=4)[Stefan Bürk](/maintainers/sbuerk)[@sbuerk](https://github.com/sbuerk)

---

Top Contributors

[![sbuerk](https://avatars.githubusercontent.com/u/1453466?v=4)](https://github.com/sbuerk "sbuerk (70 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sbuerk-typo3-ensure-admin/health.svg)

```
[![Health](https://phpackages.com/badges/sbuerk-typo3-ensure-admin/health.svg)](https://phpackages.com/packages/sbuerk-typo3-ensure-admin)
```

###  Alternatives

[helhum/typo3-console

A reliable and powerful command line interface for TYPO3 CMS

2959.5M256](/packages/helhum-typo3-console)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

611.1M8](/packages/netresearch-rte-ckeditor-image)[wazum/sluggi

TYPO3 extension for URL slug management with inline editing, auto-sync, locking, access control, and redirects

40529.5k](/packages/wazum-sluggi)[pagemachine/typo3-formlog

Form log for TYPO3

23238.6k8](/packages/pagemachine-typo3-formlog)[b13/assetcollector

Asset collector - Add CSS and SVG files and strings as inline style tag/inline svg to the html code.

10125.6k](/packages/b13-assetcollector)

PHPackages © 2026

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